mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
GStreamer media backend: Fix building and running on Windows
Visual Studio (and possibly other non-GCC compilers) do not like uses of #-preprocessor directives in macro usage (warning C5101: use of preprocessor directive in function-like macro argument list is undefined behavior is also shown), so fix the build by defining another macro accordingly.
This commit is contained in:
parent
10345e134f
commit
43910ae33c
@ -72,14 +72,17 @@ GST_DEBUG_CATEGORY (gtk_debug_gst_sink);
|
||||
|
||||
#define NOGL_CAPS GST_VIDEO_CAPS_MAKE (FORMATS)
|
||||
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
# define GST_VIDEO_DMA_DRM_CAPS_MAKE_STR GST_VIDEO_DMA_DRM_CAPS_MAKE "; "
|
||||
#else
|
||||
# define GST_VIDEO_DMA_DRM_CAPS_MAKE_STR
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate gtk_gst_sink_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
GST_VIDEO_DMA_DRM_CAPS_MAKE "; "
|
||||
#endif
|
||||
GST_STATIC_CAPS (GST_VIDEO_DMA_DRM_CAPS_MAKE_STR
|
||||
"video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY "), "
|
||||
"format = (string) RGBA, "
|
||||
"width = " GST_VIDEO_SIZE_RANGE ", "
|
||||
@ -89,6 +92,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
"; " NOGL_CAPS)
|
||||
);
|
||||
|
||||
#undef GST_VIDEO_DMA_DRM_CAPS_MAKE_STR
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkGstSink, gtk_gst_sink,
|
||||
GST_TYPE_VIDEO_SINK,
|
||||
GST_DEBUG_CATEGORY_INIT (gtk_debug_gst_sink,
|
||||
|
Loading…
Reference in New Issue
Block a user