2021-09-01 00:42:41 +03:00
|
|
|
package mpeg
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/wader/fq/format"
|
|
|
|
"github.com/wader/fq/format/registry"
|
|
|
|
"github.com/wader/fq/pkg/decode"
|
|
|
|
)
|
|
|
|
|
|
|
|
var annexBAVCNALUFormat []*decode.Format
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
registry.MustRegister(&decode.Format{
|
|
|
|
Name: format.AVC_ANNEXB,
|
|
|
|
Description: "H.264/AVC Annex B",
|
|
|
|
DecodeFn: func(d *decode.D, in interface{}) interface{} {
|
|
|
|
return annexBDecode(d, in, annexBAVCNALUFormat)
|
|
|
|
},
|
2021-11-03 19:19:33 +03:00
|
|
|
RootArray: true,
|
|
|
|
RootName: "stream",
|
2021-09-01 00:42:41 +03:00
|
|
|
Dependencies: []decode.Dependency{
|
|
|
|
{Names: []string{format.AVC_NALU}, Formats: &annexBAVCNALUFormat},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|