psi: fixed issue with std psi

This commit is contained in:
saxon 2018-12-13 17:06:39 +10:30
parent b78904ac72
commit 05fd7c37d1
2 changed files with 6 additions and 3 deletions

View File

@ -34,6 +34,7 @@ import (
"bitbucket.org/ausocean/av/stream/mts/pes" "bitbucket.org/ausocean/av/stream/mts/pes"
"bitbucket.org/ausocean/av/stream/mts/psi" "bitbucket.org/ausocean/av/stream/mts/psi"
"fmt"
) )
var ( var (
@ -63,7 +64,7 @@ func GpsMeta(g string) {
func init() { func init() {
patTable = psi.StdPat.Bytes() patTable = psi.StdPat.Bytes()
pmtTable = psi.StdPmt.Bytes() pmtTable = psi.StdPmtTimeGps.Bytes()
} }
const ( const (
@ -199,13 +200,15 @@ func (e *Encoder) writePSI() error {
} }
*/ */
packet := addPadding(pmtTable)
fmt.Println(len(pmtTable))
// Create mts packet from pmt table // Create mts packet from pmt table
pmtPkt := Packet{ pmtPkt := Packet{
PUSI: true, PUSI: true,
PID: pmtPid, PID: pmtPid,
CC: e.ccFor(pmtPid), CC: e.ccFor(pmtPid),
AFC: hasPayload, AFC: hasPayload,
Payload: addPadding(pmtTable), Payload: packet,
} }
_, err = e.dst.Write(pmtPkt.Bytes()) _, err = e.dst.Write(pmtPkt.Bytes())
if err != nil { if err != nil {

View File

@ -81,7 +81,7 @@ var (
Pf: 0x00, Pf: 0x00,
Tid: 0x02, Tid: 0x02,
Ssi: true, Ssi: true,
Sl: uint16(0x12), Sl: uint16(0x3e),
Tss: &TSS{ Tss: &TSS{
Tide: uint16(0x01), Tide: uint16(0x01),
V: 0, V: 0,