mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
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:
parent
d61a248ac8
commit
c62deb6fe9
4 changed files with 14 additions and 7 deletions
|
@ -83,7 +83,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS (GST_MSDK_CAPS_STR
|
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
|
#else
|
||||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
|
|
|
@ -141,7 +141,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS (GST_MSDK_CAPS_STR (COMMON_FORMAT,
|
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
|
#else
|
||||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
|
|
|
@ -72,7 +72,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS (GST_MSDK_CAPS_STR (COMMON_FORMAT,
|
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
|
#else
|
||||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
|
|
|
@ -78,14 +78,18 @@ G_BEGIN_DECLS
|
||||||
#define GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE(vaformat) \
|
#define GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE(vaformat) \
|
||||||
GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:VAMemory", vaformat) ", " \
|
GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:VAMemory", vaformat) ", " \
|
||||||
"interlace-mode = (string) progressive"
|
"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) \
|
#define GST_MSDK_CAPS_STR(format,dmaformat) \
|
||||||
GST_MSDK_CAPS_MAKE (format) "; " \
|
GST_MSDK_CAPS_MAKE (format) "; " \
|
||||||
GST_MSDK_CAPS_MAKE_WITH_DMABUF_FEATURE (dmaformat)
|
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)
|
#if (MFX_VERSION < 2000)
|
||||||
typedef void * mfxLoader;
|
typedef void * mfxLoader;
|
||||||
|
|
Loading…
Reference in a new issue