mirror of https://bitbucket.org/ausocean/av.git
stream/mts/psi/psi.go: cleaned up and comment consts
This commit is contained in:
parent
b4393e5136
commit
330fdc6aa8
|
@ -32,11 +32,10 @@ import (
|
||||||
"github.com/Comcast/gots/psi"
|
"github.com/Comcast/gots/psi"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
// PacketSize of psi (without mpegts header)
|
||||||
PacketSize = 184 // packet size of a psi.
|
const PacketSize = 184
|
||||||
)
|
|
||||||
|
|
||||||
// Lengths of section definitions
|
// Lengths of section definitions.
|
||||||
const (
|
const (
|
||||||
ESSDDefLen = 5
|
ESSDDefLen = 5
|
||||||
DescDefLen = 2
|
DescDefLen = 2
|
||||||
|
@ -46,15 +45,14 @@ const (
|
||||||
PSIDefLen = 3
|
PSIDefLen = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
// Table Type IDs
|
// Table Type IDs.
|
||||||
const (
|
const (
|
||||||
patID = 0x00
|
patID = 0x00
|
||||||
pmtID = 0x02
|
pmtID = 0x02
|
||||||
)
|
)
|
||||||
|
|
||||||
const TotalSyntaxSecLen = 180
|
|
||||||
|
|
||||||
// Consts relating to time description
|
// Consts relating to time description
|
||||||
|
// TODO: remove this, we don't do metadata like this anymore.
|
||||||
const (
|
const (
|
||||||
TimeDescTag = 234
|
TimeDescTag = 234
|
||||||
TimeTagIndx = 13
|
TimeTagIndx = 13
|
||||||
|
@ -63,6 +61,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Consts relating to location description
|
// Consts relating to location description
|
||||||
|
// TODO: remove this, we don't do metadata like this anymore.
|
||||||
const (
|
const (
|
||||||
LocationDescTag = 235
|
LocationDescTag = 235
|
||||||
LocationTagIndx = 23
|
LocationTagIndx = 23
|
||||||
|
@ -70,35 +69,32 @@ const (
|
||||||
LocationDataSize = 32 // bytes
|
LocationDataSize = 32 // bytes
|
||||||
)
|
)
|
||||||
|
|
||||||
// Other misc consts
|
// crc hassh Size
|
||||||
|
const crcSize = 4
|
||||||
|
|
||||||
|
// Consts relating to syntax section.
|
||||||
const (
|
const (
|
||||||
|
TotalSyntaxSecLen = 180
|
||||||
SyntaxSecLenIdx1 = 2
|
SyntaxSecLenIdx1 = 2
|
||||||
SyntaxSecLenIdx2 = 3
|
SyntaxSecLenIdx2 = 3
|
||||||
SyntaxSecLenMask1 = 0x03
|
SyntaxSecLenMask1 = 0x03
|
||||||
crcSize = 4
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
SectionLenIdx1 = 2
|
|
||||||
SectionLenIdx2 = 3
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
SectionLenMask1 = 0x03
|
SectionLenMask1 = 0x03
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Consts relating to program info len.
|
||||||
const (
|
const (
|
||||||
ProgramInfoLenIdx1 = 11
|
ProgramInfoLenIdx1 = 11
|
||||||
ProgramInfoLenIdx2 = 12
|
ProgramInfoLenIdx2 = 12
|
||||||
ProgramInfoLenMask1 = 0x03
|
ProgramInfoLenMask1 = 0x03
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
// DescriptorsIdx is the index that the descriptors start at.
|
||||||
DescriptorsIdx = ProgramInfoLenIdx2 + 1
|
const DescriptorsIdx = ProgramInfoLenIdx2 + 1
|
||||||
)
|
|
||||||
|
|
||||||
|
// MetadataTag is the descriptor tag used for metadata.
|
||||||
const MetadataTag = 0x26
|
const MetadataTag = 0x26
|
||||||
|
|
||||||
|
// TODO: get rid of these - not a good idea.
|
||||||
type (
|
type (
|
||||||
PSIBytes []byte
|
PSIBytes []byte
|
||||||
Descriptor []byte
|
Descriptor []byte
|
||||||
|
|
Loading…
Reference in New Issue