mirror of https://bitbucket.org/ausocean/av.git
psi: using Desc instead of Descriptor
This commit is contained in:
parent
fe11ce6f08
commit
2a589be6bf
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue