rpms/phonon/devel phonon-4.2.96-pulseaudio.patch, 1.2, 1.3 phonon-4.3.2-gstreamer-utf8-url.patch, 1.2, 1.3 phonon-4.3.2-gstreamer-volumefader.patch, 1.2, 1.3 qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch, NONE, 1.1 .cvsignore, 1.11, 1.12 phonon.spec, 1.44, 1.45 sources, 1.13, 1.14

Rex Dieter rdieter at fedoraproject.org
Wed Sep 30 15:19:56 UTC 2009


Author: rdieter

Update of /cvs/pkgs/rpms/phonon/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4615

Modified Files:
	.cvsignore phonon.spec sources 
Added Files:
	phonon-4.2.96-pulseaudio.patch 
	phonon-4.3.2-gstreamer-utf8-url.patch 
	phonon-4.3.2-gstreamer-volumefader.patch 
	qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch 
Log Message:
first try at qt->phonon revert, no builds yet, please review


phonon-4.2.96-pulseaudio.patch:
 globalconfig.cpp |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Index: phonon-4.2.96-pulseaudio.patch
===================================================================
RCS file: phonon-4.2.96-pulseaudio.patch
diff -N phonon-4.2.96-pulseaudio.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ phonon-4.2.96-pulseaudio.patch	30 Sep 2009 15:19:54 -0000	1.3
@@ -0,0 +1,43 @@
+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 <QtCore/QList>
++#include <QtCore/QHash>
+ #include <QtCore/QVariant>
+ 
+ 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;
+     }
+ 

phonon-4.3.2-gstreamer-utf8-url.patch:
 mediaobject.cpp |   13 ++++---------
 mediaobject.h   |    2 +-
 2 files changed, 5 insertions(+), 10 deletions(-)

Index: phonon-4.3.2-gstreamer-utf8-url.patch
===================================================================
RCS file: phonon-4.3.2-gstreamer-utf8-url.patch
diff -N phonon-4.3.2-gstreamer-utf8-url.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ phonon-4.3.2-gstreamer-utf8-url.patch	30 Sep 2009 15:19:54 -0000	1.3
@@ -0,0 +1,59 @@
+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."));

phonon-4.3.2-gstreamer-volumefader.patch:
 mediaobject.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: phonon-4.3.2-gstreamer-volumefader.patch
===================================================================
RCS file: phonon-4.3.2-gstreamer-volumefader.patch
diff -N phonon-4.3.2-gstreamer-volumefader.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ phonon-4.3.2-gstreamer-volumefader.patch	30 Sep 2009 15:19:55 -0000	1.3
@@ -0,0 +1,16 @@
+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();
+     }
+ }

qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch:
 audiooutput.cpp   |    4 +++-
 devicemanager.cpp |   22 ++++++++++++++++++++--
 2 files changed, 23 insertions(+), 3 deletions(-)

