Commit 9ec62418 authored by Seungha Yang's avatar Seungha Yang Committed by Víctor Manuel Jáquez Leal

msdk: Do not expose DMA buffer caps feature on Windows

On Windows, DMA buffer is not supported. PadTemplate with actually
supported feature seems to more make sense.
parent afe3c7e3
Pipeline #50367 failed with stages
in 66 minutes and 28 seconds
......@@ -44,6 +44,13 @@
GST_DEBUG_CATEGORY_EXTERN (gst_msdkdec_debug);
#define GST_CAT_DEFAULT gst_msdkdec_debug
#ifndef _WIN32
#define DMABUF_CAPS_STR \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_DMABUF, "{ NV12 }")
#else
#define DMABUF_CAPS_STR ""
#endif
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
......@@ -51,9 +58,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
"format = (string) { NV12 }, "
"framerate = (fraction) [0, MAX], "
"width = (int) [ 1, MAX ], height = (int) [ 1, MAX ],"
"interlace-mode = (string) progressive;"
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_DMABUF,
"{ NV12 }") ";")
"interlace-mode = (string) progressive;" DMABUF_CAPS_STR)
);
#define PROP_HARDWARE_DEFAULT TRUE
......
......@@ -76,6 +76,13 @@ static void gst_msdkenc_close_encoder (GstMsdkEnc * thiz);
GST_DEBUG_CATEGORY_EXTERN (gst_msdkenc_debug);
#define GST_CAT_DEFAULT gst_msdkenc_debug
#ifndef _WIN32
#define DMABUF_CAPS_STR \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_DMABUF, "{ NV12 }")
#else
#define DMABUF_CAPS_STR ""
#endif
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
......@@ -83,9 +90,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
"format = (string) { NV12, I420, YV12, YUY2, UYVY, BGRA }, "
"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 }")));
"interlace-mode = (string) progressive" ";" DMABUF_CAPS_STR)
);
#define PROP_HARDWARE_DEFAULT TRUE
#define PROP_ASYNC_DEPTH_DEFAULT 4
......
......@@ -69,23 +69,36 @@ GST_DEBUG_CATEGORY_EXTERN (gst_msdkvpp_debug);
"{ NV12, BGRA, YUY2, UYVY, VUYA, P010_10LE}"
#endif
#ifndef _WIN32
#define DMABUF_SINK_CAPS_STR \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_DMABUF, \
SUPPORTED_DMABUF_FORMAT)
#else
#define DMABUF_SINK_CAPS_STR ""
#endif
#ifndef _WIN32
#define DMABUF_SRC_CAPS_STR \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_DMABUF, \
"{ BGRA, YUY2, UYVY, NV12, VUYA, BGRx, P010_10LE" EXT_FORMATS "}") ";"
#else
#define DMABUF_SRC_CAPS_STR ""
#endif
static GstStaticPadTemplate gst_msdkvpp_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (SUPPORTED_SYSTEM_FORMAT)
", " "interlace-mode = (string){ progressive, interleaved, mixed }" ";"
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_DMABUF,
SUPPORTED_DMABUF_FORMAT)));
DMABUF_SINK_CAPS_STR));
static GstStaticPadTemplate gst_msdkvpp_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
(GST_CAPS_FEATURE_MEMORY_DMABUF,
"{ BGRA, YUY2, UYVY, NV12, VUYA, BGRx, P010_10LE" EXT_FORMATS "}")
";"
GST_STATIC_CAPS (DMABUF_SRC_CAPS_STR
GST_VIDEO_CAPS_MAKE ("{ BGRA, NV12, YUY2, UYVY, VUYA, BGRx, P010_10LE"
EXT_FORMATS "}") ", "
"interlace-mode = (string){ progressive, interleaved, mixed }" ";"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment