gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r12136: Make libva support optional


From: Rob Savoye
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r12136: Make libva support optional if it doesn't exist when using ffmpeg.
Date: Mon, 05 Apr 2010 13:54:56 -0600
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 12136 [merge]
committer: Rob Savoye <address@hidden>
branch nick: trunk
timestamp: Mon 2010-04-05 13:54:56 -0600
message:
  Make libva support optional if it doesn't exist when using ffmpeg.
modified:
  Makefile.am
  configure.ac
  doc/C/Makefile.am
  gui/Makefile.am
  gui/gnash.cpp
  gui/gtk.cpp
  gui/gtk_canvas.cpp
  libbase/Makefile.am
  libmedia/Makefile.am
  libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
  librender/Renderer_agg.cpp
  librender/Renderer_ogl.cpp
  libvaapi/Makefile.am
  libvaapi/VaapiGlobalContext.cpp
  macros/ffmpeg.m4
  testsuite/misc-ming.all/Makefile.am
=== modified file 'Makefile.am'
--- a/Makefile.am       2010-03-24 22:48:23 +0000
+++ b/Makefile.am       2010-04-04 22:55:35 +0000
@@ -66,7 +66,7 @@
 LIBLTDLDIR = libltdl
 endif
 
-if USE_VAAPI
+if HAVE_VAAPI
 VAAPI_DIR = libvaapi
 endif
 
@@ -360,7 +360,8 @@
        @echo ""
        @echo "Configurable options are:"
        @echo " Media handler: $(MEDIA_CONFIG)"
-       @echo " Renderer engine: $(RENDERER_CONFIG)"
+       @echo " Renderer engines: $(RENDERER_CONFIG)"
+       @echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
 
 if BUILD_SSL
        @echo " SSL_CFLAGS is $(SSL_CFLAGS)"
@@ -459,26 +460,6 @@
 else
        @echo " PYTHON support disabled"
 endif
-if BUILD_OMAP
-       @echo " Hardware Acceleration support via OMAP enabled"
-else
-       @echo " Hardware Acceleration support via OMAP disabled"
-if USE_VAAPI
-       @echo " Hardware Acceleration support via libVA API enabled"
-else
-       @echo " Hardware Acceleration support via libVA API disabled"
-endif
-if USE_VAAPI_X11
-       @echo " Hardware Acceleration support via libVA X11 display enabled"
-else
-       @echo " Hardware Acceleration support via libVA X11 display disabled"
-endif
-if USE_VAAPI_GLX
-       @echo " Hardware Acceleration support via libVA OpenGL renderer enabled"
-else
-       @echo " Hardware Acceleration support via libVA OpenGL renderer 
disabled"
-endif
-endif
 
 if TESTSUITE
 check-local:

=== modified file 'configure.ac'
--- a/configure.ac      2010-04-03 22:48:48 +0000
+++ b/configure.ac      2010-04-05 19:54:56 +0000
@@ -699,7 +699,8 @@
 build_ogl=yes
 build_agg=yes
 build_cairo=yes
-renderer_list="opengl, agg, cairo"
+renderer_list="OpenGL AGG Cairo"
+nrender=3
 AC_ARG_WITH(renderer,
   AC_HELP_STRING([--with-renderer=], [Specify which renderers to support to 
enable (ogl|cairo|agg, default all)]),
   if test -n ${withval}; then
@@ -712,7 +713,7 @@
     fi
   fi
   renderer_list=""
-  nhwaccel=0
+  nrender=0
   build_ogl=no
   build_agg=no
   build_cairo=no
@@ -724,29 +725,29 @@
         build_ogl=no
         build_agg=no
         build_cairo=no
-        nhwaccel=1
+        nrender=1
         ;;
       all|ALL)
-        renderer_list="opengl, cairo, agg"
+        renderer_list="OpenGL, Cairo, AGG"
         build_ogl=yes
         build_agg=yes
         build_cairo=yes
-        nhwaccel=3
+        nrender=3
         ;;
       ogl|OGL|OpenGL|opengl)
-        renderer_list="${renderer_list} opengl"
+        renderer_list="${renderer_list} OpenGL"
         build_ogl=yes
-        nhwaccel=$((nhwaccel+1))
+        nrender=$((nrender+1))
         ;;
       agg|AGG)
-        renderer_list="${renderer_list} agg"
+        renderer_list="${renderer_list} AGG"
         build_agg=yes
-        nhwaccel=$((nhwaccel+1))
+        nrender=$((nrender+1))
         ;;
       cairo|CAIRO|Cairo*)
-        renderer_list="${renderer_list} cairo"
+        renderer_list="${renderer_list} Cairo"
         build_cairo=yes
