pidgin: 4e53d5de: Allow compile of V/V on OSX without X11...

qulogic at pidgin.im qulogic at pidgin.im
Thu Dec 22 04:41:23 EST 2011


----------------------------------------------------------------------
Revision: 4e53d5deecceb6da16aebdcf996c8e9869198f27
Parent:   8c46635caa338dd5b17c52f91567d10cf23c7af9
Author:   eion at robbmob.com
Date:     12/21/11 23:38:44
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4e53d5deecceb6da16aebdcf996c8e9869198f27

Changelog: 

Allow compile of V/V on OSX without X11. Patch by Eion Robb.

Fixes #14525.

Changes against parent 8c46635caa338dd5b17c52f91567d10cf23c7af9

  patched  pidgin/gtkmedia.c

-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c	fae07cea1c0fb4e5268841bb5e16b13e63840491
+++ pidgin/gtkmedia.c	324d93b426c8972d27307a8cc7a9e1d231df3ad2
@@ -40,6 +40,8 @@
 
 #ifdef _WIN32
 #include <gdk/gdkwin32.h>
+#elif defined(GDK_WINDOWING_QUARTZ)
+#include <gdk/gdkquartz.h>
 #endif
 
 #include <gst/interfaces/xoverlay.h>
@@ -560,6 +562,8 @@ realize_cb_cb(PidginMediaRealizeData *da
 		window_id = GDK_WINDOW_HWND(window);
 #elif defined(HAVE_X11)
 		window_id = GDK_WINDOW_XWINDOW(window);
+#elif defined(GDK_WINDOWING_QUARTZ)
+		window_id = (gulong) gdk_quartz_window_get_nsview(window);
 #else
 #		error "Unsupported windowing system"
 #endif
@@ -1082,6 +1086,10 @@ create_default_video_src(PurpleMedia *me
 		src = gst_element_factory_make("dshowvideosrc", NULL);
 	if (src == NULL)
 		src = gst_element_factory_make("autovideosrc", NULL);
+#elif defined(__APPLE__)
+	src = gst_element_factory_make("osxvideosrc", NULL);
+	if (src == NULL)
+		src = gst_element_factory_make("autovideosrc", NULL);
 #else
 	src = gst_element_factory_make("gconfvideosrc", NULL);
 	if (src == NULL)
@@ -1136,6 +1144,8 @@ create_default_audio_src(PurpleMedia *me
 		src = gst_element_factory_make("osssrc", NULL);
 	if (src == NULL)
 		src = gst_element_factory_make("dshowaudiosrc", NULL);
+	if (src == NULL)
+		src = gst_element_factory_make("osxaudiosrc", NULL);
 	if (src == NULL) {
 		purple_debug_error("gtkmedia", "Unable to find a suitable "
 				"element for the default audio source.\n");


More information about the Commits mailing list