# HG changeset patch # User eion@robbmob.com # Date 1324528724 0 # Node ID 0c23f5856806946934a07dfa92855ab142e77105 # Parent 544e6ed9d85073d51ce555027f445bed8765a5b7 Allow compile of V/V on OSX without X11. Patch by Eion Robb. Fixes #14525. committer: Elliott Sales de Andrade diff -r 544e6ed9d850 -r 0c23f5856806 pidgin/gtkmedia.c --- a/pidgin/gtkmedia.c Thu Dec 22 04:27:59 2011 +0000 +++ b/pidgin/gtkmedia.c Thu Dec 22 04:38:44 2011 +0000 @@ -40,6 +40,8 @@ #ifdef _WIN32 #include +#elif defined(GDK_WINDOWING_QUARTZ) +#include #endif #include @@ -560,6 +562,8 @@ 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 @@ 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 @@ 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");