gl: fix the use of always-defined macros

After 2a0f0399ae GST_GL_* macros are always
defined to 0 or 1. Don't use #ifdef ... or #if defined() on them.

https://bugzilla.gnome.org/show_bug.cgi?id=726591
This commit is contained in:
Руслан Ижбулатов 2014-03-18 00:08:50 +00:00 committed by julien isorce
parent 499cd75e4b
commit 12e669f388

View file

@ -24,13 +24,13 @@
#include <gst/gl/gl.h> #include <gst/gl/gl.h>
#include "gstgtk.h" #include "gstgtk.h"
#if defined(GST_GL_HAVE_WINDOW_WIN32) && defined(GDK_WINDOWING_WIN32) #if GST_GL_HAVE_WINDOW_WIN32 && GDK_WINDOWING_WIN32
#include <gdk/gdkwin32.h> #include <gdk/gdkwin32.h>
#endif #endif
#if defined(GST_GL_HAVE_WINDOW_X11) && defined(GDK_WINDOWING_X11) #if GST_GL_HAVE_WINDOW_X11 && GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#endif #endif
#if defined(GST_GL_HAVE_WINDOW_COCOA) && defined(GDK_WINDOWING_QUARTZ) #if GST_GL_HAVE_WINDOW_COCOA && GDK_WINDOWING_QUARTZ
#include <gdk/gdkquartz.h> #include <gdk/gdkquartz.h>
#endif #endif
@ -46,21 +46,21 @@ gst_video_overlay_set_gtk_window (GstVideoOverlay * videooverlay,
window = gtk_widget_get_window (widget); window = gtk_widget_get_window (widget);
display = gdk_window_get_display (window); display = gdk_window_get_display (window);
#if defined(GST_GL_HAVE_WINDOW_WIN32) && defined(GDK_WINDOWING_WIN32) #if GST_GL_HAVE_WINDOW_WIN32 && GDK_WINDOWING_WIN32
if (GDK_IS_WIN32_DISPLAY (display) && (!user_choice if (GDK_IS_WIN32_DISPLAY (display) && (!user_choice
|| g_strcmp0 (user_choice, "win32") == 0)) { || g_strcmp0 (user_choice, "win32") == 0)) {
gst_video_overlay_set_window_handle (videooverlay, gst_video_overlay_set_window_handle (videooverlay,
(guintptr) GDK_WINDOW_HWND (window)); (guintptr) GDK_WINDOW_HWND (window));
} else } else
#endif #endif
#if defined(GST_GL_HAVE_WINDOW_COCOA) && defined(GDK_WINDOWING_QUARTZ) #if GST_GL_HAVE_WINDOW_COCOA && GDK_WINDOWING_QUARTZ
if (GDK_IS_QUARTZ_DISPLAY (display) && (!user_choice if (GDK_IS_QUARTZ_DISPLAY (display) && (!user_choice
|| g_strcmp0 (user_choice, "cocoa") == 0)) { || g_strcmp0 (user_choice, "cocoa") == 0)) {
gst_video_overlay_set_window_handle (videooverlay, (guintptr) gst_video_overlay_set_window_handle (videooverlay, (guintptr)
gdk_quartz_window_get_nswindow (window)); gdk_quartz_window_get_nswindow (window));
} else } else
#endif #endif
#if defined(GST_GL_HAVE_WINDOW_X11) && defined(GDK_WINDOWING_X11) #if GST_GL_HAVE_WINDOW_X11 && GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display) && (!user_choice if (GDK_IS_X11_DISPLAY (display) && (!user_choice
|| g_strcmp0 (user_choice, "x11") == 0)) { || g_strcmp0 (user_choice, "x11") == 0)) {
gst_video_overlay_set_window_handle (videooverlay, GDK_WINDOW_XID (window)); gst_video_overlay_set_window_handle (videooverlay, GDK_WINDOW_XID (window));