From: Enlightenment S. <no-...@en...> - 2011-10-14 04:01:50
|
Log: emotion: work with older version of gstreamer. Author: cedric Date: 2011-10-13 21:01:43 -0700 (Thu, 13 Oct 2011) New Revision: 64058 Trac: http://trac.enlightenment.org/e/changeset/64058 Modified: trunk/emotion/configure.ac trunk/emotion/src/modules/gstreamer/emotion_sink.c Modified: trunk/emotion/configure.ac =================================================================== --- trunk/emotion/configure.ac 2011-10-14 02:52:50 UTC (rev 64057) +++ trunk/emotion/configure.ac 2011-10-14 04:01:43 UTC (rev 64058) @@ -256,23 +256,28 @@ ## 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 Modified: trunk/emotion/src/modules/gstreamer/emotion_sink.c =================================================================== --- trunk/emotion/src/modules/gstreamer/emotion_sink.c 2011-10-14 02:52:50 UTC (rev 64057) +++ trunk/emotion/src/modules/gstreamer/emotion_sink.c 2011-10-14 04:01:43 UTC (rev 64058) @@ -1214,7 +1214,11 @@ { 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); |