diff --git a/stream/mts/psi/psi.go b/stream/mts/psi/psi.go index 5eb9ce6e..ba1daf58 100644 --- a/stream/mts/psi/psi.go +++ b/stream/mts/psi/psi.go @@ -1,8 +1,8 @@ package psi const ( - ESSDHeadLen = 5 - DescriptorHeadLen = 2 + ESSDHeadLen = 5 + DescHeadLen = 2 ) // Program specific information @@ -40,18 +40,18 @@ type PAT struct { // Program mapping table, implements SD type PMT struct { - pcrpid uint16 // Program clock reference pid - pil uint16 // Program info length - pd []Descriptor // Program descriptors - essd []ESSD // Elementary stream specific data + pcrpid uint16 // Program clock reference pid + pil uint16 // Program info length + pd []Desc // Program descriptors + essd []ESSD // Elementary stream specific data } // Elementary stream specific data type ESSD struct { - st byte // Stream type - epid byte // Elementary pid - esil uint16 // Elementary stream - esd []Descriptor // Elementary stream desriptors + st byte // Stream type + epid byte // Elementary pid + esil uint16 // Elementary stream + esd []Desc // Elementary stream desriptors } // Descriptor @@ -82,8 +82,8 @@ func (p *PMT) Fill(space []byte) error { return nil } -func (d *Descriptor) Fill(space []byte) error { - checkSpace(space, DescriptorHeadLen+int(d.dl)) +func (d *Desc) Fill(space []byte) error { + checkSpace(space, DescHeadLen+int(d.dl)) space[0] = d.dt space[1] = d.dl copy(space[2:], d.dd)