From 1531ff7bee0c81709757da0495a0f0df358b615c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Aug 13 2012 12:53:32 +0000 Subject: 4.6.2 --- diff --git a/.gitignore b/.gitignore index 83eb673..84c7f09 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/phonon-backend-gstreamer-4.6.1.tar.xz +/phonon-backend-gstreamer-4.6.2.tar.xz diff --git a/0001-introduce-bool-to-track-whether-abouttofinish-is-run.patch b/0001-introduce-bool-to-track-whether-abouttofinish-is-run.patch deleted file mode 100644 index c43ac14..0000000 --- a/0001-introduce-bool-to-track-whether-abouttofinish-is-run.patch +++ /dev/null @@ -1,59 +0,0 @@ -From a13ae0338ce6e5b1ddd40b04b18ef77287488a51 Mon Sep 17 00:00:00 2001 -From: Harald Sitter -Date: Thu, 26 Jul 2012 15:10:47 +0200 -Subject: [PATCH 1/4] introduce bool to track whether abouttofinish is running - and reset skipping - ---- - gstreamer/mediaobject.cpp | 4 ++++ - gstreamer/mediaobject.h | 3 +++ - 2 files changed, 7 insertions(+) - -diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp -index dab18ba..ded4bcd 100644 ---- a/gstreamer/mediaobject.cpp -+++ b/gstreamer/mediaobject.cpp -@@ -79,6 +79,7 @@ MediaObject::MediaObject(Backend *backend, QObject *parent) - , m_skippingEOS(false) - , m_skipGapless(false) - , m_doingEOS(false) -+ , m_handlingAboutToFinish(false) - { - qRegisterMetaType("GstCaps*"); - qRegisterMetaType("State"); -@@ -846,6 +847,7 @@ void MediaObject::handleAboutToFinish() - DEBUG_BLOCK; - debug() << "About to finish"; - m_aboutToFinishLock.lock(); -+ m_handlingAboutToFinish = true; - emit aboutToFinish(); - // Three seconds should be more than enough for any application to get their act together. - // Any longer than that and they have bigger issues. If Phonon does no supply a next source -@@ -858,8 +860,10 @@ void MediaObject::handleAboutToFinish() - } - } else { - debug() << "Skipping gapless audio"; -+ m_skippingEOS = false; - } - m_skipGapless = false; -+ m_handlingAboutToFinish = false; - m_aboutToFinishLock.unlock(); - } - -diff --git a/gstreamer/mediaobject.h b/gstreamer/mediaobject.h -index 62374a2..be62eda 100644 ---- a/gstreamer/mediaobject.h -+++ b/gstreamer/mediaobject.h -@@ -283,6 +283,9 @@ private: - - qint64 m_lastTime; - bool m_skipGapless; -+ -+ /*** Tracks whereever the MO is actively handling an aboutToFinish CB right now. */ -+ bool m_handlingAboutToFinish; - }; - } - } //namespace Phonon::Gstreamer --- -1.7.11.2 - diff --git a/0002-only-set-skipgapless-and-wake-the-condition-iff-abou.patch b/0002-only-set-skipgapless-and-wake-the-condition-iff-abou.patch deleted file mode 100644 index b7fa43c..0000000 --- a/0002-only-set-skipgapless-and-wake-the-condition-iff-abou.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 12cdb007c036fe6c03f592b7cc5f976440cd99b9 Mon Sep 17 00:00:00 2001 -From: Harald Sitter -Date: Thu, 26 Jul 2012 15:11:18 +0200 -Subject: [PATCH 2/4] only set skipgapless and wake the condition iff - abouttofinish is active - ---- - gstreamer/mediaobject.cpp | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp -index ded4bcd..957f7fd 100644 ---- a/gstreamer/mediaobject.cpp -+++ b/gstreamer/mediaobject.cpp -@@ -817,10 +817,17 @@ void MediaObject::setMetaData(QMultiMap newData) - void MediaObject::requestState(Phonon::State state) - { - DEBUG_BLOCK; -- m_aboutToFinishLock.tryLock(); -- m_skipGapless = true; -- m_aboutToFinishWait.wakeAll(); -- m_aboutToFinishLock.unlock(); -+ // Only abort handling here iff the handler is active. -+ if (m_aboutToFinishLock.tryLock()) { -+ // Note that this is not condition to unlocking, so the nesting is -+ // necessary. -+ if (m_handlingAboutToFinish) { -+ qDebug() << "Aborting aboutToFinish handling."; -+ m_skipGapless = true; -+ m_aboutToFinishWait.wakeAll(); -+ } -+ m_aboutToFinishLock.unlock(); -+ } - debug() << state; - switch (state) { - case Phonon::PlayingState: --- -1.7.11.2 - diff --git a/0003-only-handle-setNextSource-iff-abouttofinish-is-activ.patch b/0003-only-handle-setNextSource-iff-abouttofinish-is-activ.patch deleted file mode 100644 index 96992b0..0000000 --- a/0003-only-handle-setNextSource-iff-abouttofinish-is-activ.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 70cc6e14d2f36a88a4202142fb1a723b76f9ac5d Mon Sep 17 00:00:00 2001 -From: Harald Sitter -Date: Thu, 26 Jul 2012 15:12:17 +0200 -Subject: [PATCH 3/4] only handle setNextSource iff abouttofinish is active - -if we go to stopped after phonon handed us a source it will simply set -it as regular source, so we do not need any special handling for the -next source call at all ---- - gstreamer/mediaobject.cpp | 33 ++++++++++++++++++--------------- - 1 file changed, 18 insertions(+), 15 deletions(-) - -diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp -index 957f7fd..8ba8574 100644 ---- a/gstreamer/mediaobject.cpp -+++ b/gstreamer/mediaobject.cpp -@@ -339,23 +339,26 @@ void MediaObject::autoDetectSubtitle() - void MediaObject::setNextSource(const MediaSource &source) - { - DEBUG_BLOCK; -- debug() << "Got next source. Waiting for end of current."; - - m_aboutToFinishLock.lock(); -- -- // If next source is valid and is not empty (an empty source is sent by Phonon if -- // there are no more sources) skip EOS for the current source in order to seamlessly -- // pass to the next source. -- if (source.type() == Phonon::MediaSource::Invalid || -- source.type() == Phonon::MediaSource::Empty) -- m_skippingEOS = false; -- else -- m_skippingEOS = true; -- -- m_waitingForNextSource = true; -- m_waitingForPreviousSource = false; -- m_pipeline->setSource(source); -- m_aboutToFinishWait.wakeAll(); -+ if (m_handlingAboutToFinish) { -+ debug() << "Got next source. Waiting for end of current."; -+ -+ // If next source is valid and is not empty (an empty source is sent by Phonon if -+ // there are no more sources) skip EOS for the current source in order to seamlessly -+ // pass to the next source. -+ if (source.type() == Phonon::MediaSource::Invalid || -+ source.type() == Phonon::MediaSource::Empty) -+ m_skippingEOS = false; -+ else -+ m_skippingEOS = true; -+ -+ m_waitingForNextSource = true; -+ m_waitingForPreviousSource = false; -+ m_pipeline->setSource(source); -+ m_aboutToFinishWait.wakeAll(); -+ } else -+ qDebug() << "Ignoring source as no aboutToFinish handling is in progress."; - m_aboutToFinishLock.unlock(); - } - --- -1.7.11.2 - diff --git a/0004-warning.patch b/0004-warning.patch deleted file mode 100644 index b6551bb..0000000 --- a/0004-warning.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 122c6556917bf154c3d78613802046fa63a74523 Mon Sep 17 00:00:00 2001 -From: Harald Sitter -Date: Thu, 26 Jul 2012 15:13:50 +0200 -Subject: [PATCH 4/4] warning-- - ---- - gstreamer/mediaobject.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp -index 8ba8574..170c34b 100644 ---- a/gstreamer/mediaobject.cpp -+++ b/gstreamer/mediaobject.cpp -@@ -77,8 +77,8 @@ MediaObject::MediaObject(Backend *backend, QObject *parent) - , m_waitingForNextSource(false) - , m_waitingForPreviousSource(false) - , m_skippingEOS(false) -- , m_skipGapless(false) - , m_doingEOS(false) -+ , m_skipGapless(false) - , m_handlingAboutToFinish(false) - { - qRegisterMetaType("GstCaps*"); --- -1.7.11.2 - diff --git a/phonon-backend-gstreamer.spec b/phonon-backend-gstreamer.spec index 388ef43..d6b9c3b 100644 --- a/phonon-backend-gstreamer.spec +++ b/phonon-backend-gstreamer.spec @@ -2,8 +2,8 @@ Summary: Gstreamer phonon backend Name: phonon-backend-gstreamer Epoch: 2 -Version: 4.6.1 -Release: 3%{?dist} +Version: 4.6.2 +Release: 1%{?dist} Group: System Environment/Libraries License: LGPLv2+ URL: http://phonon.kde.org/ @@ -12,15 +12,11 @@ Source0: phonon-backend-gstreamer-%{version}-%{snap}.tar.bz2 # run this script to generate a snapshot tarball Source1: phonon-gstreamer_snapshot.sh %else -Source0: ftp://ftp.kde.org/pub/kde/stable/phonon/phonon-backend-gstreamer/%{version}/src/phonon-backend-gstreamer-%{version}.tar.xz +Source0: http://download.kde.org/stable/phonon/phonon-backend-gstreamer/%{version}/src/phonon-backend-gstreamer-%{version}.tar.xz %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ## upstream patches -Patch101: 0001-introduce-bool-to-track-whether-abouttofinish-is-run.patch -Patch102: 0002-only-set-skipgapless-and-wake-the-condition-iff-abou.patch -Patch103: 0003-only-handle-setNextSource-iff-abouttofinish-is-activ.patch -Patch104: 0004-warning.patch BuildRequires: automoc4 BuildRequires: cmake @@ -56,11 +52,6 @@ Requires: qt4%{?_isa} >= %{_qt4_version} %prep %setup -q -n phonon-backend-gstreamer-%{version} -%patch101 -p1 -b .0001 -%patch102 -p1 -b .0002 -%patch103 -p1 -b .0003 -%patch104 -p1 -b .0004 - %build mkdir -p %{_target_platform} @@ -104,6 +95,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null ||: %changelog +* Mon Aug 13 2012 Rex Dieter 2:4.6.2-1 +- 4.6.2 + * Thu Jul 26 2012 Rex Dieter 2:4.6.1-3 - upstream fixes for gapless/repeat issues seen in amarok (#841941) diff --git a/sources b/sources index 060a2b9..8b991dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0c8a1064e32c83dd6976187dcc491a3 phonon-backend-gstreamer-4.6.1.tar.xz +8c08875d10952bc5685bcec8de3acb2d phonon-backend-gstreamer-4.6.2.tar.xz