gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r12306: Minor improvements to media


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r12306: Minor improvements to media handler reporting.
Date: Thu, 15 Jul 2010 09:56:23 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 12306 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2010-07-15 09:56:23 +0200
message:
  Minor improvements to media handler reporting.
modified:
  Makefile.am
  configure.ac
  libmedia/MediaHandler.h
  libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
  libmedia/gst/MediaHandlerGst.cpp
=== modified file 'Makefile.am'
--- a/Makefile.am       2010-07-06 10:21:25 +0000
+++ b/Makefile.am       2010-07-15 06:18:47 +0000
@@ -359,7 +359,7 @@
        @echo "legit value"
        @echo ""
        @echo "Configurable options are:"
-       @echo " Media handler: $(MEDIA_CONFIG)"
+       @echo " Media handlers: $(MEDIA_CONFIG)"
        @echo " Renderer engines: $(RENDERER_CONFIG)"
        @echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
 

=== modified file 'configure.ac'
--- a/configure.ac      2010-07-14 19:41:35 +0000
+++ b/configure.ac      2010-07-15 06:18:47 +0000
@@ -900,7 +900,6 @@
 dnl  Select media handler
 dnl --------------------------------------------------------
 
-media_handler_specified=false
 AC_ARG_ENABLE(media,
   AC_HELP_STRING([--enable-media=handler],
     [Enable media handling support using the specified handler: gst, ffmpeg or 
none (no sound) [[gst]] ]),
@@ -913,14 +912,14 @@
       [case "${val}" in
         GST|gst)
           build_media_gst=yes
-          media_handler_specified=true
+          media_list="${media_list}gst "
           ;;
         FFMPEG|ffmpeg)
           build_media_ffmpeg=yes
-          media_handler_specified=true
+          media_list="${media_list}ffmpeg "
           ;;
         no|NO|none)
-          media_handler_specified=true
+          media_list="none"
           ;;
         *)
           AC_MSG_ERROR([bad value ${enableval} for --enable-media option])
@@ -932,9 +931,11 @@
         break;
       fi
     done,
-    [build_media_gst=yes; media_handler_specified=true]
+    [build_media_gst=yes]
 )
 
+MEDIA_CONFIG="${media_list}"
+AC_SUBST(MEDIA_CONFIG)
 
 dnl If we're on Haiku, there is only one supported media handler.
 if test x"${build_haiku}" = xyes; then
@@ -2232,24 +2233,10 @@
     GSTREAMER_LIBS="-lgstinterfaces-0.10 $GSTREAMER_LIBS"
     AC_DEFINE(HAS_GSTREAMER_PLUGINS_BASE, [1], "Has the Gstreamer Plugin Dev 
package installed.")
   fi
-  if test x"${media_handler_specified}" = xfalse; then
-    if test x"$GSTREAMER_LIBS" = x; then
-       AC_MSG_WARN([No appropriate gstreamer library found, will try using 
ffmpeg.])
-       build_media_gst=no
-       build_media_ffmpeg=yes
-    fi
-  fi
 fi
 
 if test x"$build_media_ffmpeg" = x"yes"; then
   GNASH_PATH_FFMPEG
-  if test x"${media_handler_specified}" = xfalse; then
-     # If the library is not found, or its version is not ok, we'll try gst
-     if test x"${ac_cv_path_ffmpeg_lib}" = x -o x"${ffmpeg_version_check}" != 
xok; then
-       AC_MSG_WARN([No appropriate ffmpeg library found, disabling media 
handling.])
-       build_media_ffmpeg=no
-     fi
-  fi
 fi
 
 if test x$build_cairo = xyes; then
@@ -2724,9 +2711,6 @@
 SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
 AC_SUBST(SUPPORTED_GUIS)
 
-MEDIA_CONFIG=${media_handler}
-AC_SUBST(MEDIA_CONFIG)
-
 dnl AC_CONFIG_LINKS(doc/C/images)
 dnl AC_CONFIG_LINKS(gnashconfig.h,libltdl/config.h)
 
AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
@@ -3015,28 +2999,6 @@
   echo "                     or .rpm users: yum install libpng-devel" >&4
 fi
 
-dnl if test x"$OGG_LIBS" != x; then
-dnl   if test x"$OGG_CFLAGS" != x; then
-dnl     echo "        Ogg flags are: $OGG_CFLAGS"
-dnl   else
-dnl     echo "        Ogg flags are: default include path"
-dnl   fi
-dnl   echo "        Ogg libs are: $OGG_LIBS"
-dnl else
-dnl   echo "        ERROR: No Ogg Vorbis development package installed!" >&3
-dnl fi
-
-dnl if test x"$VORBIS_LIBS" != x; then
-dnl   if test x"$VORBIS_CFLAGS" != x; then
-dnl     echo "        VORBIS flags are: $VORBIS_CFLAGS"
-dnl   else
-dnl     echo "        VORBIS flags are: default include path"
-dnl   fi
-dnl   echo "        VORBIS libs are: $VORBIS_LIBS"
-dnl else
-dnl   echo "        ERROR: No VORBIS Vorbis development package installed!" >&3
-dnl fi
-
 if test x"${build_ogl}" = x"yes"; then
   if test x"$OPENGL_LIBS" != x; then
     if test x"$OPENGL_CFLAGS" != x; then
@@ -3308,8 +3270,6 @@
     echo "               or .rpm users: yum install SDL-devel" >&3
     test x$build_sdl = xyes &&
        echo "               or select a different GUI with --enable-gui= " >&3
-    test x"$media_handler" = x"ffmpeg" &&
-       echo "               or use --enable-media=gst" >&3
   fi
 fi
 unset need_sdl
@@ -3718,7 +3678,7 @@
 fi
 
 dnl Haiku
-if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o 
x"${media_handler}" = x"mkit"; then
+if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o 
x"${build_media_haiku}" = x"yes"; then
     echo "        Haiku libs are: $HAIKU_LIBS"
 fi
  
@@ -3842,7 +3802,7 @@
 echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
 echo "        Renderers supported: ${renderer_list}"
 echo "        Hardware Acceleration: ${hwaccel_list}"
-echo "        Media handler: "$media_handler
+echo "        Media handlers: ${media_list}"
 echo "        Using ${add_sound} for sound handling"
 echo "        Using $with_shm mode for shared memory"
 

=== modified file 'libmedia/MediaHandler.h'
--- a/libmedia/MediaHandler.h   2010-07-14 13:26:31 +0000
+++ b/libmedia/MediaHandler.h   2010-07-15 06:33:18 +0000
@@ -136,6 +136,11 @@
 
 protected:
 
+    /// Base constructor
+    //
+    /// This is an abstract base class, so not instantiable anyway.
+    MediaHandler() {}
+
     /// Create an AudioDecoder for FLASH codecs 
     //
     /// This method is attempted as a fallback in case
@@ -156,14 +161,10 @@
     /// If this cannot read the necessary 3 bytes, it throws an IOException.
     bool isFLV(IOChannel& stream) throw (IOException);
 
-protected:
-
-    MediaHandler() {}
-
 };
 
 
 } // gnash.media namespace 
 } // namespace gnash
 