-        nhwaccel=$((nhwaccel+1))
+        nrender=$((nrender+1))
         ;;
       *) AC_MSG_ERROR([invalid renderer feature specified: ${withval} given 
(accept:  (ogl|cairo|agg|all)])
         ;;
@@ -1589,96 +1590,6 @@
 dnl GMA500 but you currently will have to build the AGG renderer
 dnl instead of the OGL (OpenGL) one. 
 
-AC_ARG_WITH(hwaccel,
-  AC_HELP_STRING([--with-hwaccel=], [Specify which accleration to support to 
enable (none,vaapi,omap)]),
-  if test -n ${withval}; then
-    if test "x${withval}" != "xno" -o "x${withval}" != "xnone" ; then
-      hwaccel_list="none"
-      withval=`echo ${withval} | tr '\054' ' ' `
-    else
-      hwaccel_list=""
-      withval=""
-    fi
-  fi
-  hwaccel_list=""
-  nhwaccel=0
-  while test -n "${withval}" ; do
-    val=`echo ${withval} | cut -d ' ' -f 1`
-    [case "${val}" in
-      no*|NO*)
-        hwaccel_list="none"
-        build_vaapi=no
-        build_omap=no
-        nhwaccel=$((nhwaccel+1))
-        ;;
-      va*|VA*)
-        hwaccel_list="${hwaccel_list} vaapi"
-        build_vaapi=yes
-        nhwaccel=$((nhwaccel+1))
-        ;;
-      omap*|OMAP*)
-        hwaccel_list="${hwaccel_list} omap"
-        build_omap=yes
-        nhwaccel=$((nhwaccel+1))
-        ;;
-      *) AC_MSG_ERROR([invalid hwaccel feature specified: ${withval} given 
(accept: none,vaapi,omap)])
-        ;;
-      esac]
-    withval=`echo ${withval} | cut -d ' ' -f 2-6`
-    if test "x$val" = "x$withval"; then
-      break;
-    fi
-  done
-)
-
-dnl Until the hwaccel patches in ffmpeg wind up in the ffmpeg-plugin,
-dnl restrict using HW Accel to using ffmpeg directly.
-if test x"${media_handler}" = x"gst" -a x"${build_vaapi}" = x"yes"; then
-  AC_MSG_ERROR(["Hardware acceleration currently not supported unless using 
ffmpeg."])
-fi
-
-if test x"${build_vaapi}" = x"yes"; then
-  AC_DEFINE([USE_VAAPI], [1], [Enable libVA API])
-  if test x$build_ogl = xyes; then
-    AC_DEFINE([USE_VAAPI_GLX], [1], [Enable libVA API with GLX extensions])
-  fi
-fi
-
-use_libva=no
-use_vliba_x11=no
-use_libva_glx=no
-if test x"${build_vaapi}" = x"yes"; then
-  use_libva=yes
-  GNASH_PKG_FIND([libva],
-    [va/va.h],
-    [Video Acceleration API],
-    vaInitialize
-  )
-  use_libva_x11=yes
-  GNASH_PKG_FIND([libva_x11],
-    [va/va_x11.h],
-    [VA API (X11 display)],
-    vaGetDisplay,
-    [], [-lva-x11]
-  )
-
-  if test x$build_ogl = xyes; then
-    use_libva_glx=yes
-    GNASH_PKG_FIND([libva_glx],
-      [va/va_glx.h],
-      [VA API (GLX display)],
-      vaGetDisplayGLX,
-      [], [-lva-glx]
-    )
-  fi
-fi
-
-dnl libVA drivers
-AM_CONDITIONAL(BUILD_OMAP, test x"${build_omap}" = xyes)
-AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
-AM_CONDITIONAL(USE_VAAPI_X11, test x"${use_libva_x11}" = xyes)
-AM_CONDITIONAL(USE_VAAPI_GLX, test x"${use_libva_glx}" = xyes)
-
 dnl IRIX-hack.
 case $host in
   *-*-irix*)
@@ -2359,6 +2270,121 @@
    GNASH_PATH_AGG
 fi
 
+build_xv=yes
+build_vaapi=yes
+hwaccel_list="VAAPI XVideo"
+nhwaccel=2
+AC_ARG_ENABLE(hwaccel,
+  AC_HELP_STRING([--enable-hwaccel], [Specify which accleration to support to 
enable (none,vaapi,omap)]),
+  if test -z ${enableval}; then
+      hwaccel_list="none"
+      nhwaccel=1
+      enableval=""
+  fi
+  while test -n "${enableval}" ; do
+    val=`echo ${enableval} | cut -d ' ' -f 1`
+    [case "${val}" in
+      no*|NO*)
+        hwaccel_list="none"
+        build_vaapi=no
+        build_omap=no
+        dnl build_xv=no
+        nhwaccel=0
+        ;;
+      va*|VA*)
+        hwaccel_list="${hwaccel_list} vaapi"
+        build_vaapi=yes
+        nhwaccel=$((nhwaccel+1))
+        ;;
+      xv*|XV*|Xv*)
+        hwaccel_list="${hwaccel_list} XVideo"
+        dnl build_xv=yes
+        nhwaccel=$((nhwaccel+1))
+        ;;
+      all|ALL)
+        hwaccel_list="XVideo VAAPI OMAP"
+        nhwaccel=3
+        build_omap=yes
+        build_vaapi=yes
+        dnl build_xv=yes
+        ;;
+      omap*|OMAP*)
+        hwaccel_list="${hwaccel_list} omap"
+        build_omap=yes
+        nhwaccel=$((nhwaccel+1))
+        ;;
+      *) AC_MSG_ERROR([invalid hwaccel feature specified: ${enableval} given 
(accept: none,vaapi,omap)])
+        ;;
+      esac]
+    enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
+    if test "x$val" = "x$enableval"; then
+      break;
+    fi
+  done
+)
+
+dnl Until the hwaccel patches in ffmpeg wind up in the ffmpeg-plugin,
+dnl restrict using HW Accel to using ffmpeg directly.
+if test x"${media_handler}" = x"gst" -a x"${build_vaapi}" = x"yes"; then
+  AC_MSG_ERROR(["Hardware acceleration currently not supported unless using 
ffmpeg."])
+fi
+
+if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi}" = x"yes"; then
+  use_libva=no
+  use_libva_x11=no
+  use_libva_glx=no
+  dnl if the version of ffmpeg is recent enough, (r20957, 52.45.0), then
+  dnl look for VAAPI support so we can use use the VAAPI enabled ffmpeg.
+  if test x"${have_ffmpeg_vaapi}" = xyes; then
+    use_libva=yes
+    GNASH_PKG_FIND([libva],
+      [va/va.h],
+      [Video Acceleration API],
+      vaInitialize
+    )
+
+    use_libva_x11=yes
+    GNASH_PKG_FIND([libva_x11],
+      [va/va_x11.h],
+      [VA API (X11 display)],
+      vaGetDisplay,
+      [], [-lva-x11]
+    )
+
+    if test x$build_ogl = xyes; then
+      use_libva_glx=yes
+      GNASH_PKG_FIND([libva_glx],
+        [va/va_glx.h],
+        [VA API (GLX display)],
+        vaGetDisplayGLX,
+        [], [-lva-glx]
+      )
+    fi
+  fi
+fi
+
+dnl libVA drivers. We declare conditional for both the option being
+dnl selected, as well as whether or not it's found. This we can
+dnl generate better error handling if it's not found.
+AM_CONDITIONAL(BUILD_OMAP, test x"${build_omap}" = xyes)
+AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
+
+dnl Only build the vaapi support if we have a version of ffmpeg that
+dnl supports it.
+if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${found_libva_incl}" = xyes; then
+  build_vaapi=yes
+  hwaccel_list="VAAPI XVideo"
+  nhwaccel=2
+else
+  build_vaapi=no
+  hwaccel_list="XVideo"
+  nhwaccel=1
+fi
+
+AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes)
+AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes)
+AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes)
+
 GNASH_DOCBOOK
 AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x)
 AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes)
