added a test driver so that we don't have testing limit

This commit is contained in:
Unknown 2018-03-14 12:22:32 +10:30
parent 86bc3602d7
commit 466634a6cb
1 changed files with 27 additions and 0 deletions

27
revid/testDriver.go Normal file
View File

@ -0,0 +1,27 @@
package revid
import (
"time"
)
func main(){
config := Config{
Input: Raspivid,
Output: Rtmp,
RtmpMethod: LibRtmp,
QuantizationMode: QuantizationOff,
RtmpUrl: "rtmp://a.rtmp.youtube.com/live2/w44c-mkuu-aezg-ceb1",
Bitrate: "500000",
FramesPerClip: 1,
Packetization: Flv,
FrameRate: "25",
}
revidInst, err := NewRevidInstance(config)
if err != nil {
t.Errorf("Should not have got an error!")
return
}
revidInst.Start()
time.Sleep(2*43200*time.Second)
revidInst.Stop()
}