mirror of https://bitbucket.org/ausocean/av.git
Got rtmp test working
This commit is contained in:
parent
72cd0b7a03
commit
c861862ff7
|
@ -25,24 +25,24 @@ LICENSE
|
|||
along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses).
|
||||
*/
|
||||
|
||||
package h264FileToRtmpTest
|
||||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
"fmt"
|
||||
|
||||
"bitbucket.org/ausocean/av/revid"
|
||||
)
|
||||
|
||||
const (
|
||||
inputFile = "bitbucket.org/ausocean/test/test-input/av/betterInput.h264"
|
||||
inputFile = "../../../../test/test-data/av/input/betterInput.h264"
|
||||
rtmpUrl = "rtmp://a.rtmp.youtube.com/live2/v70c-qu3x-2bs4-esek"
|
||||
frameRate = "25"
|
||||
runDuration = 120 * time.Second
|
||||
)
|
||||
|
||||
// Test h264 inputfile to flv format into rtmp using librtmp c wrapper
|
||||
func TestRtmpOutputUsingLibRtmp(t *testing.T) {
|
||||
func main() {
|
||||
config := revid.Config{
|
||||
Input: revid.File,
|
||||
InputFileName: inputFile,
|
||||
|
@ -54,7 +54,7 @@ func TestRtmpOutputUsingLibRtmp(t *testing.T) {
|
|||
}
|
||||
revidInst, err := revid.New(config, nil)
|
||||
if err != nil {
|
||||
t.Errorf("Should not of have got an error!: %v\n", err.Error())
|
||||
fmt.Printf("Should not of have got an error!: %v\n", err.Error())
|
||||
return
|
||||
}
|
||||
revidInst.Start()
|
||||
|
|
|
@ -29,8 +29,8 @@ LICENSE
|
|||
package rtmp
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -I/usr/local/include/librtmp
|
||||
#cgo LDFLAGS: -lrtmp -lz
|
||||
#cgo CFLAGS: -I./rtmp_c/librtmp
|
||||
#cgo LDFLAGS: -L./rtmp_c/librtmp -lrtmp
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <rtmp.h>
|
||||
|
|
Loading…
Reference in New Issue