playbin3: usage of "Decoder-Sinks" (hardware decoder)
When using playbin3 instead of playbin the pipeline with "decoding" sink elements no longer setup properly. This works perfectly with playbin.
I get an error message like:
Missing element: H.264 (High Profile) decoder
ERROR: from element /GstPlayBin3:playbin3-0/GstURIDecodeBin3:uridecodebin3-0/GstDecodebin3:decodebin3-0/GstParseBin:parsebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
../../../../../../Media/GST-1.0/gstreamer/subprojects/gst-plugins-base/gst/playback/gstparsebin.c(3494): gst_parse_bin_expose (): /GstPlayBin3:playbin3-0/GstURIDecodeBin3:uridecodebin3-0/GstDecodebin3:decodebin3-0/GstParseBin:parsebin0:
no suitable plugins found:
Missing parser: H.264 (High Profile) (video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3.2, profile=(string)high, codec_data=(buffer)01640020ffe1001e67640020acd9405005bb016e04040b4a000003000200000300c81e30632c01000668ebe3cb22c0, width=(int)1280, height=(int)720, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, colorimetry=(string)1:4:0:0, parsed=(boolean)true)
Background
We are using GStreamer on a SOC with integrated hardware decoders for audio and video. This decoders are fed directly with "video/x-h264..." or "audio/mpeg..." (and other "encoded" media formats).
So we have created sink elements with respective sink caps. The elements are classified as "Sink/Video/Hardware" rsp. "Sink/Audio/Hardware". Obviously "playbin3" is looking for "Decoders" for this stream caps that are not found (We have removed the SW decoders for all caps that are supported by our hardware from the GStreamer packages)
I also have tried to classify my Sinks as "Decoder". In this case they are built in the pipeline (in decodebin3), but the pipeline remains paused. And there are an unused pipes from decodebin3 (see attachment)
Expectation
- Can you help to understand whether this is a playbin3 issue or a problem with our "Decoder-Sink" Elements?
- What needs to be changed in the sink to get working with playbin3
How to reproduce
To reproduce the problem I have attached sources for a simple "Decoder-Sink"
Element that provides video/x-h264
capabilities on its sink pad.
Tested on GStreamer Release 1.20.3
- create local branch at 1.20.3
- apply the attached patch
- build gstreamer with (disable default h264 decoders):
meson -Dlibav=disabled -Dgst-plugins-bad:openh264=disabled -Dtest=enabled build
ninja -C build
- Enter devenv (
ninja -C build/ devenv
) - Some test commands:
gstreamer/build$ export GST_DEBUG=h264sink:6,playbin*:3
gstreamer/build$ gst-inspect-1.0 h264sink
gstreamer/build$ gst-launch-1.0 playbin uri=http://192.168.0.252/media/h264sink/1280x720-h264.mp4
gstreamer/build$ gst-launch-1.0 playbin3 uri=http://192.168.0.252/media/h264sink/1280x720-h264.mp4
attached:
- patchfile: 0001-added-subproject-gst-test-with-h264sink.patch.tar.gz
- logfile and pipeline for both cases: results.zip
- sample media: 1280x720-h264.mp4