From 7462932cb7d8d1f3899cfb7b1717a01aaa620461 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Jan 21 2010 20:32:28 +0000 Subject: - snarf mdv patches --- diff --git a/phonon-4.2.0-ogg-mime-type.patch b/phonon-4.2.0-ogg-mime-type.patch new file mode 100644 index 0000000..1213b3a --- /dev/null +++ b/phonon-4.2.0-ogg-mime-type.patch @@ -0,0 +1,20 @@ +Index: gstreamer/backend.cpp +=================================================================== +--- gstreamer/backend.cpp (revision 862019) ++++ gstreamer/backend.cpp (working copy) +@@ -226,6 +227,15 @@ + } + } + g_list_free(factoryList); ++ if (availableMimeTypes.contains("audio/x-vorbis") ++ && availableMimeTypes.contains("application/x-ogm-audio")) { ++ if (!availableMimeTypes.contains("audio/x-vorbis+ogg")) ++ availableMimeTypes.append("audio/x-vorbis+ogg"); ++ if (!availableMimeTypes.contains("application/ogg")) /* *.ogg */ ++ availableMimeTypes.append("application/ogg"); ++ if (!availableMimeTypes.contains("audio/ogg")) /* *.oga */ ++ availableMimeTypes.append("audio/ogg"); ++ } + availableMimeTypes.sort(); + return availableMimeTypes; + } diff --git a/phonon-4.3.50-fix-decodebin-usage.patch b/phonon-4.3.50-fix-decodebin-usage.patch new file mode 100644 index 0000000..4b9bdcf --- /dev/null +++ b/phonon-4.3.50-fix-decodebin-usage.patch @@ -0,0 +1,27 @@ +Index: gstreamer/mediaobject.cpp +=================================================================== +--- gstreamer/mediaobject.cpp (revision 1040729) ++++ gstreamer/mediaobject.cpp (working copy) +@@ -484,7 +484,7 @@ + gst_object_ref (GST_OBJECT (m_pipeline)); + gst_object_sink (GST_OBJECT (m_pipeline)); + +- m_decodebin = gst_element_factory_make ("decodebin", NULL); ++ m_decodebin = gst_element_factory_make ("decodebin2", NULL); + g_signal_connect (m_decodebin, "new-decoded-pad", G_CALLBACK (&cb_newpad), this); + g_signal_connect (m_decodebin, "unknown-type", G_CALLBACK (&cb_unknown_type), this); + g_signal_connect (m_decodebin, "no-more-pads", G_CALLBACK (&cb_no_more_pads), this); +Index: gstreamer/gsthelper.cpp +=================================================================== +--- gstreamer/gsthelper.cpp (revision 1040694) ++++ gstreamer/gsthelper.cpp (working copy) +@@ -121,7 +121,7 @@ + { + GstElement *playbin = 0; + //init playbin and add to our pipeline +- playbin = gst_element_factory_make("playbin", NULL); ++ playbin = gst_element_factory_make("playbin2", NULL); + + //Create an identity element to redirect sound + GstElement *audioSinkBin = gst_bin_new (NULL); + diff --git a/phonon-4.3.50-gstreamer-fix-seekable-query-failed.patch b/phonon-4.3.50-gstreamer-fix-seekable-query-failed.patch new file mode 100644 index 0000000..7ab051c --- /dev/null +++ b/phonon-4.3.50-gstreamer-fix-seekable-query-failed.patch @@ -0,0 +1,15 @@ +diff -Naur phonon-4.3.50.orig/gstreamer/mediaobject.cpp phonon-4.3.50/gstreamer/mediaobject.cpp +--- phonon-4.3.50.orig/gstreamer/mediaobject.cpp 2009-10-11 02:24:30.000000000 +0200 ++++ phonon-4.3.50/gstreamer/mediaobject.cpp 2009-10-11 02:28:25.000000000 +0200 +@@ -852,6 +852,10 @@ + else + m_backend->logMessage("Stream is non-seekable", Backend::Info, this); + } else { ++ if (m_seekable) { ++ m_seekable = false; ++ emit seekableChanged(m_seekable); ++ } + m_backend->logMessage("updateSeekable query failed", Backend::Info, this); + } + gst_query_unref (query); + diff --git a/phonon-4.3.50-phonon-allow-stop-empty-source.patch b/phonon-4.3.50-phonon-allow-stop-empty-source.patch new file mode 100644 index 0000000..9ddf7d2 --- /dev/null +++ b/phonon-4.3.50-phonon-allow-stop-empty-source.patch @@ -0,0 +1,13 @@ +diff -Naur phonon-4.3.50.orig/phonon/mediaobject.cpp phonon-4.3.50/phonon/mediaobject.cpp +--- phonon-4.3.50.orig/phonon/mediaobject.cpp 2009-02-26 22:33:54.000000000 +0100 ++++ phonon-4.3.50/phonon/mediaobject.cpp 2009-10-12 22:48:22.000000000 +0200 +@@ -114,7 +114,7 @@ + void MediaObject::stop() + { + K_D(MediaObject); +- if (d->backendObject() && isPlayable(d->mediaSource.type())) { ++ if (d->backendObject() && d->mediaSource.type() != MediaSource::Invalid) { + INTERFACE_CALL(stop()); + } + } + diff --git a/phonon-4.3.80-fix-gstreamer-pulseaudio-deadlock.patch b/phonon-4.3.80-fix-gstreamer-pulseaudio-deadlock.patch new file mode 100644 index 0000000..b11abf2 --- /dev/null +++ b/phonon-4.3.80-fix-gstreamer-pulseaudio-deadlock.patch @@ -0,0 +1,63 @@ +From 104872f266cf6675e27cc6e122300f4ed5baf3ab Mon Sep 17 00:00:00 2001 +From: Colin Guthrie +Date: Wed, 13 Jan 2010 22:57:29 +0000 +Subject: [PATCH] gstreamer: Fix a problem where the fact a reset was needed was lost. + +If you create the path (createPath()) *before* setting the media source, +(setCurrentSource()) the gstreamer backend would forget the fact that a reset +was needed and ultimately end up in an error state. + +This change simply does not wipe out the m_resetNeeded flag when +the source is set and leaves it as it is. + +This fixes the test case application posted on +https://qa.mandriva.com/show_bug.cgi?id=56807 +--- + gstreamer/mediaobject.cpp | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp +index 15eb080..40e4246 100644 +--- a/gstreamer/mediaobject.cpp ++++ b/gstreamer/mediaobject.cpp +@@ -916,7 +916,9 @@ void MediaObject::setSource(const MediaSource &source) + // Go into to loading state + changeState(Phonon::LoadingState); + m_loading = true; +- m_resetNeeded = false; ++ // IMPORTANT: Honor the m_resetNeeded flag as it currently stands. ++ // See https://qa.mandriva.com/show_bug.cgi?id=56807 ++ //m_resetNeeded = false; + m_resumeState = false; + m_pendingState = Phonon::StoppedState; + +-- +1.6.6 + +commit 6fbea9b56a12281819a8c04afd5caa53cfeee39f +Author: cguthrie +Date: Thu Jan 21 18:23:12 2010 +0000 + + gstreamer: Fix a problem encountered when playing, stopping and playing again. + + As reported by Harald Fernengel, a similar problem to that fixed in r1076454 + also exists when you play->stop->play a media object. + + This should fix the issue by marking a reset needed whenever we reach the stopped state. + Thanks to Harald for finding the problem and pointing the way to the fix. + + git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/kdesupport/phonon@1078188 283d02a7-25f6-0310-bc7c-ecb5cbfe19da + +diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp +index 509e749..d1707dd 100644 +--- a/gstreamer/mediaobject.cpp ++++ b/gstreamer/mediaobject.cpp +@@ -741,6 +741,8 @@ void MediaObject::changeState(State newstate) + + case Phonon::StoppedState: + m_backend->logMessage("phonon state changed: Stopped", Backend::Info, this); ++ // We must reset the pipeline when playing again ++ m_resetNeeded = true; + m_tickTimer->stop(); + break; + diff --git a/phonon.spec b/phonon.spec index 42ef77e..f240d29 100644 --- a/phonon.spec +++ b/phonon.spec @@ -4,7 +4,7 @@ Summary: Multimedia framework api Name: phonon Version: 4.3.80 -Release: 3%{?dist} +Release: 4%{?dist} Group: System Environment/Libraries License: LGPLv2+ URL: http://phonon.kde.org/ @@ -26,8 +26,14 @@ Source16: hi128-phonon-gstreamer.png # maybe we can just wait for the improvie PA support to land. Patch1: phonon-4.3.50-xine_pulseaudio.patch +## Mandriva/upstreamable patches +Patch50: phonon-4.2.0-ogg-mime-type.patch +Patch51: phonon-4.3.50-fix-decodebin-usage.patch +Patch52: phonon-4.3.50-gstreamer-fix-seekable-query-failed.patch +Patch53: phonon-4.3.50-phonon-allow-stop-empty-source.patch +Patch54: phonon-4.3.80-fix-gstreamer-pulseaudio-deadlock.patch + ## Upstream patches -Patch100: phonon-4.3.80-gstreamer-resetneeded.patch BuildRequires: automoc4 >= 0.9.86 BuildRequires: cmake >= 2.6.0 @@ -89,12 +95,20 @@ Provides: %{name}-backend-gst = %{version}-%{release} %if 0%{?pa_keep_old_hacks} %patch1 -p1 -b .xine_pulseaudio %endif -%patch100 -p0 -b .resetneeded + +%patch50 -p0 -b .ogg-mime-type +%patch51 -p0 -b .fix-decodebin-usage +%patch52 -p1 -b .gstreamer-fix-seekable-query-failed +%patch53 -p1 -b .phonon-allow-stop-empty-source +%patch54 -p1 -b .gstreamer-pulseaudio-deadlock + %build mkdir -p %{_target_platform} pushd %{_target_platform} -%{cmake} .. +%{cmake} \ + -DUSE_INSTALL_PLUGIN=TRUE \ + .. popd make %{?_smp_mflags} -C %{_target_platform}%{?xine_only:/xine} @@ -191,6 +205,9 @@ gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: %changelog +* Thu Jan 21 2010 Rex Dieter - 4.3.80-4 +- snarf mdv patches + * Mon Jan 18 2010 Than Ngo - 4.3.80-3 - backport GStreamer backend bugfixes, fix random disappearing sound under KDE