mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
msdkenc: add macro definitions to avoid the gst-inspect error
Since the strings are empty for GST_MSDK_CAPS_MAKE_WITH_DMABUF_FEATURE and GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE, when excuting gst-inspect-1.0.exe msdkh265enc, there will be convert static caps error because of the extra semicolon between two empty strings. Now macro definitions are added to avoid this issue. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2004>
This commit is contained in:
parent
1170ab3c29
commit
2a703678c0
3 changed files with 25 additions and 0 deletions
|
@ -78,6 +78,14 @@ static void gst_msdkenc_close_encoder (GstMsdkEnc * thiz);
|
|||
GST_DEBUG_CATEGORY_EXTERN (gst_msdkenc_debug);
|
||||
#define GST_CAT_DEFAULT gst_msdkenc_debug
|
||||
|
||||
#ifdef _WIN32
|
||||
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"))
|
||||
);
|
||||
#else
|
||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
|
@ -85,6 +93,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
("{ NV12, I420, YV12, YUY2, UYVY, BGRA }", "NV12") "; "
|
||||
GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE ("NV12"))
|
||||
);
|
||||
#endif
|
||||
|
||||
#define PROP_HARDWARE_DEFAULT TRUE
|
||||
#define PROP_ASYNC_DEPTH_DEFAULT 4
|
||||
|
|
|
@ -130,12 +130,20 @@ enum
|
|||
#define PRFOLIE_STR "{ " PROFILES_1032 " }"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
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 }")));
|
||||
#else
|
||||
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 }") "; "
|
||||
GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE ("NV12")));
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
|
|
|
@ -67,12 +67,20 @@ GST_DEBUG_CATEGORY_EXTERN (gst_msdkvp9enc_debug);
|
|||
#define SRC_PROFILES "{ " PROFILES " }"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
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 }")));
|
||||
#else
|
||||
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 }") "; "
|
||||
GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE ("NV12")));
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
|
|
Loading…
Reference in a new issue