diff --git a/generator/FLVGenerator.go b/generator/FLVGenerator.go index b000611b..f8965205 100644 --- a/generator/FLVGenerator.go +++ b/generator/FLVGenerator.go @@ -29,7 +29,7 @@ package generator import ( "bitbucket.org/ausocean/av/flv" //"../flv" - _ "fmt" + _"fmt" "time" ) @@ -110,10 +110,14 @@ func (g *flvGenerator) GenHeader() { func (g *flvGenerator) getNextTimestamp() (timestamp uint32) { if g.firstTag { g.startTime = time.Now() - firstTage = false + g.firstTag = false + timestamp = 0 + return } - timestamp = g.currentTimestamp - g.currentTimestamp += uint32(time.Now().sub(g.startTime).Seconds()*float64(1000)) + //timestamp = g.currentTimestamp + //g.currentTimestamp += 40 + timestamp = uint32(time.Now().Sub(g.startTime).Seconds()*float64(1000)) + //fmt.Printf("timestamp: %v", timestamp) return } diff --git a/revid/RevidInstance.go b/revid/RevidInstance.go index ded130c0..215cf22a 100644 --- a/revid/RevidInstance.go +++ b/revid/RevidInstance.go @@ -461,7 +461,7 @@ func (r *revidInst) setupInputForRaspivid() error { "-o", "-", "-n", "-t", r.config.Timeout, - "-b", "10000", + "-b", "500000", //"-qp", r.config.Quantization, "-w", r.config.Width, "-h", r.config.Height, diff --git a/revid/revid_test.go b/revid/revid_test.go index e4ece8fa..ce0b3a29 100644 --- a/revid/revid_test.go +++ b/revid/revid_test.go @@ -188,7 +188,8 @@ func TestRaspividToRtmp(t *testing.T){ return } revidInst.Start() - time.Sleep(240*time.Second) + time.Sleep(43200*time.Second) revidInst.Stop() } + diff --git a/rtmp/RTMP.go b/rtmp/RTMP.go index 0d965d15..e654f2c5 100644 --- a/rtmp/RTMP.go +++ b/rtmp/RTMP.go @@ -26,9 +26,9 @@ LICENSE */ package rtmp -// #cgo CFLAGS: -I/home/saxon/Desktop/AusOcean/av/rtmp/ -// #cgo CFLAGS: -I/home/saxon/Desktop/AusOcean/av/rtmp/rtmp_c/librtmp -// #cgo LDFLAGS: /home/saxon/Desktop/AusOcean/av/rtmp/rtmp_c/librtmp/librtmp.a +// #cgo CFLAGS: -I/home/pi/go/src/bitbucket.org/AusOcean/av/rtmp/ +// #cgo CFLAGS: -I/home/pi/go/src/bitbucket.org/ausocean/av/rtmp/rtmp_c/librtmp +// #cgo LDFLAGS: /home/pi/go/src/bitbucket.org/ausocean/av/rtmp/rtmp_c/librtmp/librtmp.a // #cgo LDFLAGS: -lssl -lcrypto -lz // #include import "C" diff --git a/rtmp/rtmp_c/librtmp/amf.o b/rtmp/rtmp_c/librtmp/amf.o index 104323f6..458fe6b7 100644 Binary files a/rtmp/rtmp_c/librtmp/amf.o and b/rtmp/rtmp_c/librtmp/amf.o differ diff --git a/rtmp/rtmp_c/librtmp/hashswf.o b/rtmp/rtmp_c/librtmp/hashswf.o index fd354f53..e49a938e 100644 Binary files a/rtmp/rtmp_c/librtmp/hashswf.o and b/rtmp/rtmp_c/librtmp/hashswf.o differ diff --git a/rtmp/rtmp_c/librtmp/librtmp.a b/rtmp/rtmp_c/librtmp/librtmp.a index a37ef8f9..1499bfd4 100644 Binary files a/rtmp/rtmp_c/librtmp/librtmp.a and b/rtmp/rtmp_c/librtmp/librtmp.a differ diff --git a/rtmp/rtmp_c/librtmp/librtmp.so b/rtmp/rtmp_c/librtmp/librtmp.so new file mode 120000 index 00000000..bbdc5ef4 --- /dev/null +++ b/rtmp/rtmp_c/librtmp/librtmp.so @@ -0,0 +1 @@ +librtmp.so.1 \ No newline at end of file diff --git a/rtmp/rtmp_c/librtmp/librtmp.so.1 b/rtmp/rtmp_c/librtmp/librtmp.so.1 new file mode 100755 index 00000000..59e5aaee Binary files /dev/null and b/rtmp/rtmp_c/librtmp/librtmp.so.1 differ diff --git a/rtmp/rtmp_c/librtmp/log.o b/rtmp/rtmp_c/librtmp/log.o index 608de72f..b1e2f83f 100644 Binary files a/rtmp/rtmp_c/librtmp/log.o and b/rtmp/rtmp_c/librtmp/log.o differ diff --git a/rtmp/rtmp_c/librtmp/parseurl.o b/rtmp/rtmp_c/librtmp/parseurl.o index 0e8383b1..dd923ca8 100644 Binary files a/rtmp/rtmp_c/librtmp/parseurl.o and b/rtmp/rtmp_c/librtmp/parseurl.o differ diff --git a/rtmp/rtmp_c/librtmp/rtmp.o b/rtmp/rtmp_c/librtmp/rtmp.o index 11585755..d2e8ab92 100644 Binary files a/rtmp/rtmp_c/librtmp/rtmp.o and b/rtmp/rtmp_c/librtmp/rtmp.o differ diff --git a/rtmp/rtmp_c/rtmpdump b/rtmp/rtmp_c/rtmpdump new file mode 100755 index 00000000..557bbe5d Binary files /dev/null and b/rtmp/rtmp_c/rtmpdump differ diff --git a/rtmp/rtmp_c/rtmpdump.o b/rtmp/rtmp_c/rtmpdump.o new file mode 100644 index 00000000..e05b371b Binary files /dev/null and b/rtmp/rtmp_c/rtmpdump.o differ diff --git a/rtmp/rtmp_c/rtmpgw b/rtmp/rtmp_c/rtmpgw new file mode 100755 index 00000000..8cd90938 Binary files /dev/null and b/rtmp/rtmp_c/rtmpgw differ diff --git a/rtmp/rtmp_c/rtmpgw.o b/rtmp/rtmp_c/rtmpgw.o new file mode 100644 index 00000000..b53e2dbc Binary files /dev/null and b/rtmp/rtmp_c/rtmpgw.o differ diff --git a/rtmp/rtmp_c/rtmpsrv b/rtmp/rtmp_c/rtmpsrv new file mode 100755 index 00000000..de6ed74c Binary files /dev/null and b/rtmp/rtmp_c/rtmpsrv differ diff --git a/rtmp/rtmp_c/rtmpsrv.o b/rtmp/rtmp_c/rtmpsrv.o new file mode 100644 index 00000000..4a753793 Binary files /dev/null and b/rtmp/rtmp_c/rtmpsrv.o differ diff --git a/rtmp/rtmp_c/rtmpsuck b/rtmp/rtmp_c/rtmpsuck new file mode 100755 index 00000000..3f0ec946 Binary files /dev/null and b/rtmp/rtmp_c/rtmpsuck differ diff --git a/rtmp/rtmp_c/rtmpsuck.o b/rtmp/rtmp_c/rtmpsuck.o new file mode 100644 index 00000000..20d44f37 Binary files /dev/null and b/rtmp/rtmp_c/rtmpsuck.o differ diff --git a/rtmp/rtmp_c/thread.o b/rtmp/rtmp_c/thread.o new file mode 100644 index 00000000..7fc1208d Binary files /dev/null and b/rtmp/rtmp_c/thread.o differ