]> git.saurik.com Git - wxWidgets.git/commitdiff
change configure to better detect gstreamer. Check create is valid in mediaplayer...
authorRyan Norton <wxprojects@comcast.net>
Sat, 12 Feb 2005 19:32:26 +0000 (19:32 +0000)
committerRyan Norton <wxprojects@comcast.net>
Sat, 12 Feb 2005 19:32:26 +0000 (19:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
samples/mediaplayer/mediaplayer.cpp
src/unix/mediactrl.cpp

index 44b083fcc2426553944f6b5111310285f58fa818..198392c8b1570e078939da89270e619ea4efa5f5 100755 (executable)
--- a/configure
+++ b/configure
@@ -313,7 +313,7 @@ ac_includes_default="\
 #endif"
 
 ac_subdirs_all="$ac_subdirs_all src/expat"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CXX CXXFLAGS ac_ct_CXX RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STRIP IF_GNU_MAKE LN_S CXXCPP subdirs PKG_CONFIG GTK_CFLAGS GTK_LIBS GTK_CONFIG X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS PANGOX_CFLAGS PANGOX_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS PANGOXFT_CFLAGS PANGOXFT_LIBS RESCOMP DEREZ SETFILE LIBICONV EXTRALIBS_ESD SDL_CONFIG SDL_CFLAGS SDL_LIBS LIBGNOMEPRINTUI_CFLAGS LIBGNOMEPRINTUI_LIBS CORE_BASE_LIBS CORE_GUI_LIBS wxUSE_ZLIB wxUSE_REGEX wxUSE_EXPAT wxUSE_ODBC wxUSE_LIBJPEG wxUSE_LIBPNG wxUSE_LIBTIFF VENDOR OFFICIAL_BUILD WX_FLAVOUR WX_LIB_FLAVOUR WXUNIV MONOLITHIC USE_PLUGINS EXTRALIBS EXTRALIBS_XML EXTRALIBS_HTML EXTRALIBS_ODBC EXTRALIBS_GUI EXTRALIBS_OPENGL EXTRALIBS_SDL WITH_PLUGIN_SDL EXTRALIBS_GNOMEPRINT UNICODE BUILD DEBUG_INFO DEBUG_FLAG TOOLKIT_LOWERCASE TOOLKIT_VERSION SAMPLES_RPATH_FLAG SAMPLES_RPATH_POSTLINK HOST_SUFFIX CPPUNIT_CFLAGS CPPUNIT_LIBS SET_MAKE MAKE_SET ac_ct_AR ac_ct_STRIP NM ac_ct_NM INSTALL_DIR LDFLAGS_GUI PLATFORM_UNIX PLATFORM_WIN32 PLATFORM_MSDOS PLATFORM_MAC PLATFORM_MACOS PLATFORM_MACOSX PLATFORM_OS2 PLATFORM_BEOS SO_SUFFIX SO_SUFFIX_MODULE DLLIMP_SUFFIX LIBPREFIX LIBEXT DLLPREFIX DLLPREFIX_MODULE AIX_CXX_LD SHARED_LD_CC SHARED_LD_CXX SHARED_LD_MODULE_CC SHARED_LD_MODULE_CXX PIC_FLAG USE_SOVERSION USE_SOVERLINUX USE_SOVERSOLARIS USE_MACVERSION USE_SOSYMLINKS SONAME_FLAG DEPS_TRACKING GCC_PCH COND_BUILD_DEBUG COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT COND_BUILD_DEBUG_DEBUG_INFO_DEFAULT COND_BUILD_DEBUG_UNICODE_0 COND_BUILD_DEBUG_UNICODE_1 COND_BUILD_RELEASE COND_BUILD_RELEASE_DEBUG_INFO_DEFAULT COND_BUILD_RELEASE_UNICODE_0 COND_BUILD_RELEASE_UNICODE_1 COND_DEBUG_FLAG_1 COND_DEBUG_INFO_0 COND_DEBUG_INFO_1 COND_DEPS_TRACKING_0 COND_DEPS_TRACKING_1 COND_GCC_PCH_1 COND_MONOLITHIC_0 COND_MONOLITHIC_0_SHARED_0 COND_MONOLITHIC_0_SHARED_0_USE_GUI_1 COND_MONOLITHIC_0_SHARED_0_USE_GUI_1_USE_HTML_1 COND_MONOLITHIC_0_SHARED_0_USE_GUI_1_USE_ODBC_1 COND_MONOLITHIC_0_SHARED_0_USE_ODBC_1 COND_MONOLITHIC_0_SHARED_0_USE_XRC_1 COND_MONOLITHIC_0_SHARED_1 COND_MONOLITHIC_0_SHARED_1_USE_GUI_1 COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1 COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_ODBC_1 COND_MONOLITHIC_0_SHARED_1_USE_ODBC_1 COND_MONOLITHIC_0_SHARED_1_USE_XRC_1 COND_MONOLITHIC_0_USE_ODBC_1 COND_MONOLITHIC_1 COND_MONOLITHIC_1_SHARED_0 COND_MONOLITHIC_1_SHARED_1 COND_OFFICIAL_BUILD_0_PLATFORM_WIN32_1 COND_OFFICIAL_BUILD_1_PLATFORM_WIN32_1 COND_PLATFORM_MACOSX_0_USE_SOVERSION_1 COND_PLATFORM_MACOSX_1 COND_PLATFORM_MACOSX_1_TOOLKIT_ COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA COND_PLATFORM_MACOSX_1_TOOLKIT_GTK COND_PLATFORM_MACOSX_1_TOOLKIT_MAC COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1 COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0 COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF COND_PLATFORM_MACOSX_1_TOOLKIT_X11 COND_PLATFORM_MACOSX_1_USE_GUI_1 COND_PLATFORM_MACOSX_1_USE_SOVERSION_1 COND_PLATFORM_MACOS_1 COND_PLATFORM_MAC_1 COND_PLATFORM_OS2_1 COND_PLATFORM_UNIX_0 COND_PLATFORM_UNIX_1 COND_PLATFORM_UNIX_1_USE_GUI_1 COND_PLATFORM_UNIX_1_USE_PLUGINS_0 COND_PLATFORM_WIN32_0 COND_PLATFORM_WIN32_1 COND_SHARED_0 COND_SHARED_0_TOOLKIT_MAC_WXUNIV_0 COND_SHARED_0_TOOLKIT_MSW_WXUNIV_0 COND_SHARED_0_TOOLKIT_PM_WXUNIV_0 COND_SHARED_0_USE_GUI_1_USE_OPENGL_1 COND_SHARED_0_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN COND_SHARED_0_USE_GUI_1_WXUSE_LIBPNG_BUILTIN COND_SHARED_0_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN COND_SHARED_0_WXUSE_EXPAT_BUILTIN COND_SHARED_0_WXUSE_ODBC_BUILTIN COND_SHARED_0_WXUSE_REGEX_BUILTIN COND_SHARED_0_WXUSE_ZLIB_BUILTIN COND_SHARED_1 COND_SHARED_1_USE_GUI_1_USE_OPENGL_1 COND_TOOLKIT_ COND_TOOLKIT_COCOA COND_TOOLKIT_COCOA_USE_GUI_1 COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_GTK COND_TOOLKIT_GTK_USE_GUI_1 COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_MAC COND_TOOLKIT_MAC_USE_GUI_1 COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_MGL COND_TOOLKIT_MGL_USE_GUI_1 COND_TOOLKIT_MOTIF COND_TOOLKIT_MOTIF_USE_GUI_1 COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_MSW COND_TOOLKIT_MSW_USE_GUI_1 COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_PM COND_TOOLKIT_PM_USE_GUI_1 COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_WINCE COND_TOOLKIT_WINCE_USE_GUI_1 COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_X11 COND_TOOLKIT_X11_USE_GUI_1 COND_UNICODE_1 COND_USE_EXCEPTIONS_0 COND_USE_EXCEPTIONS_1 COND_USE_GUI_0 COND_USE_GUI_1 COND_USE_GUI_1_WXUNIV_0 COND_USE_GUI_1_WXUNIV_1 COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN COND_USE_ODBC_1 COND_USE_OPENGL_1 COND_USE_PLUGINS_0 COND_USE_SOSYMLINKS_1 COND_USE_SOVERLINUX_1 COND_USE_SOVERSION_0 COND_USE_SOVERSOLARIS_1 COND_USE_XRC_1 COND_WITH_PLUGIN_SDL_1 COND_WXUNIV_0 COND_WXUNIV_1 COND_WXUSE_EXPAT_BUILTIN COND_WXUSE_LIBJPEG_BUILTIN COND_WXUSE_LIBPNG_BUILTIN COND_WXUSE_LIBTIFF_BUILTIN COND_WXUSE_ODBC_BUILTIN COND_WXUSE_REGEX_BUILTIN COND_WXUSE_ZLIB_BUILTIN SHARED WX_LIBRARY_BASENAME_NOGUI WX_LIBRARY_BASENAME_GUI WXDEBUG_DEFINE USE_GUI AFMINSTALL WIN32INSTALL TOOLKIT TOOLKIT_DIR TOOLCHAIN_NAME TOOLCHAIN_FULLNAME TOOLCHAIN_DEFS TOOLCHAIN_DLL_DEFS cross_compiling WIDGET_SET WX_RELEASE WX_VERSION WX_SUBVERSION WX_CHARTYPE WX_DEBUGTYPE WXCONFIG_EXTRALIBS WXCONFIG_INCLUDE WXCONFIG_RPATH WXCONFIG_LDFLAGS_GUI WX_LARGEFILE_FLAGS GCC_PRAGMA_FLAGS CODE_GEN_FLAGS CODE_GEN_FLAGS_CXX EXE_LINKER GUIDIST DISTDIR SAMPLES_SUBDIRS LDFLAGS_GL OPENGL_LIBS DMALLOC_LIBS WX_VERSION_TAG RESFLAGS RESPROGRAMOBJ WX_RESOURCES_MACOSX_ASCII WX_RESOURCES_MACOSX_DATA LIBWXMACRES MACRESCOMP MACSETFILE MACRESWXCONFIG GCC DLLTOOL CPPUNIT_CONFIG LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CXX CXXFLAGS ac_ct_CXX RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STRIP IF_GNU_MAKE LN_S CXXCPP subdirs PKG_CONFIG GTK_CFLAGS GTK_LIBS GTK_CONFIG X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS PANGOX_CFLAGS PANGOX_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS PANGOXFT_CFLAGS PANGOXFT_LIBS RESCOMP DEREZ SETFILE LIBICONV EXTRALIBS_ESD SDL_CONFIG SDL_CFLAGS SDL_LIBS LIBGNOMEPRINTUI_CFLAGS LIBGNOMEPRINTUI_LIBS GSTREAMER_CFLAGS GSTREAMER_LIBS GST_INSPECT CORE_BASE_LIBS CORE_GUI_LIBS wxUSE_ZLIB wxUSE_REGEX wxUSE_EXPAT wxUSE_ODBC wxUSE_LIBJPEG wxUSE_LIBPNG wxUSE_LIBTIFF VENDOR OFFICIAL_BUILD WX_FLAVOUR WX_LIB_FLAVOUR WXUNIV MONOLITHIC USE_PLUGINS EXTRALIBS EXTRALIBS_XML EXTRALIBS_HTML EXTRALIBS_ODBC EXTRALIBS_GUI EXTRALIBS_OPENGL EXTRALIBS_SDL WITH_PLUGIN_SDL EXTRALIBS_GNOMEPRINT UNICODE BUILD DEBUG_INFO DEBUG_FLAG TOOLKIT_LOWERCASE TOOLKIT_VERSION SAMPLES_RPATH_FLAG SAMPLES_RPATH_POSTLINK HOST_SUFFIX CPPUNIT_CFLAGS CPPUNIT_LIBS SET_MAKE MAKE_SET ac_ct_AR ac_ct_STRIP NM ac_ct_NM INSTALL_DIR LDFLAGS_GUI PLATFORM_UNIX PLATFORM_WIN32 PLATFORM_MSDOS PLATFORM_MAC PLATFORM_MACOS PLATFORM_MACOSX PLATFORM_OS2 PLATFORM_BEOS SO_SUFFIX SO_SUFFIX_MODULE DLLIMP_SUFFIX LIBPREFIX LIBEXT DLLPREFIX DLLPREFIX_MODULE AIX_CXX_LD SHARED_LD_CC SHARED_LD_CXX SHARED_LD_MODULE_CC SHARED_LD_MODULE_CXX PIC_FLAG USE_SOVERSION USE_SOVERLINUX USE_SOVERSOLARIS USE_MACVERSION USE_SOSYMLINKS SONAME_FLAG DEPS_TRACKING GCC_PCH COND_BUILD_DEBUG COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT COND_BUILD_DEBUG_DEBUG_INFO_DEFAULT COND_BUILD_DEBUG_UNICODE_0 COND_BUILD_DEBUG_UNICODE_1 COND_BUILD_RELEASE COND_BUILD_RELEASE_DEBUG_INFO_DEFAULT COND_BUILD_RELEASE_UNICODE_0 COND_BUILD_RELEASE_UNICODE_1 COND_DEBUG_FLAG_1 COND_DEBUG_INFO_0 COND_DEBUG_INFO_1 COND_DEPS_TRACKING_0 COND_DEPS_TRACKING_1 COND_GCC_PCH_1 COND_MONOLITHIC_0 COND_MONOLITHIC_0_SHARED_0 COND_MONOLITHIC_0_SHARED_0_USE_GUI_1 COND_MONOLITHIC_0_SHARED_0_USE_GUI_1_USE_HTML_1 COND_MONOLITHIC_0_SHARED_0_USE_GUI_1_USE_ODBC_1 COND_MONOLITHIC_0_SHARED_0_USE_ODBC_1 COND_MONOLITHIC_0_SHARED_0_USE_XRC_1 COND_MONOLITHIC_0_SHARED_1 COND_MONOLITHIC_0_SHARED_1_USE_GUI_1 COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1 COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_ODBC_1 COND_MONOLITHIC_0_SHARED_1_USE_ODBC_1 COND_MONOLITHIC_0_SHARED_1_USE_XRC_1 COND_MONOLITHIC_0_USE_ODBC_1 COND_MONOLITHIC_1 COND_MONOLITHIC_1_SHARED_0 COND_MONOLITHIC_1_SHARED_1 COND_OFFICIAL_BUILD_0_PLATFORM_WIN32_1 COND_OFFICIAL_BUILD_1_PLATFORM_WIN32_1 COND_PLATFORM_MACOSX_0_USE_SOVERSION_1 COND_PLATFORM_MACOSX_1 COND_PLATFORM_MACOSX_1_TOOLKIT_ COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA COND_PLATFORM_MACOSX_1_TOOLKIT_GTK COND_PLATFORM_MACOSX_1_TOOLKIT_MAC COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1 COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0 COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF COND_PLATFORM_MACOSX_1_TOOLKIT_X11 COND_PLATFORM_MACOSX_1_USE_GUI_1 COND_PLATFORM_MACOSX_1_USE_SOVERSION_1 COND_PLATFORM_MACOS_1 COND_PLATFORM_MAC_1 COND_PLATFORM_OS2_1 COND_PLATFORM_UNIX_0 COND_PLATFORM_UNIX_1 COND_PLATFORM_UNIX_1_USE_GUI_1 COND_PLATFORM_UNIX_1_USE_PLUGINS_0 COND_PLATFORM_WIN32_0 COND_PLATFORM_WIN32_1 COND_SHARED_0 COND_SHARED_0_TOOLKIT_MAC_WXUNIV_0 COND_SHARED_0_TOOLKIT_MSW_WXUNIV_0 COND_SHARED_0_TOOLKIT_PM_WXUNIV_0 COND_SHARED_0_USE_GUI_1_USE_OPENGL_1 COND_SHARED_0_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN COND_SHARED_0_USE_GUI_1_WXUSE_LIBPNG_BUILTIN COND_SHARED_0_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN COND_SHARED_0_WXUSE_EXPAT_BUILTIN COND_SHARED_0_WXUSE_ODBC_BUILTIN COND_SHARED_0_WXUSE_REGEX_BUILTIN COND_SHARED_0_WXUSE_ZLIB_BUILTIN COND_SHARED_1 COND_SHARED_1_USE_GUI_1_USE_OPENGL_1 COND_TOOLKIT_ COND_TOOLKIT_COCOA COND_TOOLKIT_COCOA_USE_GUI_1 COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_GTK COND_TOOLKIT_GTK_USE_GUI_1 COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_MAC COND_TOOLKIT_MAC_USE_GUI_1 COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_MGL COND_TOOLKIT_MGL_USE_GUI_1 COND_TOOLKIT_MOTIF COND_TOOLKIT_MOTIF_USE_GUI_1 COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_MSW COND_TOOLKIT_MSW_USE_GUI_1 COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_PM COND_TOOLKIT_PM_USE_GUI_1 COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_WINCE COND_TOOLKIT_WINCE_USE_GUI_1 COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0 COND_TOOLKIT_X11 COND_TOOLKIT_X11_USE_GUI_1 COND_UNICODE_1 COND_USE_EXCEPTIONS_0 COND_USE_EXCEPTIONS_1 COND_USE_GUI_0 COND_USE_GUI_1 COND_USE_GUI_1_WXUNIV_0 COND_USE_GUI_1_WXUNIV_1 COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN COND_USE_ODBC_1 COND_USE_OPENGL_1 COND_USE_PLUGINS_0 COND_USE_SOSYMLINKS_1 COND_USE_SOVERLINUX_1 COND_USE_SOVERSION_0 COND_USE_SOVERSOLARIS_1 COND_USE_XRC_1 COND_WITH_PLUGIN_SDL_1 COND_WXUNIV_0 COND_WXUNIV_1 COND_WXUSE_EXPAT_BUILTIN COND_WXUSE_LIBJPEG_BUILTIN COND_WXUSE_LIBPNG_BUILTIN COND_WXUSE_LIBTIFF_BUILTIN COND_WXUSE_ODBC_BUILTIN COND_WXUSE_REGEX_BUILTIN COND_WXUSE_ZLIB_BUILTIN SHARED WX_LIBRARY_BASENAME_NOGUI WX_LIBRARY_BASENAME_GUI WXDEBUG_DEFINE USE_GUI AFMINSTALL WIN32INSTALL TOOLKIT TOOLKIT_DIR TOOLCHAIN_NAME TOOLCHAIN_FULLNAME TOOLCHAIN_DEFS TOOLCHAIN_DLL_DEFS cross_compiling WIDGET_SET WX_RELEASE WX_VERSION WX_SUBVERSION WX_CHARTYPE WX_DEBUGTYPE WXCONFIG_EXTRALIBS WXCONFIG_INCLUDE WXCONFIG_RPATH WXCONFIG_LDFLAGS_GUI WX_LARGEFILE_FLAGS GCC_PRAGMA_FLAGS CODE_GEN_FLAGS CODE_GEN_FLAGS_CXX EXE_LINKER GUIDIST DISTDIR SAMPLES_SUBDIRS LDFLAGS_GL OPENGL_LIBS DMALLOC_LIBS WX_VERSION_TAG RESFLAGS RESPROGRAMOBJ WX_RESOURCES_MACOSX_ASCII WX_RESOURCES_MACOSX_DATA LIBWXMACRES MACRESCOMP MACSETFILE MACRESWXCONFIG GCC DLLTOOL CPPUNIT_CONFIG LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -20801,11 +20801,6 @@ SEARCH_INCLUDE="\
     /usr/include/wine         \
     /usr/local/include/wine   \
                               \
-    /usr/include/gstreamer-0.8 \
-    /usr/local/include/gstreamer-0.8 \
-    /usr/include/libxml2       \
-    /usr/local/include/libxml2 \
-                              \
     /usr/unsupported/include  \
     /usr/athena/include       \
     /usr/local/x11r5/include  \
@@ -38595,69 +38590,184 @@ _ACEOF
                 if test "$wxUSE_GTK" = 1; then
         wxUSE_GSTREAMER="yes"
 
-                                echo "$as_me:$LINENO: checking for libxml2" >&5
-echo $ECHO_N "checking for libxml2... $ECHO_C" >&6
 
-ac_find_libraries=
-for ac_dir in $SEARCH_LIB /usr/lib;
-  do
-    for ac_extension in a so sl dylib; do
-      if test -f "$ac_dir/libxml2.$ac_extension"; then
-        ac_find_libraries=$ac_dir
-        break 2
-      fi
-    done
-  done
+  succeeded=no
 
-        if test "$ac_find_libraries" != "" ; then
-                                                            echo "$as_me:$LINENO: result: yes" >&5
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for gstreamer-0.8" >&5
+echo $ECHO_N "checking for gstreamer-0.8... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "gstreamer-0.8" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-            echo "$as_me:$LINENO: checking for libxml2 headers" >&5
-echo $ECHO_N "checking for libxml2 headers... $ECHO_C" >&6
+            succeeded=yes
 
-ac_find_includes=
-for ac_dir in $SEARCH_INCLUDE /usr/include;
-  do
-    if test -f "$ac_dir/libxml/xmlstring.h"; then
-      ac_find_includes=$ac_dir
-      break
-    fi
-  done
+            echo "$as_me:$LINENO: checking GSTREAMER_CFLAGS" >&5
+echo $ECHO_N "checking GSTREAMER_CFLAGS... $ECHO_C" >&6
+            GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-0.8"`
+            echo "$as_me:$LINENO: result: $GSTREAMER_CFLAGS" >&5
+echo "${ECHO_T}$GSTREAMER_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking GSTREAMER_LIBS" >&5
+echo $ECHO_N "checking GSTREAMER_LIBS... $ECHO_C" >&6
+            GSTREAMER_LIBS=`$PKG_CONFIG --libs "gstreamer-0.8"`
+            echo "$as_me:$LINENO: result: $GSTREAMER_LIBS" >&5
+echo "${ECHO_T}$GSTREAMER_LIBS" >&6
+        else
+            GSTREAMER_CFLAGS=""
+            GSTREAMER_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            GSTREAMER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-0.8"`
 
-            if test "$ac_find_includes" != "" ; then
-                echo "$as_me:$LINENO: result: found in $ac_find_includes" >&5
-echo "${ECHO_T}found in $ac_find_includes" >&6
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+
+            CPPFLAGS="$CPPFLAGS $GSTREAMER_CFLAGS"
+            LIBS="$LIBS $GSTREAMER_LIBS -lgstplay-0.8"
 
-    if test "x$ac_find_includes" = "x/usr/include"; then
-    ac_path_to_include=""
   else
-    echo "$TOOLKIT_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null
-    result=$?
-    if test $result = 0; then
-      ac_path_to_include=""
-    else
-      ac_path_to_include=" -I$ac_find_includes"
-    fi
+
+            { echo "$as_me:$LINENO: WARNING: GStreamer installation not found" >&5
+echo "$as_me: WARNING: GStreamer installation not found" >&2;}
+            wxUSE_GSTREAMER="no"
+
+  fi
+
+
+
+
+
+        if test "x$GST_INSPECT" == "x"; then
+            # Extract the first word of "gst-inspect", so it can be a program name with args.
+set dummy gst-inspect; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GST_INSPECT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$GST_INSPECT"; then
+  ac_cv_prog_GST_INSPECT="$GST_INSPECT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_GST_INSPECT="gst-inspect"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+done
+
+fi
+fi
+GST_INSPECT=$ac_cv_prog_GST_INSPECT
+if test -n "$GST_INSPECT"; then
+  echo "$as_me:$LINENO: result: $GST_INSPECT" >&5
+echo "${ECHO_T}$GST_INSPECT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+        fi
+
+        if test "x$GST_INSPECT" != "x"; then
+            echo "$as_me:$LINENO: checking GStreamer element xvimagesink" >&5
+echo $ECHO_N "checking GStreamer element xvimagesink... $ECHO_C" >&6
+            if  $GST_INSPECT xvimagesink > /dev/null 2> /dev/null ; then
+            echo "$as_me:$LINENO: result: found." >&5
+echo "${ECHO_T}found." >&6
 
-                TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
             else
-                cat >conftest.$ac_ext <<_ACEOF
+            echo "$as_me:$LINENO: result: not found." >&5
+echo "${ECHO_T}not found." >&6
+
+                            wxUSE_GSTREAMER="no"
+                            { echo "$as_me:$LINENO: WARNING: x video sink not found - cannot use GStreamer" >&5
+echo "$as_me: WARNING: x video sink not found - cannot use GStreamer" >&2;}
+
+            fi
+        fi
+
+
+                                echo "$as_me:$LINENO: checking for gst/xoverlay/xoverlay.h" >&5
+echo $ECHO_N "checking for gst/xoverlay/xoverlay.h... $ECHO_C" >&6
+if test "${ac_cv_header_gst_xoverlay_xoverlay_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <gst/gst.h>
 
-                        #include <libxml/xmlstring.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+#include <gst/xoverlay/xoverlay.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -38681,39 +38791,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: found in default search path" >&5
-echo "${ECHO_T}found in default search path" >&6
+  ac_cv_header_gst_xoverlay_xoverlay_h=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-wxUSE_GSTREAMER="no"
+ac_cv_header_gst_xoverlay_xoverlay_h=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-            fi
-        else
-                                                wxUSE_GSTREAMER="no"
-        fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gst_xoverlay_xoverlay_h" >&5
+echo "${ECHO_T}$ac_cv_header_gst_xoverlay_xoverlay_h" >&6
+if test $ac_cv_header_gst_xoverlay_xoverlay_h = yes; then
+  :
+else
 
-        if test "$wxUSE_GSTREAMER" = "yes"; then
-                                                echo "$as_me:$LINENO: checking for gstreamer 0.8" >&5
-echo $ECHO_N "checking for gstreamer 0.8... $ECHO_C" >&6
+                            wxUSE_GSTREAMER="no"
+                            { echo "$as_me:$LINENO: WARNING: xoverlay header not found, cannot use GStreamer" >&5
+echo "$as_me: WARNING: xoverlay header not found, cannot use GStreamer" >&2;}
 
-ac_find_libraries=
-for ac_dir in $SEARCH_LIB /usr/lib;
-  do
-    for ac_extension in a so sl dylib; do
-      if test -f "$ac_dir/libgstreamer-0.8.$ac_extension"; then
-        ac_find_libraries=$ac_dir
-        break 2
-      fi
-    done
-  done
+fi
 
-            if test "$ac_find_libraries" != "" ; then
-                                                                echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-                echo "$as_me:$LINENO: checking for gstplay 0.8" >&5
+
+
+        echo "$as_me:$LINENO: checking for gstplay 0.8" >&5
 echo $ECHO_N "checking for gstplay 0.8... $ECHO_C" >&6
 
 ac_find_libraries=
@@ -38727,126 +38828,23 @@ for ac_dir in $SEARCH_LIB /usr/lib;
     done
   done
 
-                if test "$ac_find_libraries" != "" ; then
-                                                                                echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-                    echo "$as_me:$LINENO: checking for gstinterfaces 0.8" >&5
-echo $ECHO_N "checking for gstinterfaces 0.8... $ECHO_C" >&6
 
-ac_find_libraries=
-for ac_dir in $SEARCH_LIB /usr/lib;
-  do
-    for ac_extension in a so sl dylib; do
-      if test -f "$ac_dir/libgstinterfaces-0.8.$ac_extension"; then
-        ac_find_libraries=$ac_dir
-        break 2
-      fi
-    done
-  done
-
-                    if test "$ac_find_libraries" != "" ; then
-                                                                                                                        echo "$as_me:$LINENO: result: yes" >&5
+        if test "$ac_find_libraries" = "" ; then
+            echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+            wxUSE_GSTREAMER="no"
+        else
+            echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-                        echo "$as_me:$LINENO: checking for GStreamer headers" >&5
-echo $ECHO_N "checking for GStreamer headers... $ECHO_C" >&6
-
-ac_find_includes=
-for ac_dir in $SEARCH_INCLUDE /usr/include;
-  do
-    if test -f "$ac_dir/gst/gst.h"; then
-      ac_find_includes=$ac_dir
-      break
-    fi
-  done
-
-                        if test "$ac_find_includes" != "" ; then
-                            echo "$as_me:$LINENO: result: found in $ac_find_includes" >&5
-echo "${ECHO_T}found in $ac_find_includes" >&6
-
-    if test "x$ac_find_includes" = "x/usr/include"; then
-    ac_path_to_include=""
-  else
-    echo "$TOOLKIT_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null
-    result=$?
-    if test $result = 0; then
-      ac_path_to_include=""
-    else
-      ac_path_to_include=" -I$ac_find_includes"
-    fi
-  fi
-
-                            TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
-                        else
-                            cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-                                    #include <gst/gst.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: found in default search path" >&5
-echo "${ECHO_T}found in default search path" >&6
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-wxUSE_GSTREAMER="no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-                        fi
-                    else
-                                                                                                wxUSE_GSTREAMER="no"
-                    fi
-                else
-                                                                                wxUSE_GSTREAMER="no"
-                fi
-            else
-                                                                wxUSE_GSTREAMER="no"
-            fi
+        fi
 
-                                                            if test "$wxUSE_GSTREAMER" = "yes"; then
-                                                                                                                cat >>confdefs.h <<\_ACEOF
+        if test "$wxUSE_GSTREAMER" = "yes"; then
+            cat >>confdefs.h <<\_ACEOF
 #define wxUSE_GSTREAMER 1
 _ACEOF
 
-                LIBS="$LIBS -lgstreamer-0.8 -lgstplay-0.8"
-                LIBS="$LIBS -lgstinterfaces-0.8 -lxml2"
-            else
-                                                                                echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-            fi
+            echo "$as_me:$LINENO: result: GStreamer detection successful" >&5
+echo "${ECHO_T}GStreamer detection successful" >&6
         fi
     fi
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer"
@@ -43206,6 +43204,9 @@ s,@SDL_CFLAGS@,$SDL_CFLAGS,;t t
 s,@SDL_LIBS@,$SDL_LIBS,;t t
 s,@LIBGNOMEPRINTUI_CFLAGS@,$LIBGNOMEPRINTUI_CFLAGS,;t t
 s,@LIBGNOMEPRINTUI_LIBS@,$LIBGNOMEPRINTUI_LIBS,;t t
+s,@GSTREAMER_CFLAGS@,$GSTREAMER_CFLAGS,;t t
+s,@GSTREAMER_LIBS@,$GSTREAMER_LIBS,;t t
+s,@GST_INSPECT@,$GST_INSPECT,;t t
 s,@CORE_BASE_LIBS@,$CORE_BASE_LIBS,;t t
 s,@CORE_GUI_LIBS@,$CORE_GUI_LIBS,;t t
 s,@wxUSE_ZLIB@,$wxUSE_ZLIB,;t t
index f02789d457becb3383a1088fce10e2451d2efe47..b0548d4a74fb0eb0b4c1bfb970993546f21150ec 100644 (file)
@@ -1982,11 +1982,6 @@ SEARCH_INCLUDE="\
     /usr/include/wine         \
     /usr/local/include/wine   \
                               \
-    /usr/include/gstreamer-0.8 \
-    /usr/local/include/gstreamer-0.8 \
-    /usr/include/libxml2       \
-    /usr/local/include/libxml2 \
-                              \
     /usr/unsupported/include  \
     /usr/athena/include       \
     /usr/local/x11r5/include  \
@@ -6004,120 +5999,76 @@ if test "$wxUSE_MEDIACTRL" = "yes"; then
     if test "$wxUSE_GTK" = 1; then
         wxUSE_GSTREAMER="yes"
         
-        dnl ---------------------------------------------------------------
-        dnl check for libxml2 lib
-        dnl ---------------------------------------------------------------
-        AC_MSG_CHECKING([for libxml2])
-        WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],xml2)
-        if test "$ac_find_libraries" != "" ; then
-            dnl -----------------------------------------------------------
-            dnl Check for libxml2's xmlstring.h header
-            dnl Break out if not found
-            dnl -----------------------------------------------------------                
-            AC_MSG_RESULT([yes])
-            AC_MSG_CHECKING(for libxml2 headers)
-            WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, libxml/xmlstring.h)
-            if test "$ac_find_includes" != "" ; then
-                AC_MSG_RESULT(found in $ac_find_includes)
-                WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
-                TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
+        dnl -------------------------------------------------------------------
+        dnl Test for gstreamer module from pkg-config
+        dnl -------------------------------------------------------------------
+        PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.8,
+        [
+            CPPFLAGS="$CPPFLAGS $GSTREAMER_CFLAGS"
+            LIBS="$LIBS $GSTREAMER_LIBS -lgstplay-0.8"
+        ],
+        [
+            AC_MSG_WARN([GStreamer installation not found])
+            wxUSE_GSTREAMER="no"
+        ])
+        
+        dnl -------------------------------------------------------------------
+        dnl Perform a check for a GStreamer element using gst-inspect
+        dnl Thomas Vander Stichele <thomas at apestaart dot org>
+        dnl Last modification: 25/01/2005
+        dnl
+        dnl AM_GST_ELEMENT_CHECK(ELEMENT-NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
+        dnl -------------------------------------------------------------------
+        AC_DEFUN([AM_GST_ELEMENT_CHECK],
+        [
+        if test "x$GST_INSPECT" == "x"; then
+            AC_CHECK_PROG(GST_INSPECT, gst-inspect, gst-inspect, [])
+        fi
+        
+        if test "x$GST_INSPECT" != "x"; then
+            AC_MSG_CHECKING(GStreamer element $1)
+            if [ $GST_INSPECT $1 > /dev/null 2> /dev/null ]; then
+            AC_MSG_RESULT(found.)
+            $2
             else
-                AC_TRY_COMPILE(
-                    [
-                        #include <libxml/xmlstring.h>
-                    ],
-                    [],
-                    [AC_MSG_RESULT(found in default search path)],
-                    [wxUSE_GSTREAMER="no"])
+            AC_MSG_RESULT(not found.)
+            $3
             fi
-        else
-            dnl -----------------------------------------------------------
-            dnl libxml2 lib not found - break out
-            dnl -----------------------------------------------------------
+        fi
+        ])
+        
+        dnl -------------------------------------------------------------------
+        dnl Test for x video sink (video useless without)
+        dnl -------------------------------------------------------------------
+        AM_GST_ELEMENT_CHECK(xvimagesink,[], 
+                        [
+                            wxUSE_GSTREAMER="no"
+                            AC_MSG_WARN([x video sink not found - cannot use GStreamer])
+                        ])
+                            
+        dnl -------------------------------------------------------------------
+        dnl Check for gstplay-0.8 lib and corresponding x overlay header
+        dnl -------------------------------------------------------------------        
+        AC_CHECK_HEADER(gst/xoverlay/xoverlay.h, [], 
+                        [
+                            wxUSE_GSTREAMER="no"
+                            AC_MSG_WARN([xoverlay header not found, cannot use GStreamer])
+                        ],
+                        [#include <gst/gst.h>])
+        
+        AC_MSG_CHECKING([for gstplay 0.8])
+        WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],gstplay-0.8)           
+        
+        if test "$ac_find_libraries" = "" ; then
+            AC_MSG_RESULT([no])
             wxUSE_GSTREAMER="no"
+        else
+            AC_MSG_RESULT([yes])        
         fi
-            
+        
         if test "$wxUSE_GSTREAMER" = "yes"; then
-            dnl -----------------------------------------------------------
-            dnl    test for gstreamer main lib
-            dnl -----------------------------------------------------------
-            AC_MSG_CHECKING([for gstreamer 0.8])
-            WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],gstreamer-0.8)
-            if test "$ac_find_libraries" != "" ; then                
-                dnl -------------------------------------------------------
-                dnl Check for GStreamer gstplay lib
-                dnl -------------------------------------------------------                
-                AC_MSG_RESULT([yes])
-                AC_MSG_CHECKING([for gstplay 0.8])
-                WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],gstplay-0.8)                    
-                if test "$ac_find_libraries" != "" ; then
-                    dnl ---------------------------------------------------
-                    dnl gstplay lib found - check for gstinterfaces lib
-                    dnl ---------------------------------------------------
-                    AC_MSG_RESULT([yes])
-                    AC_MSG_CHECKING([for gstinterfaces 0.8])
-                    WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],gstinterfaces-0.8)
-                    if test "$ac_find_libraries" != "" ; then
-                        dnl -----------------------------------------------
-                        dnl GStreamer libs found - check for gstreamer 
-                        dnl include path and header
-                        dnl -----------------------------------------------
-                        AC_MSG_RESULT([yes])
-                        AC_MSG_CHECKING(for GStreamer headers)
-                        WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, gst/gst.h)
-                        if test "$ac_find_includes" != "" ; then
-                            AC_MSG_RESULT(found in $ac_find_includes)
-                            WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
-                            TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
-                        else
-                            AC_TRY_COMPILE(
-                                [
-                                    #include <gst/gst.h>
-                                ],
-                                [],
-                                [AC_MSG_RESULT(found in default search path)],
-                                [wxUSE_GSTREAMER="no"])
-                        fi
-                    else
-                        dnl -----------------------------------------------
-                        dnl gstinterfaces lib not found - break out
-                        dnl -----------------------------------------------
-                        wxUSE_GSTREAMER="no"
-                    fi
-                else
-                    dnl ---------------------------------------------------
-                    dnl gstplay lib not found - break out
-                    dnl --------------------------------------------------- 
-                    wxUSE_GSTREAMER="no"
-                fi    
-            else 
-                dnl -------------------------------------------------------
-                dnl Main GStreamer lib not found - break out
-                dnl -------------------------------------------------------                
-                wxUSE_GSTREAMER="no"
-            fi    
-
-            dnl -----------------------------------------------------------
-            dnl Check if everything went ok - if not then print no 
-            dnl and break out
-            dnl -----------------------------------------------------------                
-            if test "$wxUSE_GSTREAMER" = "yes"; then
-                dnl -------------------------------------------------------
-                dnl Success!  Define wxUSE_GSTREAMER to 1 so that 
-                dnl src/unix/mediactrl.cpp will build with GStreamer 
-                dnl enabled, and add the 3 gstreamer libs and the libxml2
-                dnl to the linker's library includes
-                dnl -------------------------------------------------------
-                AC_DEFINE(wxUSE_GSTREAMER)
-                LIBS="$LIBS -lgstreamer-0.8 -lgstplay-0.8"
-                LIBS="$LIBS -lgstinterfaces-0.8 -lxml2"
-            else
-                dnl -------------------------------------------------------
-                dnl Generic "NO" message - triggered if any of the above
-                dnl conditions doesn't pan out
-                dnl -------------------------------------------------------
-                AC_MSG_RESULT([no])
-            fi            
+            AC_DEFINE(wxUSE_GSTREAMER)
+            AC_MSG_RESULT([GStreamer detection successful])
         fi
     fi
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer"
index ee3ab3cbdc36eb3cb308236c1aab24fb43173310..95fea002bd55c98b8e37efce551481750194615e 100644 (file)
@@ -870,7 +870,12 @@ MyNotebookPage::MyNotebookPage(wxNotebook* theBook) :
     //
     //  Create our media control
     //
