nvenc: Fix MSVC build error C2121

This commit is contained in:
Seungha Yang 2018-11-22 14:01:28 +09:00 committed by Tim-Philipp Müller
parent 6bf5ba993d
commit 3cd1d0c7bc
2 changed files with 25 additions and 15 deletions

View file

@ -40,6 +40,18 @@ GST_DEBUG_CATEGORY_STATIC (gst_nv_h264_enc_debug);
#define parent_class gst_nv_h264_enc_parent_class
G_DEFINE_TYPE (GstNvH264Enc, gst_nv_h264_enc, GST_TYPE_NV_BASE_ENC);
#if HAVE_NVENC_GST_GL
#define GL_CAPS_STR \
";" \
"video/x-raw(memory:GLMemory), " \
"format = (string) { NV12, Y444 }, " \
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], " \
"framerate = (fraction) [0, MAX]," \
"interlace-mode = { progressive, mixed, interleaved } "
#else
#define GL_CAPS_STR ""
#endif
/* *INDENT-OFF* */
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
@ -48,14 +60,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], "
"framerate = (fraction) [0, MAX],"
"interlace-mode = { progressive, mixed, interleaved } "
#if HAVE_NVENC_GST_GL
";"
"video/x-raw(memory:GLMemory), "
"format = (string) { NV12, Y444 }, "
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], "
"framerate = (fraction) [0, MAX],"
"interlace-mode = { progressive, mixed, interleaved } "
#endif
GL_CAPS_STR
));
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",

View file

@ -41,6 +41,17 @@ GST_DEBUG_CATEGORY_STATIC (gst_nv_h265_enc_debug);
#define parent_class gst_nv_h265_enc_parent_class
G_DEFINE_TYPE (GstNvH265Enc, gst_nv_h265_enc, GST_TYPE_NV_BASE_ENC);
#if HAVE_NVENC_GST_GL
#define GL_CAPS_STR \
";" \
"video/x-raw(memory:GLMemory), " \
"format = (string) { NV12, Y444 }, " \
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], " \
"framerate = (fraction) [0, MAX] "
#else
#define GL_CAPS_STR ""
#endif
/* *INDENT-OFF* */
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
@ -48,13 +59,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS ("video/x-raw, " "format = (string) { NV12, I420 }, " // TODO: YV12, Y444 support
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], "
"framerate = (fraction) [0, MAX] "
#if HAVE_NVENC_GST_GL
";"
"video/x-raw(memory:GLMemory), "
"format = (string) { NV12, Y444 }, "
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], "
"framerate = (fraction) [0, MAX] "
#endif
GL_CAPS_STR
));
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",