emotion: work with older version of gstreamer.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 14 Oct 2011 04:01:43 +0000 (04:01 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 14 Oct 2011 04:01:43 +0000 (04:01 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/emotion@64058 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac
src/modules/gstreamer/emotion_sink.c

index bee5f81..624d02e 100644 (file)
@@ -256,23 +256,28 @@ fi
 ## Check if gstreamer X Overlay is available
 build_xoverlay="no"
 if test "x$enable_gstreamer" = "xyes"; then
-   save_CFLAGS=$CFLAGS
-   CFLAGS="$CFLAGS ${GSTREAMER_CFLAGS}"
-   AC_CHECK_HEADER([gst/interfaces/xoverlay.h],
-     [
-        AC_DEFINE(HAVE_XOVERLAY_H, 1, [Build with Gstreamer Xoverlay support])
-       build_xoverlay="yes"
-     ], [
-       build_xoverlay="no"
-     ]
-   )
-   CFLAGS=$save_CFLAGS
-   if test "x${build_xoverlay}" = "xyes"; then
-      PKG_CHECK_MODULES([GSTREAMER_INTERFACE],
+   PKG_CHECK_MODULES([GSTREAMER_INTERFACE],
        [ gstreamer-interfaces-0.10 >= 0.10.34 ],
        [ build_xoverlay="yes" ],
        [ build_xoverlay="no" ]
+   )
+   if test "x${build_xoverlay}" = "xyes"; then
+      save_CPPFLAGS=$CPPFLAGS
+      CPPFLAGS="$CPPFLAGS ${GSTREAMER_CFLAGS} ${GSTREAMER_INTERFACE_CFLAGS}"
+      AC_CHECK_HEADER([gst/interfaces/xoverlay.h],
+       [
+         AC_DEFINE(HAVE_XOVERLAY_H, 1, [Build with Gstreamer Xoverlay support])
+         build_xoverlay="yes"
+       ], [
+         build_xoverlay="no"
+       ]
       )
+      CPPFLAGS=$save_CPPFLAGS
+
+      save_LDFLAGS=$LDFLAGS
+      LDFLAGS="$LDFLAGS ${GSTREAMER_INTERFACES}"
+      AC_CHECK_LIB(gstinterfaces-0.10, gst_x_overlay_set_window_handle, AC_DEFINE(HAVE_X_OVERLAY_SET, 1, [Use gst_x_overlay_set_window_handle instead of old deprecated gst_x_overlay_set_xwindow_id]))
+      LDFLAGS=$sava_LDFLAGS
    fi
 fi
 
index ede6dcb..70d2605 100644 (file)
@@ -1214,7 +1214,11 @@ gstreamer_video_sink_new(Emotion_Gstreamer_Video *ev,
               {
                  unsigned int pos[2];
 
+#ifdef HAVE_X_OVERLAY_SET
                  gst_x_overlay_set_window_handle(GST_X_OVERLAY(xvsink), win);
+#else
+                 gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(xvsink), win);
+#endif
                  ev->win = win;
 
                  ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIDEO_PARENT, &parent, 1);