-    m_mediactrl = new wxMediaCtrl(this, wxID_MEDIACTRL);
+    m_mediactrl = new wxMediaCtrl();
+    
+    //  Make sure creation was successful
+    bool bOK = m_mediactrl->Create(this, wxID_MEDIACTRL);
+    wxASSERT_MSG(bOK, wxT("Could not create media control!"));
+    
     vertsizer->Add(m_mediactrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
 
     //
index 522f2121b7ff0974727efc4d856ff998d0d591f3..1fd4298a0a92115bb8d399cb9bf563ca559d73eb 100644 (file)
 //
 //  wxGStreamerMediaBackend
 //
-// Uses nanoseconds...
+//TODO:
+//TODO:  This is really not the best way to play-stop -
+//TODO:  it should just have one playbin and stick with it the whole
+//TODO:  instance of wxGStreamerMediaBackend - but stopping appears
+//TODO:  to invalidate the playbin object...
+//TODO:
+//
 //---------------------------------------------------------------------------
 #if wxUSE_GSTREAMER
 
 #    include <gtk/gtksignal.h>
 #endif
 
-//FIXME:
-//FIXME:  This is really not the best way to play-stop -
-//FIXME:  it should just have one playbin and stick with it the whole
-//FIXME:  instance of wxGStreamerMediaBackend - but stopping appears
-//FIXME:  to invalidate the playbin object...
-//FIXME:
 
 class WXDLLIMPEXP_MEDIA wxGStreamerMediaBackend : public wxMediaBackend
 {
@@ -124,18 +124,12 @@ public:
 #endif
 
     GstElement* m_player;       //GStreamer media element
-    GstElement* m_audiosink;
+//    GstElement* m_audiosink;
     GstElement* m_videosink;
     
     wxSize      m_videoSize;
     wxControl*  m_ctrl;
     
-    //FIXME:
-    //FIXME: In lue of the last big FIXME, when you pause and seek gstreamer
-    //FIXME: doesn't update the position sometimes, so we need to keep track of whether    
-    //FIXME: we have paused or not and keep track of the time after the pause
-    //FIXME: and whenever the user seeks while paused
-    //FIXME:
     wxLongLong m_nPausedPos;
 
     DECLARE_DYNAMIC_CLASS(wxGStreamerMediaBackend);
@@ -150,15 +144,35 @@ public:
 
 IMPLEMENT_DYNAMIC_CLASS(wxGStreamerMediaBackend, wxMediaBackend);
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend Constructor
+//
+// Sets m_player to NULL signifying we havn't loaded anything yet
+//---------------------------------------------------------------------------
 wxGStreamerMediaBackend::wxGStreamerMediaBackend() : m_player(NULL), m_videoSize(0,0)
 {
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend Destructor
+//
+// Stops/cleans up memory  
+//---------------------------------------------------------------------------
 wxGStreamerMediaBackend::~wxGStreamerMediaBackend()
 {
     Cleanup();
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::OnGTKRealize
+//
+// If the window wasn't realized when Load was called, this is the
+// callback for when it is.
+//
+// 1) Installs GTK idle handler if it doesn't exist
+// 2) Yeilds to avoid an X11 bug (?)
+// 3) Tells GStreamer to play the video in our control
+//---------------------------------------------------------------------------
 #ifdef __WXGTK__
 
 #ifdef __WXDEBUG__
@@ -184,7 +198,7 @@ gint wxGStreamerMediaBackend::OnGTKRealize(GtkWidget* theWidget,
     if (g_isIdle)
         wxapp_install_idle_handler();
 
-    wxYield();    //X Server gets an error if I don't do this or a messagebox beforehand?!?!??
+    wxYield();    //FIXME: X Server gets an error if I don't do this or a messagebox beforehand?!?!??
     
     GdkWindow *window = GTK_PIZZA(theWidget)->bin_window;
     wxASSERT(window);
@@ -199,20 +213,32 @@ gint wxGStreamerMediaBackend::OnGTKRealize(GtkWidget* theWidget,
 
 #endif
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::Cleanup
+//
+// Frees the gstreamer interfaces if there were any created
+//TODO: Do we need to free the video interface?  I'm getting segfaults
+//if I do...
+//---------------------------------------------------------------------------
 void wxGStreamerMediaBackend::Cleanup()
 {
     if(m_player && GST_IS_OBJECT(m_player))
     {
-        //    wxASSERT(GST_IS_OBJECT(m_audiosink));
-        //    wxASSERT(GST_IS_OBJECT(m_videosink));
-    
         gst_element_set_state (m_player, GST_STATE_NULL);
         gst_object_unref (GST_OBJECT (m_player));
-        //gst_object_unref (GST_OBJECT (m_videosink));
-        //gst_object_unref (GST_OBJECT (m_audiosink));
+        
+        //if(GST_IS_OBJECT(m_videosink))
+        //    gst_object_unref (GST_OBJECT (m_videosink));
+        //if(GST_IS_OBJECT(m_audiosink))
+        //    gst_object_unref (GST_OBJECT (m_audiosink));
     }
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::CreateControl
+//
+// Initializes GStreamer and creates the wx side of our media control
+//---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
                                 wxWindowID id,
                                 const wxPoint& pos,
@@ -231,6 +257,11 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
                             validator, name);
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::TransCapsToVideoSize
+//
+// Gets the size of our video (in wxSize) from a GstPad
+//---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::TransCapsToVideoSize(wxGStreamerMediaBackend* be, GstPad* pad)
 {
     const GstCaps* caps = GST_PAD_CAPS (pad);
@@ -266,8 +297,12 @@ bool wxGStreamerMediaBackend::TransCapsToVideoSize(wxGStreamerMediaBackend* be,
     return false;
 }
 
-//forces parent to recalc its layout if it has sizers to update
-//to the new video size
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::PostRecalcSize
+//
+// Forces parent to recalc its layout if it has sizers to update
+// to the new video size
+//---------------------------------------------------------------------------
 void wxGStreamerMediaBackend::PostRecalcSize()
 {
         m_ctrl->InvalidateBestSize();
@@ -276,6 +311,16 @@ void wxGStreamerMediaBackend::PostRecalcSize()
         m_ctrl->GetParent()->Update();
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::OnFinish
+//
+// Called by gstreamer when the media is done playing
+//
+// 1) Send a wxEVT_MEDIA_STOP to the control
+// 2) If veteod, break out
+// 3) really stop the media
+// 4) Send a wxEVT_MEDIA_FINISHED to the control
+//---------------------------------------------------------------------------
 void wxGStreamerMediaBackend::OnFinish(GstElement *play, gpointer    data)
 {
     wxGStreamerMediaBackend* m_parent = (wxGStreamerMediaBackend*) data;
@@ -296,6 +341,13 @@ void wxGStreamerMediaBackend::OnFinish(GstElement *play, gpointer    data)
     }
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::OnError
+//
+// Called by gstreamer when an error is encountered playing the media
+//
+// TODO: Make this better - maybe some more intelligent wxLog stuff
+//---------------------------------------------------------------------------
 void wxGStreamerMediaBackend::OnError(GstElement *play,
     GstElement *src,
     GError     *err,
@@ -306,6 +358,11 @@ void wxGStreamerMediaBackend::OnError(GstElement *play,
 }
 
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::Load (File version)
+//
+// Just calls the URI version
+//---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::Load(const wxString& fileName)
 {
     return Load( 
@@ -315,52 +372,76 @@ bool wxGStreamerMediaBackend::Load(const wxString& fileName)
                );
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::OnVideoCapsReady
+//
+// Called by gstreamer when the video caps for the media is ready
+//---------------------------------------------------------------------------
 void wxGStreamerMediaBackend::OnVideoCapsReady(GstPad* pad, GParamSpec* pspec, gpointer data)
 {
     wxGStreamerMediaBackend::TransCapsToVideoSize((wxGStreamerMediaBackend*) data, pad);    
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::Load (URI version)
+//
+// 1) Stops/Cleanups the previous instance if there is any
+// 2) Creates the gstreamer interfaces - playbin and xvimagesink for video
+// 3) If there is no playbin or video sink it bails out
+// 4) Sets the playbin to have our video sink so we can set the window later
+// 5) Set up the error and end-of-stream callbacks for our player
+// 6) Make sure our video sink can support the x overlay interface
+// 7) Make sure the passed URI is valid and tell playbin to load it
+// 8) Use the xoverlay extension to tell gstreamer to play in our window
+// 9) Get the video size - pause required to set the stream in action
+//---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::Load(const wxURI& location)
 {
+    //1
     Cleanup();
     
+    //2
     m_player    = gst_element_factory_make ("playbin", "play");
-    m_audiosink = gst_element_factory_make ("alsasink", "audiosink");
+//    m_audiosink = gst_element_factory_make ("alsasink", "audiosink");
     m_videosink = gst_element_factory_make ("xvimagesink", "videosink");
 
+    //3
     //no playbin -- outta here :)
-    if (!m_player)
+    if (!m_player || !GST_IS_OBJECT(m_videosink))
         return false;
         
-    //have alsa?
-    if (GST_IS_OBJECT(m_audiosink) == false)
-    {
-        //nope, try OSS
-        m_audiosink = gst_element_factory_make ("osssink", "audiosink");
-         wxASSERT_MSG(GST_IS_OBJECT(m_audiosink), wxT("WARNING: Alsa and OSS drivers for gstreamer not found - audio will be unavailable for wxMediaCtrl"));
-    }
+//    //have alsa?
+//    if (GST_IS_OBJECT(m_audiosink) == false)
+//    {
+//        //nope, try OSS
+//        m_audiosink = gst_element_factory_make ("osssink", "audiosink");
+//         wxASSERT_MSG(GST_IS_OBJECT(m_audiosink), wxT("WARNING: Alsa and OSS drivers for gstreamer not found - audio will be unavailable for wxMediaCtrl"));
+//    }
     
-        
-    wxASSERT_MSG(GST_IS_OBJECT(m_videosink), wxT("WARNING: No X video driver for gstreamer not found - video will be unavailable for wxMediaCtrl"));
 
+    //4        
     g_object_set (G_OBJECT (m_player),
                     "video-sink", m_videosink,
-                    "audio-sink", m_audiosink,
+//                    "audio-sink", m_audiosink,
                     NULL);
 
+    //5
     g_signal_connect (m_player, "eos", G_CALLBACK (OnError), this);
     g_signal_connect (m_player, "error", G_CALLBACK (OnFinish), this);
 
+    //6
     wxASSERT( GST_IS_X_OVERLAY(m_videosink) );
     if ( ! GST_IS_X_OVERLAY(m_videosink) )
         return false;
     
+    //7
     wxString locstring = location.BuildUnescapedURI();
     wxASSERT(gst_uri_protocol_is_valid("file"));
     wxASSERT(gst_uri_is_valid(locstring.mb_str()));
 
     g_object_set (G_OBJECT (m_player), "uri", (const char*)locstring.mb_str(), NULL);
-        
+    
+    //8    
 #ifdef __WXGTK__
     if(!GTK_WIDGET_REALIZED(m_ctrl->m_wxwindow))
     {
@@ -389,7 +470,8 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
 #ifdef __WXGTK__                                  
     } //end else block
 #endif 
-
+    //9
     wxASSERT(gst_element_set_state (m_player,
                     GST_STATE_PAUSED)    == GST_STATE_SUCCESS);            
     
@@ -445,6 +527,11 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
     return true;
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::Play
+//
+// Sets the stream to a playing state
+//---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::Play()
 {
     if (gst_element_set_state (m_player, GST_STATE_PLAYING)
@@ -453,6 +540,11 @@ bool wxGStreamerMediaBackend::Play()
     return true;
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::Pause
+//
+// Marks where we paused and pauses the stream
+//---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::Pause()
 {
     m_nPausedPos = GetPosition();
@@ -462,6 +554,11 @@ bool wxGStreamerMediaBackend::Pause()
     return true;
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::Stop
+//
+// Pauses the stream and sets the position to 0
+//---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::Stop()
 {
     if (gst_element_set_state (m_player,
@@ -470,6 +567,11 @@ bool wxGStreamerMediaBackend::Stop()
     return wxGStreamerMediaBackend::SetPosition(0);
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::GetState
+//
+// Gets the state of the stream
+//---------------------------------------------------------------------------
 wxMediaState wxGStreamerMediaBackend::GetState()
 {
     switch(GST_STATE(m_player))
@@ -486,21 +588,19 @@ wxMediaState wxGStreamerMediaBackend::GetState()
     }
 }
 
-bool wxGStreamerMediaBackend::SetPosition(wxLongLong where)
-{
-    if( gst_element_seek (m_player, (GstSeekType) (GST_SEEK_METHOD_SET |
-            GST_FORMAT_TIME | GST_SEEK_FLAG_FLUSH),
-            where.GetValue() * GST_MSECOND ) )
-    {
-        if (GetState() != wxMEDIASTATE_PLAYING)
-            m_nPausedPos = where;
-        
-        return true;
-    }        
-            
-    return false;
-}
-
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::GetPosition
+//
+// If paused, returns our marked position - otherwise it queries the 
+// GStreamer playbin for the position and returns that
+//
+//TODO:
+//TODO: In lue of the last big TODO, when you pause and seek gstreamer
+//TODO: doesn't update the position sometimes, so we need to keep track of whether    
+//TODO: we have paused or not and keep track of the time after the pause
+//TODO: and whenever the user seeks while paused
+//TODO:
+//---------------------------------------------------------------------------
 wxLongLong wxGStreamerMediaBackend::GetPosition()
 {
     if(GetState() != wxMEDIASTATE_PLAYING)
@@ -516,6 +616,35 @@ wxLongLong wxGStreamerMediaBackend::GetPosition()
     }
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::SetPosition
+//
+// Sets the position of the stream
+// Note that GST_MSECOND is 1000000 (GStreamer uses nanoseconds - so
+// there is 1000000 nanoseconds in a millisecond)
+//
+// If paused marks where we seeked to 
+//---------------------------------------------------------------------------
+bool wxGStreamerMediaBackend::SetPosition(wxLongLong where)
+{
+    if( gst_element_seek (m_player, (GstSeekType) (GST_SEEK_METHOD_SET |
+            GST_FORMAT_TIME | GST_SEEK_FLAG_FLUSH),
+            where.GetValue() * GST_MSECOND ) )
+    {
+        if (GetState() != wxMEDIASTATE_PLAYING)
+            m_nPausedPos = where;
+        
+        return true;
+    }        
+            
+    return false;
+}
+
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::GetDuration
+//
+// Obtains the total time of our stream
+//---------------------------------------------------------------------------
 wxLongLong wxGStreamerMediaBackend::GetDuration()
 {
     gint64 length;
@@ -526,31 +655,46 @@ wxLongLong wxGStreamerMediaBackend::GetDuration()
     return length / GST_MSECOND ;
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::Move
+//
+// Called when the window is moved - GStreamer takes care of this
+// for us so nothing is needed
+//---------------------------------------------------------------------------
 void wxGStreamerMediaBackend::Move(int x, int y, int w, int h)
 {
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::GetVideoSize
+//
+// Returns our cached video size from Load/OnVideoCapsReady
+//---------------------------------------------------------------------------
 wxSize wxGStreamerMediaBackend::GetVideoSize() const
 {    
     return m_videoSize;
 }
 
+//---------------------------------------------------------------------------
+// wxGStreamerMediaBackend::GetPlaybackRate
+// wxGStreamerMediaBackend::SetPlaybackRate
 //
-//PlaybackRate not currently supported via playbin directly -
-// Ronald S. Bultje noted on gstreamer-devel:
-//
-// Like "play at twice normal speed"? Or "play at 25 fps and 44,1 kHz"? As
-// for the first, yes, we have elements for that, btu they"re not part of
-// playbin. You can create a bin (with a ghost pad) containing the actual
-// video/audiosink and the speed-changing element for this, and set that
-// element as video-sink or audio-sink property in playbin. The
-// audio-element is called "speed", the video-element is called "videodrop"
-// (although that appears to be deprecated in favour of "videorate", which
-// again cannot do this, so this may not work at all in the end). For
-// forcing frame/samplerates, see audioscale and videorate. Audioscale is
-// part of playbin.
+// Obtains/Sets the playback rate of the stream
 //
-
+//TODO: PlaybackRate not currently supported via playbin directly -
+//TODO: Ronald S. Bultje noted on gstreamer-devel:
+//TODO:
+//TODO: Like "play at twice normal speed"? Or "play at 25 fps and 44,1 kHz"? As
+//TODO: for the first, yes, we have elements for that, btu they"re not part of
+//TODO: playbin. You can create a bin (with a ghost pad) containing the actual
+//TODO: video/audiosink and the speed-changing element for this, and set that
+//TODO: element as video-sink or audio-sink property in playbin. The
+//TODO: audio-element is called "speed", the video-element is called "videodrop"
+//TODO: (although that appears to be deprecated in favour of "videorate", which
+//TODO: again cannot do this, so this may not work at all in the end). For
+//TODO: forcing frame/samplerates, see audioscale and videorate. Audioscale is
+//TODO: part of playbin.
+//---------------------------------------------------------------------------
 double wxGStreamerMediaBackend::GetPlaybackRate()
 {
     //not currently supported via playbin