r168 - in /packages/gnash/trunk/debian/patches: exclude-testsuite-from-built gnash_easy_codec_install gnashg_png.patch ming_headers.patch no-kde-ldflags series
baby-guest at users.alioth.debian.org
baby-guest at users.alioth.debian.org
Thu Feb 14 14:55:31 UTC 2008
Author: baby-guest
Date: Thu Feb 14 14:55:31 2008
New Revision: 168
URL: http://svn.debian.org/wsvn/pkg-flash/?sc=1&rev=168
Log:
Remove patches
Added:
packages/gnash/trunk/debian/patches/gnash_easy_codec_install
Removed:
packages/gnash/trunk/debian/patches/exclude-testsuite-from-built
packages/gnash/trunk/debian/patches/gnashg_png.patch
packages/gnash/trunk/debian/patches/ming_headers.patch
packages/gnash/trunk/debian/patches/no-kde-ldflags
Modified:
packages/gnash/trunk/debian/patches/series
Added: packages/gnash/trunk/debian/patches/gnash_easy_codec_install
URL: http://svn.debian.org/wsvn/pkg-flash/packages/gnash/trunk/debian/patches/gnash_easy_codec_install?rev=168&op=file
==============================================================================
--- packages/gnash/trunk/debian/patches/gnash_easy_codec_install (added)
+++ packages/gnash/trunk/debian/patches/gnash_easy_codec_install Thu Feb 14 14:55:31 2008
@@ -1,0 +1,339 @@
+=== removed file 'po/gnash.pot'
+
+=== modified file 'configure.ac'
+---
+ configure.ac | 2
+ server/asobj/NetStreamGst.cpp | 163 ++++++++++++++++++++++++++++++++++++------
+ 2 files changed, 145 insertions(+), 20 deletions(-)
+
+Index: gnash-0.8.0~cvs20070611.1016/configure.ac
+===================================================================
+--- gnash-0.8.0~cvs20070611.1016.orig/configure.ac 2007-06-12 15:12:45.000000000 +0000
++++ gnash-0.8.0~cvs20070611.1016/configure.ac 2007-06-12 15:14:45.000000000 +0000
+@@ -893,16 +893,18 @@
+ if test "$media_handler" = "gst"; then
+ GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, [0.10])
+ if test x"${media_handler_specified}" = xfalse; then
+ # If the library is not found, or its version is not ok, we'll try mad
+ if test x"$GSTREAMER_LIBS" = x; then
+ AC_MSG_WARN([No appropriate gstreamer library found, will try using mad.])
+ media_handler=mad
+ fi
++ else
++ GSTREAMER_LIBS="$GSTREAMER_LIBS -lgstpbutils-0.10"
+ fi
+ fi
+
+
+ if test x"$media_handler" = x"mad"; then
+ dnl Will set MAD_LIBS and MAD_CFLAGS.
+ dnl Handles --with-mad-incl and --with-mad-lib
+ GNASH_PKG_FIND(mad, [mad.h], [mad library], mad_copyright)
+Index: gnash-0.8.0~cvs20070611.1016/server/asobj/NetStreamGst.cpp
+===================================================================
+--- gnash-0.8.0~cvs20070611.1016.orig/server/asobj/NetStreamGst.cpp 2007-06-01 15:23:35.000000000 +0000
++++ gnash-0.8.0~cvs20070611.1016/server/asobj/NetStreamGst.cpp 2007-06-12 15:14:45.000000000 +0000
+@@ -32,16 +32,19 @@
+ #include "URLAccessManager.h"
+ #include "render.h"
+ #include "movie_root.h"
+ #include "NetConnection.h"
+ //#include "action.h"
+
+ #include "gstgnashsrc.h"
+
++#include <gst/pbutils/missing-plugins.h>
++#include <gst/pbutils/install-plugins.h>
++
+ #include "URL.h"
+
+ // Define the following macro to enable debugging traces
+ //#define GNASH_DEBUG
+
+ namespace gnash {
+
+ static gboolean
+@@ -520,27 +523,110 @@
+ {
+ if ( ! buildFLVSoundPipeline(audio) ) return false;
+ }
+
+ return true;
+
+ }
+
++static void
++GstInstallPluginsResultCb (GstInstallPluginsReturn result,
++ gpointer user_data)
++{
++ g_debug("JAU RESULTO MENDO");
++}
++
++static gboolean
++NetStreamGst_install_missing_codecs(GList *missing_plugin_details)
++{
++
++ GstInstallPluginsReturn rv;
++ int i,c;
++ gchar **details = g_new0(gchar*, c+1);
++ GstInstallPluginsContext *install_ctx = gst_install_plugins_context_new();
++
++ c=g_list_length(missing_plugin_details);
++
++ for(i=0; i < c; i++)
++ {
++ details[i] = (gchar*) g_list_nth_data(missing_plugin_details, i);
++ }
++
++ rv = gst_install_plugins_sync (details,
++ install_ctx);
++
++ g_strfreev(details);
++
++ switch(rv) {
++ case GST_INSTALL_PLUGINS_SUCCESS:
++ if(!gst_update_registry())
++ g_warning("we failed to update gst registry for new codecs");
++ else
++ return true;
++ break;
++ case GST_INSTALL_PLUGINS_NOT_FOUND:
++ g_debug("gst_install_plugins_sync -> GST_INSTALL_PLUGINS_NOT_FOUND");
++ break;
++ case GST_INSTALL_PLUGINS_ERROR:
++ g_debug("gst_install_plugins_sync -> GST_INSTALL_PLUGINS_ERROR");
++ break;
++ case GST_INSTALL_PLUGINS_PARTIAL_SUCCESS:
++ g_debug("gst_install_plugins_sync -> GST_INSTALL_PLUGINS_PARTIAL_SUCCESS");
++ break;
++ case GST_INSTALL_PLUGINS_USER_ABORT:
++ g_debug("gst_install_plugins_sync -> GST_INSTALL_PLUGINS_USER_ABORT");
++ break;
++ case GST_INSTALL_PLUGINS_CRASHED:
++ g_debug("gst_install_plugins_sync -> GST_INSTALL_PLUGINS_CRASHED");
++ break;
++ case GST_INSTALL_PLUGINS_INVALID:
++ g_warning("gst_install_plugins_sync -> GST_INSTALL_PLUGINS_INVALID");
++ break;
++ default:
++ g_warning("gst_install_plugins_sync -> UNEXPECTED RESULT (undocumented value)");
++ break;
++ };
++
++ return false;
++}
++
++static GList*
++NetStreamGst_append_missing_codec_to_details (GList *list,
++ GstElement *source,
++ const GstCaps* caps)
++{
++ GstMessage *missing_msg;
++ missing_msg = gst_missing_decoder_message_new(source,
++ caps);
++ gchar* detail = gst_missing_plugin_message_get_installer_detail(missing_msg);
++
++ if(!detail)
++ {
++ g_warning("missing message details not found. No details added.");
++ return list;
++ }
++
++ return g_list_append(list, detail);
++}
++
++
+ bool
+ NetStreamGst::buildFLVVideoPipeline(bool &video)
+ {
+ #ifdef GNASH_DEBUG
+ log_debug("Building FLV video decoding pipeline");
+ #endif
+
+ FLVVideoInfo* videoInfo = m_parser->getVideoInfo();
+
+ bool doVideo = video;
+
++ GList *missing_plugin_details = NULL;
++ retry:
+ if (videoInfo) {
+ doVideo = true;
+ videosource = gst_element_factory_make ("fakesrc", NULL);
+ if ( ! videosource )
+ {
+ log_error("Unable to create videosource 'fakesrc' element");
+ return false;
+ }
+@@ -573,80 +659,98 @@
+ "height", G_TYPE_INT, videoInfo->height,
+ "framerate", GST_TYPE_FRACTION, fps, 1,
+ "flvversion", G_TYPE_INT, 1,
+ NULL);
+ videodecoder = gst_element_factory_make ("ffdec_flv", NULL);
+ if ( ! videodecoder )
+ {
+ log_error("Unable to create videodecoder 'ffdec_flv' element");
+- return false;
+- }
+-
+- // Check if the element was correctly created
+- if (!videodecoder) {
+- log_error(_("A gstreamer flashvideo (h.263) decoder element could not be created. You probably need to install gst-ffmpeg."));
+- return false;
++ missing_plugin_details = NetStreamGst_append_missing_codec_to_details
++ (missing_plugin_details,
++ videosource,
++ videonincaps);
+ }
+
+ } else if (videoInfo->codec == VIDEO_CODEC_VP6) {
+ videonincaps = gst_caps_new_simple ("video/x-vp6-flash",
+ "width", G_TYPE_INT, 320, // We don't yet have a size extract for this codec, so we guess...
+ "height", G_TYPE_INT, 240,
+ "framerate", GST_TYPE_FRACTION, fps, 1,
+ NULL);
+ videodecoder = gst_element_factory_make ("ffdec_vp6f", NULL);
+ if ( ! videodecoder )
+ {
+ log_error("Unable to create videodecoder 'ffdec_vp6f' element");
+- return false;
+- }
+-
+- // Check if the element was correctly created
+- if (!videodecoder) {
+- log_error(_("A gstreamer flashvideo (VP6) decoder element could not be created! You probably need to install gst-ffmpeg."));
+- return false;
++ missing_plugin_details = NetStreamGst_append_missing_codec_to_details
++ (missing_plugin_details,
++ videosource,
++ videonincaps);
+ }
+
+ } else if (videoInfo->codec == VIDEO_CODEC_SCREENVIDEO) {
+ videonincaps = gst_caps_new_simple ("video/x-flash-screen",
+ "width", G_TYPE_INT, 320, // We don't yet have a size extract for this codec, so we guess...
+ "height", G_TYPE_INT, 240,
+ "framerate", GST_TYPE_FRACTION, fps, 1,
+ NULL);
+ videodecoder = gst_element_factory_make ("ffdec_flashsv", NULL);
+
+ // Check if the element was correctly created
+ if (!videodecoder) {
+ log_error(_("A gstreamer flashvideo (ScreenVideo) decoder element could not be created! You probably need to install gst-ffmpeg."));
+- return false;
++ missing_plugin_details = NetStreamGst_append_missing_codec_to_details
++ (missing_plugin_details,
++ videosource,
++ videonincaps);
+ }
+
+ } else {
+ log_error(_("Unsupported video codec %d"), videoInfo->codec);
+ return false;
+ }
+
+- g_object_set (G_OBJECT (videoinputcaps), "caps", videonincaps, NULL);
+- gst_caps_unref (videonincaps);
++ if(g_list_length(missing_plugin_details) == 0)
++ {
++ g_object_set (G_OBJECT (videoinputcaps), "caps", videonincaps, NULL);
++ gst_caps_unref (videonincaps);
++ }
+ }
+- video = doVideo;
+
+- return true;
+
++ if(g_list_length(missing_plugin_details) == 0)
++ {
++ g_debug("no missing plugins found");
++ video = doVideo;
++ return true;
++ }
++
++ g_debug("try to install missing plugins (count=%d)", g_list_length(missing_plugin_details));
++ if(NetStreamGst_install_missing_codecs(missing_plugin_details))
++ {
++ disconnectVideoHandoffSignal();
++ g_list_free(missing_plugin_details);
++ missing_plugin_details = NULL;
++ g_debug("gst_install_plugins_sync -> GST_INSTALL_PLUGINS_SUCCESS ... one more roundtrip");
++ goto retry;
++ }
++ g_list_free(missing_plugin_details);
++ return false;
+ }
+
+ bool
+ NetStreamGst::buildFLVSoundPipeline(bool &sound)
+ {
+ bool doSound = sound;
+
+ FLVAudioInfo* audioInfo = m_parser->getAudioInfo();
+ if (!audioInfo) doSound = false;
+
++ GList *missing_plugin_details = NULL;
++ retry:
+ if (doSound) {
+
+ #ifdef GNASH_DEBUG
+ log_debug("Building FLV video decoding pipeline");
+ #endif
+
+ audiosource = gst_element_factory_make ("fakesrc", NULL);
+ if ( ! audiosource )
+@@ -672,17 +776,16 @@
+ audiodecoder = gst_element_factory_make ("mad", NULL);
+ if ( ! audiodecoder )
+ {
+ audiodecoder = gst_element_factory_make ("flump3dec", NULL);
+ // Check if the element was correctly created
+ if (!audiodecoder)
+ {
+ log_error(_("A gstreamer mp3-decoder element could not be created! You probably need to install a mp3-decoder plugin like gstreamer0.10-mad or gstreamer0.10-fluendo-mp3."));
+- return false;
+ }
+ }
+
+
+ // Set the info about the stream so that gstreamer knows what it is.
+ audioinputcaps = gst_element_factory_make ("capsfilter", NULL);
+ if (!audioinputcaps)
+ {
+@@ -690,16 +793,36 @@
+ return false;
+ }
+
+ GstCaps* audioincaps = gst_caps_new_simple ("audio/mpeg",
+ "mpegversion", G_TYPE_INT, 1,
+ "layer", G_TYPE_INT, 3,
+ "rate", G_TYPE_INT, audioInfo->sampleRate,
+ "channels", G_TYPE_INT, audioInfo->stereo ? 2 : 1, NULL);
++
++ if(!audiodecoder)
++ {
++ missing_plugin_details = NetStreamGst_append_missing_codec_to_details
++ (missing_plugin_details,
++ audiosource,
++ audioincaps);
++
++ if(NetStreamGst_install_missing_codecs(missing_plugin_details))
++ {
++ disconnectAudioHandoffSignal();
++ g_list_free(missing_plugin_details);
++ missing_plugin_details = NULL;
++ g_debug("gst_install_plugins_sync -> GST_INSTALL_PLUGINS_SUCCESS ... one more roundtrip");
++ goto retry;
++ }
++
++ g_list_free(missing_plugin_details);
++ return false;
++ }
+ g_object_set (G_OBJECT (audioinputcaps), "caps", audioincaps, NULL);
+ gst_caps_unref (audioincaps);
+ } else {
+ log_error(_("Unsupported audio codec %d"), audioInfo->codec);
+ return false;
+ }
+ }
+
Modified: packages/gnash/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-flash/packages/gnash/trunk/debian/patches/series?rev=168&op=diff
==============================================================================
--- packages/gnash/trunk/debian/patches/series (original)
+++ packages/gnash/trunk/debian/patches/series Thu Feb 14 14:55:31 2008
@@ -1,4 +1,0 @@
-ming_headers.patch
-exclude-testsuite-from-built
-#no-kde-ldflags
-gnashg_png.patch
More information about the pkg-flash-devel
mailing list