-#endif // __MEDIAHANDLER_H__
+#endif 

=== modified file 'libmedia/ffmpeg/MediaHandlerFfmpeg.cpp'
--- a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp    2010-07-14 13:26:31 +0000
+++ b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp    2010-07-15 06:33:18 +0000
@@ -19,6 +19,9 @@
 
 
 #include "MediaHandler.h"
+
+#include <sstream>
+
 #include "MediaParser.h"
 #include "MediaParserFfmpeg.h"
 #include "VideoDecoderFfmpeg.h"
@@ -28,20 +31,24 @@
 #include "VideoConverterFfmpeg.h"
 #include "VideoInputFfmpeg.h"
 #include "AudioInputFfmpeg.h"
-
-#include "IOChannel.h" // for visibility of destructor
+#include "IOChannel.h" 
 
 namespace gnash { 
 namespace media {
 namespace ffmpeg {
 
 /// FFMPEG based MediaHandler
-class DSOEXPORT MediaHandlerFfmpeg : public MediaHandler
+class MediaHandlerFfmpeg : public MediaHandler
 {
 public:
 
     virtual std::string description() const {
-        return "FFmpeg Media Handler";
+        std::ostringstream ss;
+        const boost::uint32_t ver = avcodec_version();
+        ss << "FFmpeg (avcodec version: " << (ver >> 16) << "."
+                                          << (ver & 0xff00 >> 8)  << "."
+                                          << (ver & 0xff) << ")";
+        return ss.str();
     }
 
        virtual std::auto_ptr<MediaParser>

=== modified file 'libmedia/gst/MediaHandlerGst.cpp'
--- a/libmedia/gst/MediaHandlerGst.cpp  2010-07-14 13:26:31 +0000
+++ b/libmedia/gst/MediaHandlerGst.cpp  2010-07-15 06:33:18 +0000
@@ -50,8 +50,7 @@
 /// It uses gstreamer: http://gstreamer.freedesktop.org/
 ///
 /// Starting point is MediaHandlerGst.
-/// 
-class DSOEXPORT MediaHandlerGst : public MediaHandler
+class MediaHandlerGst : public MediaHandler
 {
 public:
 
@@ -59,8 +58,7 @@
         guint major, minor, micro, nano;
         gst_version(&major, &minor, &micro, &nano);
         std::ostringstream s;
-        s << _("Gstreamer Media Handler, gst version: ") <<  major << "." 
-            << minor << "." << micro;
+        s << _("Gstreamer ") <<  major << "." << minor << "." << micro;
         return s.str();
     }
 


reply via email to

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