msdk: update the sink and src caps of msdkh265dec

Now hevc 10bit video can be decoded correctly, so update the sink
and src caps accordingly.

This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/720
This commit is contained in:
Xiang, Haihao 2018-11-16 08:56:34 +08:00 committed by Víctor Manuel Jáquez Leal
parent 2b0923842a
commit b38f8d301c

View file

@ -45,20 +45,21 @@
GST_DEBUG_CATEGORY_EXTERN (gst_msdkh265dec_debug); GST_DEBUG_CATEGORY_EXTERN (gst_msdkh265dec_debug);
#define GST_CAT_DEFAULT gst_msdkh265dec_debug #define GST_CAT_DEFAULT gst_msdkh265dec_debug
/* TODO: update both sink and src dynamically */
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-h265, " GST_STATIC_CAPS ("video/x-h265, "
"width = (int) [ 1, MAX ], height = (int) [ 1, MAX ], " "width = (int) [ 1, MAX ], height = (int) [ 1, MAX ], "
"stream-format = (string) byte-stream , alignment = (string) au , " "stream-format = (string) byte-stream , alignment = (string) au , "
"profile = (string) main ") "profile = (string) { main, main-10 } ")
); );
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-raw, " GST_STATIC_CAPS ("video/x-raw, "
"format = (string) { NV12 }, " "format = (string) { NV12, P010_10LE }, "
"framerate = (fraction) [0, MAX], " "framerate = (fraction) [0, MAX], "
"width = (int) [ 16, MAX ], height = (int) [ 16, MAX ]," "width = (int) [ 16, MAX ], height = (int) [ 16, MAX ],"
"interlace-mode = (string) progressive;" "interlace-mode = (string) progressive;"