Trying to get it to build

This commit is contained in:
Saxon Milton 2018-07-02 13:12:11 +09:30
parent 94a9f8fe77
commit 79710f27f6
1 changed files with 10 additions and 9 deletions

View File

@ -30,28 +30,29 @@ package h264FileToRtmpTest
import ( import (
"testing" "testing"
"time" "time"
"bitbucket.org/ausocean/av/revid"
) )
const ( const (
inputFile = "bitbucket.org/ausocean/test/test-input/av/betterInput.h264" inputFile = "bitbucket.org/ausocean/test/test-input/av/betterInput.h264"
rtmpUrl = "rtmp://a.rtmp.youtube.com/live2/w44c-mkuu-aezg-ceb1" rtmpUrl = "rtmp://a.rtmp.youtube.com/live2/v70c-qu3x-2bs4-esek"
frameRate = "25" frameRate = "25"
runDuration = 120 * time.Second runDuration = 120 * time.Second
) )
// Test h264 inputfile to flv format into rtmp using librtmp c wrapper // Test h264 inputfile to flv format into rtmp using librtmp c wrapper
func TestRtmpOutputUsingLibRtmp(t *testing.T) { func TestRtmpOutputUsingLibRtmp(t *testing.T) {
config := Config{ config := revid.Config{
Input: File, Input: revid.File,
InputFileName: inputFile, InputFileName: inputFile,
InputCodec: H264, InputCodec: revid.H264,
Output: Rtmp, Output: revid.Rtmp,
RtmpMethod: LibRtmp, RtmpMethod: revid.LibRtmp,
RtmpUrl: rtmpUrl, RtmpUrl: rtmpUrl,
Packetization: Flv, Packetization: revid.Flv,
FrameRate: frameRate,
} }
revidInst, err := NewRevidInstance(config) revidInst, err := revid.New(config)
if err != nil { if err != nil {
t.Errorf("Should not of have got an error!: %v\n", err.Error()) t.Errorf("Should not of have got an error!: %v\n", err.Error())
return return