msdkenc: add D3D11 caps for msdkenc

This patch adds D3D11 feature to sink factory for msdkenc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>
This commit is contained in:
Tong Wu 2022-08-19 13:40:05 +08:00 committed by GStreamer Marge Bot
parent d61a248ac8
commit c62deb6fe9
4 changed files with 14 additions and 7 deletions

View file

@ -83,7 +83,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_MSDK_CAPS_STR
("{ NV12, I420, YV12, YUY2, UYVY, BGRA }", "NV12"))
("{ NV12, I420, YV12, YUY2, UYVY, BGRA }", "NV12") "; "
GST_MSDK_CAPS_MAKE_WITH_D3D11_FEATURE ("NV12"))
);
#else
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",

View file

@ -141,7 +141,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_MSDK_CAPS_STR (COMMON_FORMAT,
"{ NV12, P010_10LE }")));
"{ NV12, P010_10LE }") "; "
GST_MSDK_CAPS_MAKE_WITH_D3D11_FEATURE ("{ NV12, P010_10LE }")));
#else
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,

View file

@ -72,7 +72,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_MSDK_CAPS_STR (COMMON_FORMAT,
"{ NV12, P010_10LE }")));
"{ NV12, P010_10LE }") "; "
GST_MSDK_CAPS_MAKE_WITH_D3D11_FEATURE ("{ NV12, P010_10LE }")));
#else
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,

View file

@ -78,14 +78,18 @@ G_BEGIN_DECLS
#define GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE(vaformat) \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:VAMemory", vaformat) ", " \
"interlace-mode = (string) progressive"
#else
#define GST_MSDK_CAPS_MAKE_WITH_DMABUF_FEATURE(dmaformat) ""
#define GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE(vaformat) ""
#endif
#define GST_MSDK_CAPS_STR(format,dmaformat) \
GST_MSDK_CAPS_MAKE (format) "; " \
GST_MSDK_CAPS_MAKE_WITH_DMABUF_FEATURE (dmaformat)
#else
#define GST_MSDK_CAPS_MAKE_WITH_D3D11_FEATURE(d3d11format) \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:D3D11Memory", d3d11format) ", " \
"interlace-mode = (string) progressive"
#define GST_MSDK_CAPS_STR(format,dmaformat) \
GST_MSDK_CAPS_MAKE (format)
#endif
#if (MFX_VERSION < 2000)
typedef void * mfxLoader;