1
1
mirror of https://github.com/wader/fq.git synced 2024-12-23 21:31:33 +03:00
fq/format/mpeg/hevc_annexb.go
Mattias Wadman 1ddea1ada3 interp,format: Refactor registry usage and use function helpers
Move registry to interp and add support for functions and filesystems.
This will be used later for allow formats to add own functions and fq code.

Add gojqextra function helpers to have more comfortable API to add functions.
Takes care of argument type casting and JQValue:s and some more things.

Refactor interp package to use new function helper and registry. Probably
fixes a bunch of JQValue bugs and other type errors.

Refactor out some mpeg nal things to mpeg format.

Refactor interp jq code into display.q and init.jq.

Remove undocumented aes_ctr funciton, was a test. Hopefully will add more crypto things laster.
2022-07-16 19:24:13 +02:00

25 lines
548 B
Go

package mpeg
import (
"github.com/wader/fq/format"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
)
var annexBHEVCNALUFormat decode.Group
func init() {
interp.RegisterFormat(decode.Format{
Name: format.HEVC_ANNEXB,
Description: "H.265/HEVC Annex B",
DecodeFn: func(d *decode.D, in any) any {
return annexBDecode(d, in, annexBHEVCNALUFormat)
},
RootArray: true,
RootName: "stream",
Dependencies: []decode.Dependency{
{Names: []string{format.HEVC_NALU}, Group: &annexBHEVCNALUFormat},
},
})
}