@@ -2567,7 +2593,7 @@
 
 dnl Define convienience constants so Gnash can print out the
 dnl default configuration of the build.
-RENDERER_CONFIG=${add_renderer}
+RENDERER_CONFIG="${renderer_list}"
 RENDERER_LIBS=
 for rend in `echo "${add_renderer}" | tr ',' ' '`; do
        RENDERER_LIBS="${RENDERER_LIBS} 
\$(top_builddir)/librender/libgnash${rend}.la"
@@ -2576,6 +2602,8 @@
 AC_SUBST(RENDERER_LIBS)
 AC_SUBST(RENDERER_CONFIG)
 
+HWACCEL_CONFIG="${hwaccel_list}"
+AC_SUBST(HWACCEL_CONFIG)
 
 dnl check for missing libraries and disable them.
 if test x"$BOOST_LIBS" != x; then
@@ -2788,95 +2816,12 @@
 dnl --   echo "        Loadable GUI & renderer disabled (default). Use 
--enable-dynamic-gui to enable."
 dnl -- fi
 
-if test x"${ghelp}" = x"yes"; then
-  echo "        GNOME help enabled"
-else
-  echo "        GNOME help disabled (default). Use --enable-ghelp to enable."
-fi
-
-dnl if test x"${extensions}" = x"yes"; then
-dnl   echo "        Building extensions enabled (default). Use 
--disable-extensions to disable."
-dnl else
-dnl   echo "        Building Gnash extensions disabled."
-dnl fi
-
-if test x"${cygnal}" = x"yes"; then
-  echo "        Building Cygnal media server enabled (default). Use 
--disable-cygnal to disable."
-else
-  echo "        Building Cygnal media server disabled."
-fi
-
-if test x"${debugger}" = x"yes"; then
-  echo "        Building Flash debugger support (default). Use 
--disable-debugger to disable."
-else
-  echo "        Building the Flash debugger is disabled."
-fi
-
-if test x"${with-top_level}" != x; then
-  echo "        Top level for cross compiling support files is: 
$with_top_level"
-fi
-
-if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
-  echo "        WARNING: Pixel format RGB565 selected in combination with the" 
>&4
-  echo "                 GTK GUI. Only a hacked GTK will work (e.g. on the 
OLPC)." >&4
-fi
-
-if test x"${extensions_list}" != x; then
-  echo "        Building extensions: ${extensions_list}"
-fi
-
-if test x"${security_list}" != x; then
-  echo "        Enabling security features: ${security_list}"
-fi
-
-if test x"${hwaccel_list}" != xnone; then
-  echo "        Enabling hardware acceleration features: ${hwaccel_list}"
-fi
-
-if test x"${statistics_list}" != x; then
-  echo "        Enabling statistics collecting for: ${statistics_list}"
-fi
-
-if test x"${SUPPORTED_GUIS}" = x; then
-  AC_MSG_ERROR(no supported GUIs found);
-fi
-
-echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
-echo "        Renderers supported: ${renderer_list}"
-echo "        Media handler: "$media_handler
-if test x"${build_vaapi}" = x"yes"; then
-  echo "        Video Acceleration via libVA API support: yes"
-  if test x$use_libva_x11 = xyes; then
-    echo "        Video Acceleration via libVA X11 API support: yes"
-  else
-    echo "        Video Acceleration via libVA X11 API support: no"
-  fi
-  if test x$use_libva_glx = xyes; then
-    echo "        Video Acceleration via libVA OpenGL API support: yes"
-  else
-    echo "        Video Acceleration via libVA OpenGL API support: no"
-  fi
-else
-  echo "        Video Acceleration via libVA API support: no"
-fi
-echo "        Using ${add_sound} for sound handling"
-echo "        Using $with_shm mode for shared memory"
-echo ""
-echo "Configured paths for ${build} are:"
-
-if test x"$docbook" = x"yes"; then
-  echo '        DocBook document processing enabled (for "make html" and "make 
pdf")'
-  if test x"$docbook_styles" != x; then
-    echo "        Docbook styles sheets in $docbook_styles"
-  fi
-else
-  echo "        DocBook document processing disabled (default)"
-fi
-
 # set a variable if we shouldn't continue. This way we can print
 # out everything that is missing in one pass, hopefully making it
 # easy for new developers to get everything they need installed.
 
