mirror of https://bitbucket.org/ausocean/av.git
just getting a record
This commit is contained in:
parent
f91c5f2c97
commit
067b36b1cd
|
@ -28,6 +28,8 @@ LICENSE
|
||||||
|
|
||||||
package packets
|
package packets
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
type RtpToTsConverter interface {
|
type RtpToTsConverter interface {
|
||||||
Convert()
|
Convert()
|
||||||
}
|
}
|
||||||
|
@ -64,7 +66,7 @@ func (c* rtpToTsConverter) Convert(rtpSession *Session) {
|
||||||
c.currentTsPacket = new(MpegTsPacket)
|
c.currentTsPacket = new(MpegTsPacket)
|
||||||
c.currentTsPacket.SyncByte = 0x47
|
c.currentTsPacket.SyncByte = 0x47
|
||||||
c.currentTsPacket.TEI = false
|
c.currentTsPacket.TEI = false
|
||||||
if lengthOfByteChan == len(rtpPacket.Payload) {
|
if lengthOfByteChan == len(rtpPacket.Payload) { // if it's the start of the payload
|
||||||
c.currentTsPacket.PUSI = true
|
c.currentTsPacket.PUSI = true
|
||||||
} else {
|
} else {
|
||||||
c.currentTsPacket.PUSI = false
|
c.currentTsPacket.PUSI = false
|
||||||
|
|
|
@ -426,10 +426,11 @@ func checkContinuityCounts(clip []byte) error {
|
||||||
// sendClipToStdout dumps video stats to stdout.
|
// sendClipToStdout dumps video stats to stdout.
|
||||||
func sendClipToStdout(clip []byte, _ string, _ net.Conn) error {
|
func sendClipToStdout(clip []byte, _ string, _ net.Conn) error {
|
||||||
fmt.Printf("Dumping clip (%d bytes)\n", len(clip))
|
fmt.Printf("Dumping clip (%d bytes)\n", len(clip))
|
||||||
|
/*
|
||||||
if *flags&dumpProgramInfo != 0 {
|
if *flags&dumpProgramInfo != 0 {
|
||||||
return mp2tDumpProgram(clip)
|
return mp2tDumpProgram(clip)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
packetCount := 0
|
packetCount := 0
|
||||||
discontinuities := 0
|
discontinuities := 0
|
||||||
|
@ -472,9 +473,9 @@ func sendClipToStdout(clip []byte, _ string, _ net.Conn) error {
|
||||||
}
|
}
|
||||||
dumpCC = (cc + 1) % 16
|
dumpCC = (cc + 1) % 16
|
||||||
|
|
||||||
if *flags&dumpPacketHeader != 0 {
|
//if *flags&dumpPacketHeader != 0 {
|
||||||
fmt.Printf("\t\tTEI=%d, PUSI=%d, TP=%d, TSC=%d, AFC=%d, CC=%d\n", tei, pusi, tp, tcs, afc, cc)
|
fmt.Printf("\t\tTEI=%d, PUSI=%d, TP=%d, TSC=%d, AFC=%d, CC=%d\n", tei, pusi, tp, tcs, afc, cc)
|
||||||
}
|
//}
|
||||||
|
|
||||||
if afc == 3 {
|
if afc == 3 {
|
||||||
// adaptation field, followed by payload
|
// adaptation field, followed by payload
|
||||||
|
|
Loading…
Reference in New Issue