diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2019-01-16 14:52:35 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2019-01-31 10:30:22 +0800 |
commit | edc0edc960cc197ad287d3180f78141cc2980124 (patch) | |
tree | 5ba8dbcb330b038e115b8d8193e290487e54b4a1 | |
parent | 3324ad377d0d80d06e9120fe3d8c5020fc4597c2 (diff) |
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
-rw-r--r-- | sys/msdk/gstmsdkvp9dec.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/msdk/gstmsdkvp9dec.c b/sys/msdk/gstmsdkvp9dec.c index 61a6a05df..85387024f 100644 --- a/sys/msdk/gstmsdkvp9dec.c +++ b/sys/msdk/gstmsdkvp9dec.c @@ -39,6 +39,7 @@ #include <mfxvp9.h> #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 |