+echo "Configured paths for ${build} are:"
+
 dnl Dump QT3 options is the user specified a QT3 or KDE3 GUI
 if test x"${build_qt3}" = xyes; then
   if test x"${has_qt3}" = xyes; then
@@ -3773,6 +3718,77 @@
       AC_MSG_NOTICE([This build is setup for cross compiling])
    fi
 fi
+
+echo "--------"
+dnl if test x"${ghelp}" = x"yes"; then
+dnl   echo "        GNOME help enabled"
+dnl else
+dnl   echo "        GNOME help disabled (default). Use --enable-ghelp to 
enable."
+dnl fi
+
+dnl if test x"${extensions}" = x"yes"; then
+dnl   echo "        Building extensions enabled (default). Use 
--disable-extensions to disable."
+dnl else
+dnl   echo "        Building Gnash extensions disabled."
+dnl fi
+
+if test x"${cygnal}" = x"yes"; then
+  echo "        Building Cygnal media server enabled (default). Use 
--disable-cygnal to disable."
+else
+  echo "        Building Cygnal media server disabled."
+fi
+
+if test x"${debugger}" = x"yes"; then
+  echo "        Building Flash debugger support (default). Use 
--disable-debugger to disable."
+else
+  echo "        Building the Flash debugger is disabled."
+fi
+
+if test x"${with-top_level}" != x; then
+  echo "        Top level for cross compiling support files is: 
$with_top_level"
+fi
+
+if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
+  echo "        WARNING: Pixel format RGB565 selected in combination with the" 
>&4
+  echo "                 GTK GUI. Only a hacked GTK will work (e.g. on the 
OLPC)." >&4
+fi
+
+if test x"${extensions_list}" != x; then
+  echo "        Building extensions: ${extensions_list}"
+fi
+
+if test x"${security_list}" != x; then
+  echo "        Enabling security features: ${security_list}"
+fi
+
+if test x"${hwaccel_list}" != xnone; then
+  echo "        Enabling hardware acceleration features: ${hwaccel_list}"
+fi
+
+if test x"${statistics_list}" != x; then
+  echo "        Enabling statistics collecting for: ${statistics_list}"
+fi
+
+if test x"${SUPPORTED_GUIS}" = x; then
+  AC_MSG_ERROR(no supported GUIs found);
+fi
+
+echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
+echo "        Renderers supported: ${renderer_list}"
+echo "        Hardware Acceleration: ${hwaccel_list}"
+echo "        Media handler: "$media_handler
+echo "        Using ${add_sound} for sound handling"
+echo "        Using $with_shm mode for shared memory"
+
+if test x"$docbook" = x"yes"; then
+  echo '        DocBook document processing enabled (for "make html" and "make 
pdf")'
+  if test x"$docbook_styles" != x; then
+    echo "        Docbook styles sheets in $docbook_styles"
+  fi
+else
+  echo "        DocBook document processing disabled (default)"
+fi
+
 if test -s $cwarn; then
   echo ""
   cat $cwarn
