mirror of https://bitbucket.org/ausocean/av.git
mts: actually updating time and gps now
This commit is contained in:
parent
05fd7c37d1
commit
afc7c1f086
|
@ -34,7 +34,6 @@ 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 (
|
||||||
|
@ -188,27 +187,23 @@ func (e *Encoder) writePSI() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Update pmt table time and gps
|
||||||
// Update pmt table time and gps
|
err = psi.UpdateTime(pmtTable, metaData.time)
|
||||||
err = psi.UpdateTime(pmtTable, metaData.time)
|
if err != nil {
|
||||||
if err != nil {
|
return err
|
||||||
return err
|
}
|
||||||
}
|
err = psi.UpdateGps(pmtTable, metaData.gps)
|
||||||
err = psi.UpdateGps(pmtTable, metaData.gps)
|
if err != nil {
|
||||||
if err != nil {
|
return nil
|
||||||
return nil
|
}
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
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: packet,
|
Payload: addPadding(pmtTable),
|
||||||
}
|
}
|
||||||
_, err = e.dst.Write(pmtPkt.Bytes())
|
_, err = e.dst.Write(pmtPkt.Bytes())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue