mirror of https://bitbucket.org/ausocean/av.git
psi: using Desc instead of Descriptor
This commit is contained in:
parent
fe11ce6f08
commit
2a589be6bf
|
@ -2,7 +2,7 @@ package psi
|
|||
|
||||
const (
|
||||
ESSDHeadLen = 5
|
||||
DescriptorHeadLen = 2
|
||||
DescHeadLen = 2
|
||||
)
|
||||
|
||||
// Program specific information
|
||||
|
@ -42,7 +42,7 @@ type PAT struct {
|
|||
type PMT struct {
|
||||
pcrpid uint16 // Program clock reference pid
|
||||
pil uint16 // Program info length
|
||||
pd []Descriptor // Program descriptors
|
||||
pd []Desc // Program descriptors
|
||||
essd []ESSD // Elementary stream specific data
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ type ESSD struct {
|
|||
st byte // Stream type
|
||||
epid byte // Elementary pid
|
||||
esil uint16 // Elementary stream
|
||||
esd []Descriptor // Elementary stream desriptors
|
||||
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