@@ -3793,6 +3809,7 @@
 if test x"$fork" = x"no"; then
   AC_MSG_ERROR([Currently only forking the standalone player works!])
 fi
+echo ""
 
 # Local Variables:
 # c-basic-offset: 2

=== modified file 'doc/C/Makefile.am'
--- a/doc/C/Makefile.am 2010-03-24 23:43:10 +0000
+++ b/doc/C/Makefile.am 2010-04-04 22:54:23 +0000
@@ -346,6 +346,9 @@
        -$(RM) $(DESTDIR)$(htmldir)/gnashref.html
        -$(RM) $(DESTDIR)$(htmldir)/images/*png
 
+uninstall-man1-hook:
+       -$(RM) $(DESTDIR)$(htmldir)/gnashuser.html
+
 # install-data-hook: install-data-hook-omf
 # uninstall-local: uninstall-local-doc uninstall-local-omf
 
@@ -380,8 +383,7 @@
 
 install-data-hook: $(MANPAGES) install-man1 install-info-hook 
install-html-hook 
 uninstall-hook: uninstall-info-hook uninstall-html-hook
-       -$(RM) -f $(DESTDIR)$(man1dir)/gtk-gnash.1 
-       -$(RM) -f $(DESTDIR)$(man1dir)/kde4-gnash.1
+       -$(RM) -f $(DESTDIR)$(man1dir)/*.1 
 
 #
 # GNOME Help support, which currently isn't supported

=== modified file 'gui/Makefile.am'
--- a/gui/Makefile.am   2010-03-22 20:48:47 +0000
+++ b/gui/Makefile.am   2010-04-04 22:53:17 +0000
@@ -173,10 +173,10 @@
 #  FLTK_SRCS = 
 # endif
 
-AM_CPPFLAGS += -DPKGDATADIR=\"$(pkgdatadir)\"
-AM_CPPFLAGS += -DRENDERER_CONFIG=\"$(RENDERER_CONFIG)\"
-AM_CPPFLAGS += -DMEDIA_CONFIG=\"$(MEDIA_CONFIG)\"
-AM_CPPFLAGS += -DTARGET_CONFIG=\"$(target)\"
+AM_CPPFLAGS += -DPKGDATADIR="\"$(pkgdatadir)\""
+AM_CPPFLAGS += -DRENDERER_CONFIG="\"$(RENDERER_CONFIG)\""
+AM_CPPFLAGS += -DHWACCEL_CONFIG="\"$(HWACCEL_CONFIG)\""
+AM_CPPFLAGS += -DMEDIA_CONFIG="\"$(MEDIA_CONFIG)\""
 AM_CPPFLAGS += -DCONFIG_CONFIG="\"$(shell cat .configline)\""
 AM_CPPFLAGS += -DCXXFLAGS="\"$(CXXFLAGS)\"" 
 

=== modified file 'gui/gnash.cpp'
--- a/gui/gnash.cpp     2010-04-05 10:49:02 +0000
+++ b/gui/gnash.cpp     2010-04-05 19:54:56 +0000
@@ -181,22 +181,21 @@
 build_options()
 {
     cout << _("Build options ") << VERSION << endl
-        << _("   Target: ") << TARGET_CONFIG << endl
-
-        << _("   Renderer: ") << RENDERER_CONFIG
-        << _(" - GUI: ") << GUI_CONFIG
-        << _(" - Media handler: ") << MEDIA_CONFIG << endl
+        << _("   Renderers: ") << RENDERER_CONFIG << endl
+        << _("   Hardware Acceleration: ") << HWACCEL_CONFIG << endl
+        << _("   GUI: ") << GUI_CONFIG
+        << _(" - Media handler: ") << MEDIA_CONFIG << endl
         
-        << _("   Configured with: ") << CONFIG_CONFIG << endl
-        << _("   CXXFLAGS: ") << CXXFLAGS << endl
-        << "   Version: "  << BRANCH_NICK << ":" << BRANCH_REVNO << endl;
-
+        << _("   Configured with: ") << CONFIG_CONFIG << endl
+        << _("   CXXFLAGS: ") << CXXFLAGS << endl
+        << "   Version: "  << BRANCH_NICK << ":" << BRANCH_REVNO << endl;
+    
 #ifdef USE_FFMPEG
     cout << _("Built against ffmpeg version: ") << LIBAVCODEC_IDENT << endl;
 #endif
 #ifdef USE_GST
     cout << _("Built against gstreamer version: ") << GST_VERSION_MAJOR << "."
-        << GST_VERSION_MINOR << "." << GST_VERSION_MICRO << endl;
+        << GST_VERSION_MINOR << "." << GST_VERSION_MICRO << endl;
     guint major, minor, micro, nano;
     gst_version(&major, &minor, &micro, &nano);
     cout << _("Linked against gstreamer version: ") << major << "."

=== modified file 'gui/gtk.cpp'
--- a/gui/gtk.cpp       2010-03-24 22:40:31 +0000
+++ b/gui/gtk.cpp       2010-04-04 22:55:35 +0000
@@ -80,7 +80,7 @@
 # include <hildon/hildon.h>
 #endif
 
-#ifdef USE_VAAPI
+#ifdef HAVE_VA_VA_H
 extern VAStatus va_getDriverName(VADisplay dpy, char **driver_name);
 #endif
 
@@ -251,19 +251,20 @@
         }
     }
 
-#ifdef USE_VAAPI_X
-    char *driver_name = NULL;
-    struct VADisplayContext *pDisplayContext = (struct VADisplayContext 
*)GDK_DISPLAY();
-    if (pDisplayContext->vaGetDriverName(pDisplayContext, &driver_name) == 0) {
-        if ((strcmp(driver_name, "nvidia" ) == 0) || (strcmp(driver_name, 
"vdpau" ) == 0) || (strcmp(driver_name, "s3g" ) == 0)) {
-            log_debug("found suppored vaapi driver for %s", driver_name);
+#ifdef HAVE_VA_VA_X11_H
+    if (hwaccel == "vaapi") {
+        char *driver_name = NULL;
+        struct VADisplayContext *pDisplayContext = (struct VADisplayContext 
*)GDK_DISPLAY();
+        if (pDisplayContext->vaGetDriverName(pDisplayContext, &driver_name) == 
0) {
+            if ((strcmp(driver_name, "nvidia" ) == 0) || (strcmp(driver_name, 
"vdpau" ) == 0) || (strcmp(driver_name, "s3g" ) == 0)) {
+                log_debug("found supported vaapi driver for %s", driver_name);
+            } else {
+                log_error("No vaapi driver found for %s!", driver_name);
+            }
         } else {
-            log_error("No vaapi driver found for %s!", driver_name);
+            log_error("Coildn't get the VAAPI driver name!");
         }
-    } else {
-        log_error("Coildn't get the VAAPI driver name!");
     }
-
 #endif
 
 #ifdef BUILD_CANVAS
@@ -1891,6 +1892,8 @@
 
     comments.append(_("\nRenderer: "));
     comments.append(RENDERER_CONFIG);
+    comments.append(_("\nHardwar Acceleration:: "));
+    comments.append(HWACCEL_CONFIG);
     comments.append(_("\nGUI: "));
     comments.append("GTK2"); // gtk of course!
     comments.append(_("\nMedia: "));

=== modified file 'gui/gtk_canvas.cpp'
--- a/gui/gtk_canvas.cpp        2010-03-16 15:08:20 +0000
+++ b/gui/gtk_canvas.cpp        2010-04-04 22:55:35 +0000
@@ -29,7 +29,7 @@
 #include "log.h"
 #include "gtk_glue.h"
 
-#ifdef USE_VAAPI
+#ifdef HAVE_VA_VA_H
 #include "vaapi_utils.h"
 #endif
 
@@ -232,7 +232,7 @@
     while (!initialized_renderer) {
         renderer = next_renderer;
         hwaccel = next_hwaccel;
-#ifdef USE_VAAPI
+#ifdef HAVE_VA_VA_H
         // Global enable VA-API, if requested
         gnash::vaapi_set_is_enabled(hwaccel == "vaapi");
 #endif
@@ -265,7 +265,7 @@
         if (renderer == "agg") {
             // Use LibVva, which works on Nvidia, AT, or Intel 965 GPUs
             // with AGG or OpenGL.
-#ifdef USE_VAAPI
+#ifdef HAVE_VA_VA_H
             if (hwaccel == "vaapi") {
                 canvas->glue.reset(new gnash::GtkAggVaapiGlue);
                 // Set the hardware acclerator to the next one to try

=== modified file 'libbase/Makefile.am'
--- a/libbase/Makefile.am       2010-03-24 23:11:52 +0000
+++ b/libbase/Makefile.am       2010-04-04 22:55:35 +0000
@@ -234,7 +234,7 @@
        $(NULL)
 endif
 
-if USE_VAAPI
+if HAVE_VAAPI
    libgnashbase_la_SOURCES += \
        GnashVaapiImage.cpp \
        $(NULL)
@@ -244,7 +244,7 @@
        GnashVaapiImageProxy.h \
        $(NULL)
 
-if USE_VAAPI_GLX
+if HAVE_VAAPI_GLX
    libgnashbase_la_SOURCES += \
        GnashVaapiTexture.cpp \
        $(NULL)
@@ -254,7 +254,7 @@
        $(NULL)
 endif
 
-if USE_VAAPI
+if HAVE_VAAPI
    libgnashbase_la_CPPFLAGS += \
        -I$(top_srcdir)/libvaapi \
        $(NULL)

=== modified file 'libmedia/Makefile.am'
--- a/libmedia/Makefile.am      2010-03-24 23:11:52 +0000
+++ b/libmedia/Makefile.am      2010-04-04 22:55:35 +0000
@@ -160,7 +160,7 @@
        $(FFMPEG_CFLAGS) \
        $(NULL)
 
-if USE_VAAPI
+if HAVE_VAAPI
    libgnashmedia_la_SOURCES += \
                ffmpeg/VideoDecoderFfmpegVaapi.cpp \
                $(NULL)
@@ -215,11 +215,11 @@
 
 libgnashmedia_la_LDFLAGS = -release $(VERSION)
 
-if USE_VAAPI
    libgnashmedia_la_CPPFLAGS += \
        -I$(top_srcdir)/libvaapi \
        $(NULL)
 
+if HAVE_VAAPI
    libgnashmedia_la_LIBADD += \
        $(top_builddir)/libvaapi/libgnashvaapi.la \
        $(NULL)

=== modified file 'libmedia/ffmpeg/VideoDecoderFfmpeg.cpp'
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp    2010-03-31 18:06:52 +0000
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp    2010-04-04 22:55:35 +0000
@@ -46,7 +46,7 @@
 
 #include "FLVParser.h"
 
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
 #  include "vaapi_utils.h"
 #  include "VideoDecoderFfmpegVaapi.h"
 #  include "GnashVaapiImage.h"
@@ -208,7 +208,7 @@
     ctx->reget_buffer   = reget_buffer;
     ctx->release_buffer = release_buffer;
 
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
     if (vaapi_is_enabled()) {
         VaapiContextFfmpeg *vactx = VaapiContextFfmpeg::create(codecId);
         if (vactx)
@@ -268,7 +268,7 @@
 
     std::auto_ptr<GnashImage> im;
 
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
     VaapiContextFfmpeg * const vactx = get_vaapi_context(srcCtx);
     if (vactx) {
         VaapiSurfaceFfmpeg * const vaSurface = vaapi_get_surface(&srcFrameRef);
@@ -452,7 +452,7 @@
 inline VaapiContextFfmpeg*
 get_vaapi_context(AVCodecContext* avctx)
 {
-#if USE_VAAPI  
+#ifdef HAVE_VA_VA_H
     return static_cast<VaapiContextFfmpeg *>(avctx->hwaccel_context);
 #else
     UNUSED(avctx);
@@ -463,7 +463,7 @@
 inline void
 set_vaapi_context(AVCodecContext* avctx, VaapiContextFfmpeg* vactx)
 {
-#if USE_VAAPI  
+#ifdef HAVE_VA_VA_H
     avctx->hwaccel_context = vactx;
 #else
     UNUSED(avctx), UNUSED(vactx);
@@ -474,7 +474,7 @@
 inline void
 clear_vaapi_context(AVCodecContext* avctx)
 {
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
     VaapiContextFfmpeg* const vactx = get_vaapi_context(avctx);
     if (!vactx) return;
 
@@ -504,7 +504,7 @@
 PixelFormat
 get_format(AVCodecContext* avctx, const PixelFormat* fmt)
 {
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
     VaapiContextFfmpeg* const vactx = get_vaapi_context(avctx);
 
     if (vactx) {
@@ -529,7 +529,7 @@
     VaapiContextFfmpeg* const vactx = get_vaapi_context(avctx);
     if (!vactx) return avcodec_default_get_buffer(avctx, pic);
 
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
     if (!vactx->initDecoder(avctx->width, avctx->height)) return -1;
 
     VaapiSurfaceFfmpeg * const surface = vactx->getSurface();
@@ -567,7 +567,7 @@
         return;
     }
 
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
     VaapiSurfaceFfmpeg* const surface = vaapi_get_surface(pic);
     delete surface;
 

=== modified file 'librender/Renderer_agg.cpp'
--- a/librender/Renderer_agg.cpp        2010-03-14 23:13:09 +0000
+++ b/librender/Renderer_agg.cpp        2010-04-04 22:55:35 +0000
@@ -128,7 +128,7 @@
 #include "GC.h"
 #include "cxform.h"
 
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
 #include "GnashVaapiImage.h"
 #include "GnashVaapiImageProxy.h"
 #endif
@@ -773,7 +773,7 @@
         path.line_to(d.x, d.y);
         path.line_to(a.x, a.y);
 
-#if USE_VAAPI
+#ifdef HAVE_VA_VA_H
         if (frame->location() == GNASH_IMAGE_GPU) {
             RenderImage image;
             image.reset(new GnashVaapiImageProxy(

=== modified file 'librender/Renderer_ogl.cpp'
--- a/librender/Renderer_ogl.cpp        2010-03-31 16:30:28 +0000
+++ b/librender/Renderer_ogl.cpp        2010-04-04 22:55:35 +0000
@@ -45,7 +45,7 @@
 #include <boost/utility.hpp>
 #include <boost/bind.hpp>
 
-#if USE_VAAPI_GLX
+#ifdef HAVE_VA_VA_GLX_H
 #  include "GnashVaapiImage.h"
 #  include "GnashVaapiTexture.h"
 #endif
@@ -693,7 +693,7 @@
       case GNASH_IMAGE_CPU:
           frameFlags = 0;
           break;
-#if USE_VAAPI_GLX
+#ifdef HAVE_VA_VA_GLX_H
       case GNASH_IMAGE_GPU:
           frameFlags = GNASH_TEXTURE_VAAPI;
           break;
@@ -736,7 +736,7 @@
               // This case should never be reached if vaapi is not
               // enabled; but has to be handled to keep the compiler
               // happy.
-#if USE_VAAPI_GLX
+#ifdef HAVE_VA_VA_GLX_H
               texture.reset(new GnashVaapiTexture(frame->width(),
                                                   frame->height(),
                                                   frame->type()));
@@ -781,7 +781,7 @@
     case GNASH_IMAGE_CPU:
         texture->update(frame->data());
         break;
-#if USE_VAAPI_GLX
+#ifdef HAVE_VA_VA_GLX_H
     case GNASH_IMAGE_GPU:
         dynamic_cast<GnashVaapiTexture 
*>(texture.get())->update(dynamic_cast<GnashVaapiImage *>(frame)->surface());
         break;

=== modified file 'libvaapi/Makefile.am'
--- a/libvaapi/Makefile.am      2010-03-02 15:37:35 +0000
+++ b/libvaapi/Makefile.am      2010-04-04 22:55:35 +0000
@@ -64,7 +64,7 @@
        VaapiSurfaceProxy.h \
        $(NULL)
 
-if USE_VAAPI_GLX
+if HAVE_VAAPI_GLX
 libgnashvaapi_la_CPPFLAGS += \
        $(LIBVA_GLX_CFLAGS) \
        $(NULL)

=== modified file 'libvaapi/VaapiGlobalContext.cpp'
--- a/libvaapi/VaapiGlobalContext.cpp   2010-03-02 23:26:48 +0000
+++ b/libvaapi/VaapiGlobalContext.cpp   2010-04-04 22:55:35 +0000
@@ -24,7 +24,7 @@
 #include "log.h"
 #include "VaapiGlobalContext.h"
 #include "VaapiDisplayX11.h"
-#ifdef USE_VAAPI_GLX
+#ifdef HAVE_VA_VA_GLX_H
 #include "VaapiDisplayGLX.h"
 #endif
 #include "VaapiException.h"
@@ -137,7 +137,7 @@
         std::auto_ptr<VaapiDisplay> dpy;
         /* XXX: this won't work with multiple renders built-in */
         try {
-#if USE_VAAPI_GLX
+#if HAVE_VA_VA_GLX_H
             dpy.reset(new VaapiDisplayGLX());
 #else
             dpy.reset(new VaapiDisplayX11());

=== modified file 'macros/ffmpeg.m4'
--- a/macros/ffmpeg.m4  2010-03-14 02:26:46 +0000
+++ b/macros/ffmpeg.m4  2010-04-05 19:54:56 +0000
@@ -22,6 +22,7 @@
   backupCFLAGS="$CFLAGS"
   avcodec_h=""
   ffmpeg_top_incl=""
+  have_ffmpeg_vaapi="no"
 
   dnl If the user specify an path to include headers from, we assume it's the 
full
   dnl path to the header file, and not the top level path without the 'ffmpeg' 
node
@@ -260,10 +261,17 @@
       dnl 51.46.0 (r10741) or higher required for CODEC_ID_NELLYMOSER
       AC_MSG_WARN([This version of ffmpeg/libavcodec ($ffmpeg_version) is not 
able to decode NELLYMOSER encoded audio: 51.46.0 (r10741) or higher required!])
     else
-      AC_DEFINE(FFMPEG_NELLYMOSER, 1, [Define if ffmpeg can decode NELLYMOSER 
audio.])
+      AC_DEFINE(FFMPEG_NELLYMOSER, 1, [Define if ffmpeg can decode NELLYMOSER 
audio])
+    fi
+    if test -z "$ffmpeg_num_version" -o "$ffmpeg_num_version" -gt 524800; then
+      dnl 52.48.0 (r21285) or higher required for VAAPI support
+      have_ffmpeg_vaapi=yes
+      AC_DEFINE(FFMPEG_VAAPI, 1, [Define if ffmpeg supports VAAPI])
+    else
+      have_ffmpeg_vaapi=no
     fi
   else
-    AC_MSG_WARN([Could not check ffmpeg version (dunno where avcodec.h is)])
+    AC_MSG_WARN([Could not check ffmpeg version (can't find avcodec.h file)])
     # ffmpeg_version_check=ok # this is NOT ok, why would it be ?! 
   fi
 

=== modified file 'testsuite/misc-ming.all/Makefile.am'
--- a/testsuite/misc-ming.all/Makefile.am       2010-03-14 22:06:02 +0000
+++ b/testsuite/misc-ming.all/Makefile.am       2010-04-05 19:54:56 +0000
@@ -71,6 +71,7 @@
        $(MING_LIBS) \
        $(OPENGL_LIBS) \
        $(GIF_LIBS) \
+       $(top_builddir)/libbase/libgnashbase.la \
        $(top_builddir)/librender/libgnashrender.la \
        $(NULL)
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]