This is derived from the H264 decoder, some boiler plate will be factored out in the following commits. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1216>
Most of the features we need are very early or not expose yet in the uAPI. Using an internal copy ensure that we everything we need is defined avoiding to add load of checks and conditionnal code.