From edc0edc960cc197ad287d3180f78141cc2980124 Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Wed, 16 Jan 2019 14:52:35 +0800 Subject: [PATCH] msdkvp9dec: use separate src caps We will add more formats in the src caps of msdkvp9dec, so let msdkvp9dec uses separate src caps. Note it doesn't change any capability --- sys/msdk/gstmsdkvp9dec.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/msdk/gstmsdkvp9dec.c b/sys/msdk/gstmsdkvp9dec.c index 61a6a05dfd..85387024f9 100644 --- a/sys/msdk/gstmsdkvp9dec.c +++ b/sys/msdk/gstmsdkvp9dec.c @@ -39,6 +39,7 @@ #include #include "gstmsdkvp9dec.h" +#include "gstmsdkvideomemory.h" GST_DEBUG_CATEGORY_EXTERN (gst_msdkvp9dec_debug); #define GST_CAT_DEFAULT gst_msdkvp9dec_debug @@ -49,6 +50,18 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS ("video/x-vp9") ); +static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("video/x-raw, " + "format = (string) { NV12 }, " + "framerate = (fraction) [0, MAX], " + "width = (int) [ 16, MAX ], height = (int) [ 16, MAX ]," + "interlace-mode = (string) progressive;" + GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_DMABUF, + "{ NV12 }") ";") + ); + #define gst_msdkvp9dec_parent_class parent_class G_DEFINE_TYPE (GstMsdkVP9Dec, gst_msdkvp9dec, GST_TYPE_MSDKDEC); @@ -160,6 +173,7 @@ gst_msdkvp9dec_class_init (GstMsdkVP9DecClass * klass) gst_msdkdec_prop_install_output_oder_property (gobject_class); gst_element_class_add_static_pad_template (element_class, &sink_factory); + gst_element_class_add_static_pad_template (element_class, &src_factory); } static void