From aadf2d260bec1dbd8b9f30017c6484145e417b55 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 5 Jun 2009 23:49:04 +0000 Subject: [PATCH] - restore patches to the xine backend --- phonon-4.2.96-pulseaudio.patch | 43 ----------------- phonon-4.3.2-gstreamer-utf8-url.patch | 59 ------------------------ phonon-4.3.2-gstreamer-volumefader.patch | 16 ------- phonon.spec | 14 +++++- 4 files changed, 13 insertions(+), 119 deletions(-) delete mode 100644 phonon-4.2.96-pulseaudio.patch delete mode 100644 phonon-4.3.2-gstreamer-utf8-url.patch delete mode 100644 phonon-4.3.2-gstreamer-volumefader.patch diff --git a/phonon-4.2.96-pulseaudio.patch b/phonon-4.2.96-pulseaudio.patch deleted file mode 100644 index 1253402..0000000 --- a/phonon-4.2.96-pulseaudio.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -Naurw phonon-4.2.96/phonon/globalconfig.cpp phonon-4.2.96.pulseaudio/phonon/globalconfig.cpp ---- phonon-4.2.96/phonon/globalconfig.cpp 2008-11-27 16:41:41.000000000 +0100 -+++ phonon-4.2.96.pulseaudio/phonon/globalconfig.cpp 2009-01-08 21:29:18.000000000 +0100 -@@ -31,6 +31,7 @@ - #include "phononnamespace_p.h" - - #include -+#include - #include - - QT_BEGIN_NAMESPACE -@@ -167,6 +168,15 @@ - | ((override & HideUnavailableDevices) ? FilterUnavailableDevices : 0) - ); - } -+ // make PulseAudio the global default (assume it is already default in this list) -+ if (!list.isEmpty()) { -+ int firstIndex = list.first(); -+ if (backendIface->objectDescriptionProperties(Phonon::AudioOutputDeviceType, -+ firstIndex)["name"].toString() == "PulseAudio") { -+ list.removeFirst(); -+ defaultList.prepend(firstIndex); -+ } -+ } - defaultList += list; - } - -@@ -222,6 +232,15 @@ - | ((override & HideUnavailableDevices) ? FilterUnavailableDevices : 0) - ); - } -+ // make PulseAudio the global default (assume it is already default in this list) -+ if (!list.isEmpty()) { -+ int firstIndex = list.first(); -+ if (backendIface->objectDescriptionProperties(Phonon::AudioCaptureDeviceType, -+ firstIndex)["name"].toString() == "PulseAudio") { -+ list.removeFirst(); -+ defaultList.prepend(firstIndex); -+ } -+ } - defaultList += list; - } - diff --git a/phonon-4.3.2-gstreamer-utf8-url.patch b/phonon-4.3.2-gstreamer-utf8-url.patch deleted file mode 100644 index 1ce8e38..0000000 --- a/phonon-4.3.2-gstreamer-utf8-url.patch +++ /dev/null @@ -1,59 +0,0 @@ -Index: gstreamer/mediaobject.h -=================================================================== ---- gstreamer/mediaobject.h (revision 932755) -+++ gstreamer/mediaobject.h (revision 932756) -@@ -185,7 +185,7 @@ - /* - * @param encodedUrl percent-encoded QString for source compat reasons. Should change to QUrl - */ -- bool createPipefromURL(const QString &encodedUrl); -+ bool createPipefromURL(const QUrl &url); - bool createPipefromStream(const MediaSource &); - - private Q_SLOTS: -Index: gstreamer/mediaobject.cpp -=================================================================== ---- gstreamer/mediaobject.cpp (revision 932755) -+++ gstreamer/mediaobject.cpp (revision 932756) -@@ -347,11 +347,8 @@ - * - * returns true if successful - */ --bool MediaObject::createPipefromURL(const QString &encodedUrl) -+bool MediaObject::createPipefromURL(const QUrl &url) - { -- // Convert back to URL -- QUrl url(encodedUrl, QUrl::StrictMode); -- - // Remove any existing data source - if (m_datasource) { - gst_bin_remove(GST_BIN(m_pipeline), m_datasource); -@@ -361,7 +358,7 @@ - - // Verify that the uri can be parsed - if (!url.isValid()) { -- m_backend->logMessage(QString("%1 is not a valid URI").arg(encodedUrl)); -+ m_backend->logMessage(QString("%1 is not a valid URI").arg(url.toString())); - return false; - } - -@@ -875,8 +872,7 @@ - - switch (source.type()) { - case MediaSource::Url: { -- QString urlString = source.url().toEncoded(); -- if (createPipefromURL(urlString)) -+ if (createPipefromURL(source.url())) - m_loading = true; - else - setError(tr("Could not open media source.")); -@@ -884,8 +880,7 @@ - break; - - case MediaSource::LocalFile: { -- QString urlString = QUrl::fromLocalFile(source.fileName()).toString(); -- if (createPipefromURL(urlString)) -+ if (createPipefromURL(QUrl::fromLocalFile(source.fileName()))) - m_loading = true; - else - setError(tr("Could not open media source.")); diff --git a/phonon-4.3.2-gstreamer-volumefader.patch b/phonon-4.3.2-gstreamer-volumefader.patch deleted file mode 100644 index 6dec292..0000000 --- a/phonon-4.3.2-gstreamer-volumefader.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: gstreamer/mediaobject.cpp -=================================================================== ---- gstreamer/mediaobject.cpp (revision 932979) -+++ gstreamer/mediaobject.cpp (revision 932980) -@@ -141,9 +141,9 @@ - if (m_resumeState) - return; - -- if (m_state == Phonon::PlayingState || m_state == Phonon::PausedState) { -+ if (m_pendingState == Phonon::PlayingState || m_pendingState == Phonon::PausedState) { - m_resumeState = true; -- m_oldState = m_state; -+ m_oldState = m_pendingState; - m_oldPos = getPipelinePos(); - } - } diff --git a/phonon.spec b/phonon.spec index 17ba758..0ff5577 100644 --- a/phonon.spec +++ b/phonon.spec @@ -1,14 +1,21 @@ Summary: Multimedia framework api Name: phonon Version: 4.3.1 -Release: 7%{?dist} +Release: 8%{?dist} Group: Applications/Multimedia License: LGPLv2+ URL: http://phonon.kde.org/ Source0: ftp://ftp.kde.org/pub/kde/stable/4.2.1/phonon-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# build only the xine backend Patch0: phonon-4.3.1-xineonly.patch +# bump PulseAudio's priority in the xine backend +Patch1: phonon-4.2.96-xine-pulseaudio.patch + +## Upstream patches +# fix for non-ascii filenames in xine backend +Patch100: phonon-4.3.2-kdebug#172242.patch BuildRequires: automoc4 >= 0.9.86 BuildRequires: cmake >= 2.6.0 @@ -33,6 +40,8 @@ Provides: phonon-backend%{?_isa} = %{version}-%{release} %prep %setup -q -n phonon-%{version}%{?alphatag} %patch0 -p1 -b .xineonly +%patch1 -p1 -b .xine-pulseaudio +%patch102 -p1 -b .xine_nonascii %build @@ -78,6 +87,9 @@ fi %{_datadir}/icons/hicolor/*/apps/phonon-xine.* %changelog +* Fri Jun 05 2009 Kevin Kofler - 4.3.1-8 +- restore patches to the xine backend + * Fri Jun 05 2009 Than Ngo - 4.3.1-7 - only xine-backend