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,
"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
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,
"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
"{ 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 }" ";"));