mirror of https://bitbucket.org/ausocean/av.git
mts: some more const naming improvements
This commit is contained in:
parent
3a872d46c8
commit
49a6acbde8
|
@ -37,8 +37,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
psiPacketSize = 184
|
||||
psiSendCount = 7
|
||||
psiSndCnt = 7
|
||||
)
|
||||
|
||||
type MetaData struct {
|
||||
|
@ -209,14 +208,14 @@ func (e *Encoder) writePSI() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
e.psiCount = psiSendCount
|
||||
e.psiCount = psiSndCnt
|
||||
return nil
|
||||
}
|
||||
|
||||
// addPadding adds an appropriate amount of padding to a pat or pmt table for
|
||||
// addition to an mpegts packet
|
||||
func addPadding(d []byte) []byte {
|
||||
for len(d) < psiPacketSize {
|
||||
for len(d) < psi.PktLen {
|
||||
d = append(d, 0xff)
|
||||
}
|
||||
return d
|
||||
|
|
|
@ -30,6 +30,11 @@ import (
|
|||
"hash/crc32"
|
||||
)
|
||||
|
||||
// Misc consts
|
||||
const (
|
||||
PktLen = 184
|
||||
)
|
||||
|
||||
// Lengths of section definitions
|
||||
const (
|
||||
ESSDDefLen = 5
|
||||
|
|
Loading…
Reference in New Issue