Decodebin and decoders for parsed streams

Alexey Chernov 4ernov at gmail.com
Sat Aug 10 03:41:27 PDT 2013


Hello,

I'm developing a GStreamer wrapper element on top of hardware decoder API 
using GstVideoDecoder as a base class. It can decode H.264 streams in byte-
stream format (a.k.a. annex-B) only and provides raw frames in UYVY format. I 
found very convenient to use h264parse to parse any H.264 input stream and get 
preferred stream format from e.g. AVC. Everything seems to work fine, but when 
I try to make decodebin pick my decoder automatically, I see "You installation 
missing a plugin" message reporting that there's no H.264 decoder. I tried to 
set my plugin rank to GST_RANK_PRIMARY + 1 and the sink and src templates are 
the following:

static GstStaticPadTemplate gst_litevmetadec_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-h264,"
"parsed = (boolean) true, stream-format = (string) byte-stream")
);

static GstStaticPadTemplate gst_litevmetadec_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-raw,"
"format = (string) UYVY")
);

Do I need to add something so that decodebin picked my decoder and also 
inserted h264parse before it if necessary? Obviously, I'm missing something, 
as I tried to set sink template the same as avdec_h264 has, but the result was 
quite the same.

Best regards,
Alexey Chernov


More information about the gstreamer-devel mailing list