playback: Fix compilation with the GDK Quartz backend

This commit is contained in:
Andoni Morales Alastruey 2012-05-21 13:14:32 +02:00 committed by Sebastian Dröge
parent db3a4b424c
commit e8355ce908
3 changed files with 8 additions and 2 deletions

View file

@ -256,11 +256,13 @@ if test "x$BUILD_EXAMPLES" = "xyes"; then
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
dnl some examples need gtk+-x11
PKG_CHECK_MODULES(GTK_X11, gtk+-x11-3.0 >= $GTK_REQ, HAVE_GTK_X11=yes, HAVE_GTK_X11=no)
PKG_CHECK_MODULES(GTK_QUARTZ, gtk+-quartz-3.0 >= $GTK_REQ, HAVE_GTK_QUARTZ=yes, HAVE_GTK_QUARTZ=no)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
fi
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
AM_CONDITIONAL(HAVE_GTK_QUARTZ, test "x$HAVE_GTK_QUARTZ" = "xyes")
dnl QT is optional and only used in examples
PKG_CHECK_MODULES(QT, QtGui >= 4.6, [

View file

@ -4,4 +4,8 @@ LDADD = \
$(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
$(GST_LIBS) $(GTK_LIBS) $(LIBM)
if HAVE_GTK_QUARTZ
AM_CPPFLAGS = '-xobjective-c'
endif
AM_CFLAGS = -I$(top_builddir)/gst-libs $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)

View file

@ -44,7 +44,7 @@
#elif defined (GDK_WINDOWING_WIN32)
#include <gdk/gdkwin32.h>
#elif defined (GDK_WINDOWING_QUARTZ)
#include <gdk/gdkquartzwindow.h>
#include <gdk/gdkquartz.h>
#endif
#include <gst/video/videooverlay.h>
@ -2107,7 +2107,7 @@ realize_cb (GtkWidget * widget, PlaybackApp * app)
app->embed_xid = GDK_WINDOW_HWND (window);
g_print ("Window realize: video window HWND = %lu\n", app->embed_xid);
#elif defined (GDK_WINDOWING_QUARTZ)
app->embed_xid = gdk_quartz_window_get_nsview (window);
app->embed_xid = (guintptr) gdk_quartz_window_get_nsview (window);
g_print ("Window realize: video window NSView = %p\n", app->embed_xid);
#elif defined (GDK_WINDOWING_X11)
app->embed_xid = GDK_WINDOW_XID (window);