--- NEW FILE qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch ---
diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/audiooutput.cpp.than qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/audiooutput.cpp
--- qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/audiooutput.cpp.than	2009-08-16 14:20:43.000000000 +0200
+++ qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/audiooutput.cpp	2009-08-16 14:45:56.000000000 +0200
@@ -141,7 +141,9 @@ bool AudioOutput::setOutputDevice(int ne
         // Save previous state
         GstState oldState = GST_STATE(m_audioSink);
         const QByteArray oldDeviceValue = GstHelper::property(m_audioSink, "device");
-        const QByteArray deviceId = deviceList.at(newDevice).gstId;
+        const QByteArray deviceId = (deviceList.at(newDevice).gstId == "PulseAudio"
+                                     ? "default"
+                                     : deviceList.at(newDevice).gstId);
         m_device = newDevice;
 
         // We test if the device can be opened by checking if it can go from NULL to READY state
diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager.cpp.than qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager.cpp
--- qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager.cpp.than	2009-08-15 12:39:08.000000000 +0200
+++ qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager.cpp	2009-08-16 14:45:13.000000000 +0200
@@ -50,6 +50,8 @@ AudioDevice::AudioDevice(DeviceManager *
     //get name from device
     if (gstId == "default") {
         description = "Default audio device";
+    } else if (gstId == "PulseAudio") {
+        description = QObject::tr("Pass all audio through the PulseAudio Sound Server.\n").toUtf8();
     } else {
         GstElement *aSink= manager->createAudioSink();
 
@@ -175,6 +177,18 @@ GstElement *DeviceManager::createAudioSi
                 }
             }
 
+            if (!sink) {
+                sink = gst_element_factory_make ("pulsesink", NULL);
+                if (canOpenDevice(sink)) {
+                    m_backend->logMessage("AudioOutput using pulse audio sink");
+                    m_audioSink = "pulsesink";
+                }
+                else if (sink) {
+                    gst_object_unref(sink);
+                    sink = 0;
+                }
+            }
+
 #ifdef USE_ALSASINK2
             if (!sink) {
                 sink = gst_element_factory_make ("_k_alsasink", NULL);
@@ -306,8 +320,12 @@ void DeviceManager::updateDeviceList()
     QList<QByteArray> list;
 
     if (audioSink) {
-        list = GstHelper::extractProperties(audioSink, "device");
-        list.prepend("default");
+        if (m_audioSink == "pulsesink") {
+            list.append("PulseAudio");
+        } else {
+            list = GstHelper::extractProperties(audioSink, "device");
+            list.prepend("default");
+        }
 
         for (int i = 0 ; i < list.size() ; ++i) {
             QByteArray gstId = list.at(i);


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/phonon/devel/.cvsignore,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- .cvsignore	27 Feb 2009 11:07:08 -0000	1.11
+++ .cvsignore	30 Sep 2009 15:19:54 -0000	1.12
@@ -1,3 +1,8 @@
 gstreamer-logo.svg
-phonon-4.3.0.tar.bz2
 phonon-4.3.1.tar.bz2
+hi128-phonon-gstreamer.png
+hi16-phonon-gstreamer.png
+hi22-phonon-gstreamer.png
+hi32-phonon-gstreamer.png
+hi48-phonon-gstreamer.png
+hi64-phonon-gstreamer.png


Index: phonon.spec
===================================================================
RCS file: /cvs/pkgs/rpms/phonon/devel/phonon.spec,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -p -r1.44 -r1.45
--- phonon.spec	26 Jul 2009 17:55:47 -0000	1.44
+++ phonon.spec	30 Sep 2009 15:19:55 -0000	1.45
@@ -1,57 +1,108 @@
 
-%define phonon_version_major 4.3
-
 Summary: Multimedia framework api
 Name:    phonon
 Version: 4.3.1
-Release: 12%{?dist}
-Group:   Applications/Multimedia
+Release: 101%{?dist}
+Group:   System Environment/Libraries
 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
-# make InitialPreference=9
-Patch2: phonon-4.3.1-xine-InitialPreference.patch
+Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg
+Source11: hi16-phonon-gstreamer.png
+Source12: hi22-phonon-gstreamer.png
+Source13: hi32-phonon-gstreamer.png
+Source14: hi48-phonon-gstreamer.png
+Source15: hi64-phonon-gstreamer.png
+Source16: hi128-phonon-gstreamer.png
+
+# Make PulseAudio the default when listed by the backend.
+# Note that this currently only works for the Xine backend. Device selection in
+# the GStreamer backend is weird: there is a setting for "sink" which cannot be
+# set through systemsettings, and listed devices are only those supported by the
+# "sink". So it never lists "PulseAudio" as a supported device, you have to pick
+# it as a "sink", and then the device setting is ignored entirely.
+Patch0:  phonon-4.2.96-pulseaudio.patch
+Patch1:  phonon-4.2.96-xine-pulseaudio.patch
+Patch2:  qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch
+
+## define to build phonon-backend-xine only
+#define xine_only 1
+Patch10: phonon-4.3.1-xineonly.patch
 
 ## Upstream patches
+Patch100: phonon-4.3.2-gstreamer-utf8-url.patch
+Patch101: phonon-4.3.2-gstreamer-volumefader.patch
 # fix for non-ascii filenames in xine backend
-Patch100: phonon-4.3.2-kdebug#172242.patch
+Patch102: phonon-4.3.2-kdebug#172242.patch
 # escape '#' too
-Patch101: phonon-4.3.2-kdebug#172242-2.patch
+Patch103: phonon-4.3.2-kdebug#172242-2.patch
 
 BuildRequires: automoc4 >= 0.9.86
 BuildRequires: cmake >= 2.6.0
 BuildRequires: glib2-devel
+BuildRequires: gstreamer-devel
+BuildRequires: gstreamer-plugins-base-devel
 BuildRequires: kde-filesystem
 BuildRequires: libxcb-devel
 BuildRequires: libxml2-devel
 BuildRequires: pkgconfig
-BuildRequires: qt4-devel >= 4.5.1
+BuildRequires: qt4-devel >= 4.4.0
 BuildRequires: xine-lib-devel
 
+Requires: phonon-backend%{?_isa} >= %{version}
+
+## can switch to Requires instead of Conflicts once bootstrapping is done
+#Requires: qt4%{?_isa} >= %{_qt4_version}
+Conflicts: qt4 < 4.5.2-21
+
 %description
 %{summary}.
 
+%package devel
+Summary: Developer files for %{name}
+Group:   Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: qt4-devel
+Requires: pkgconfig
+%description devel
+%{summary}.
+
 %package backend-xine
-Summary: Xine phonon backend
+Summary: xine phonon backend
 Group:   Applications/Multimedia
+Requires: %{name} = %{version}-%{release}
 Provides: phonon-backend%{?_isa} = %{version}-%{release}
-Requires: phonon%{?_isa} >= %{phonon_version_major} 
 %description backend-xine
 %{summary}.
 
+%package backend-gstreamer
+Summary: Gstreamer phonon backend
+Group:   Applications/Multimedia
+Epoch:   2
+Requires: %{name} = %{version}-%{release}
+Provides: phonon-backend%{?_isa} = %{version}-%{release}
+Obsoletes: %{name}-backend-gst < 4.2.0-4
+Provides:  %{name}-backend-gst = %{version}-%{release}
+%description backend-gstreamer
+%{summary}.
+
 
 %prep
 %setup -q -n phonon-%{version}%{?alphatag}
-%patch0 -p1 -b .xineonly
+%patch0 -p1 -b .pulseaudio
 %patch1 -p1 -b .xine-pulseaudio
-%patch100 -p1 -b .xine_nonascii
-%patch101 -p1 -b .xine_nonascii-2
+%patch2 -p4 -b .gst-pulseaudio
+%patch100 -p0 -b .gstreamer-utf8-url
+%patch101 -p0 -b .gstreamer-volumefader
+%patch102 -p1 -b .xine_nonascii
+%patch103 -p1 -b .xine_nonascii-2
+
+# not working?  use -C .../xine hack below instead for now  -- Rex
+%if 0%{?xine_only}
+%patch10 -p1 -b .xineonly
+%endif
 
 
 %build
@@ -60,39 +111,90 @@ pushd %{_target_platform}
 %{cmake} ..
 popd
 
-make %{?_smp_mflags} -C %{_target_platform}
+make %{?_smp_mflags} -C %{_target_platform}%{?xine_only:/xine}
 
 
 %install
 rm -rf %{buildroot}
 
-make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
+make install/fast DESTDIR=%{buildroot} -C %{_target_platform}%{?xine_only:/xine}
 
 # move the oxygen-only phonon-xine icons to hicolor
 mv %{buildroot}%{_datadir}/icons/oxygen \
    %{buildroot}%{_datadir}/icons/hicolor
 
+%if ! 0%{?xine_only}
+# gstreamer icons
+install -D -m 0644 %{SOURCE10} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/phonon-gstreamer.svg
+install -D -m 0644 %{SOURCE11} %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/phonon-gstreamer.png
+install -D -m 0644 %{SOURCE12} %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/phonon-gstreamer.png
+install -D -m 0644 %{SOURCE13} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/phonon-gstreamer.png
+install -D -m 0644 %{SOURCE14} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/phonon-gstreamer.png
+install -D -m 0644 %{SOURCE15} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/phonon-gstreamer.png
+install -D -m 0644 %{SOURCE16} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/phonon-gstreamer.png
+%endif
+
 
 %clean
 rm -rf %{buildroot}
 
 
-%post backend-xine
-touch --no-create %{_datadir}/icons/hicolor &> /dev/null ||:
+%if ! 0%{?xine_only}
+%post -p /sbin/ldconfig
 
-%posttrans backend-xine
-gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null ||:
+%postun -p /sbin/ldconfig
+
+%post backend-gstreamer
+touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||:
+
+%postun backend-gstreamer
+if [ $1 -eq 0 ] ; then
+  touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||:
+  gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||:
+fi
+
+%posttrans backend-gstreamer
+gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||:
+%endif
+
+%post backend-xine
+touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||:
 
 %postun backend-xine
 if [ $1 -eq 0 ] ; then
-  touch --no-create %{_datadir}/icons/hicolor &> /dev/null ||:
-  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null ||:
+  touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||:
+  gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||:
 fi
 
+%posttrans backend-xine
+gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||:
 
-%files backend-xine
+%if ! 0%{?xine_only}
+%files
 %defattr(-,root,root,-)
 %doc COPYING.LIB
+%{_libdir}/libphonon*.so.4*
+%{_datadir}/dbus-1/interfaces/org.kde.Phonon.AudioOutput.xml
+# kde4-specific dirs
+%dir %{_kde4_libdir}/kde4/plugins/phonon_backend/
+%dir %{_kde4_datadir}/kde4/services/phononbackends/
+
+%files devel
+%defattr(-,root,root,-)
+%dir %{_includedir}/KDE
+%{_includedir}/KDE/Phonon/
+%{_includedir}/phonon/
+%{_libdir}/pkgconfig/phonon.pc
+%{_libdir}/libphonon*.so
+
+%files backend-gstreamer
+%defattr(-,root,root,-)
+%{_kde4_libdir}/kde4/plugins/phonon_backend/phonon_gstreamer.so
+%{_kde4_datadir}/kde4/services/phononbackends/gstreamer.desktop
+%{_datadir}/icons/hicolor/*/apps/phonon-gstreamer.*
+%endif
+
+%files backend-xine
 %defattr(-,root,root,-)
 %{_kde4_libdir}/kde4/plugins/phonon_backend/phonon_xine.so
 %{_kde4_datadir}/kde4/services/phononbackends/xine.desktop
@@ -100,6 +202,11 @@ fi
 
 
 %changelog
+* Tue Sep 29 2009 Rex Dieter <rdieter at fedoraproject.org> - 4.3.1-101
+- revert to kde/phonon
+- inflate to Release: 101
+- -backend-gstreamer: Epoch: 2
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.3.1-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/phonon/devel/sources,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- sources	27 Feb 2009 11:07:08 -0000	1.13
+++ sources	30 Sep 2009 15:19:55 -0000	1.14
@@ -1,2 +1,8 @@
 8e3924f417fea67f72b2105faed2119c  gstreamer-logo.svg
 767cb68052c108e95f293f30acdef3fb  phonon-4.3.1.tar.bz2
+60de9d7e1cddd019f09fd036f0e5413a  hi128-phonon-gstreamer.png
+7ca265e0cf75b3b4c81e1490d3dba3be  hi16-phonon-gstreamer.png
+0a9f69d901aded140d4fed969c22e14f  hi22-phonon-gstreamer.png
+12db12c009b722a6dc141f78feb7e330  hi32-phonon-gstreamer.png
+86c34a1b81d44980b1381f94ed6b7a23  hi48-phonon-gstreamer.png
+153505c71ec021b0a3bd4b74f2492e93  hi64-phonon-gstreamer.png




More information about the fedora-extras-commits mailing list