From 9d104a783e5ceca5fe19d71c34e725afd79afe08 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Aug 10 2008 18:30:00 +0000 Subject: - rename -backend-gst back to -backend-gstreamer (longer name as -backend-xine) The GStreamer backend isn't ready to be the default, and KDE 4.1 also defaults to the Xine backend when both are installed. - fix PulseAudio not being the default in the Xine backend (4.2 regression) --- diff --git a/phonon-4.2.0-pulseaudio.patch b/phonon-4.2.0-pulseaudio.patch new file mode 100644 index 0000000..458e605 --- /dev/null +++ b/phonon-4.2.0-pulseaudio.patch @@ -0,0 +1,43 @@ +diff -ur phonon-4.2.0/phonon/globalconfig.cpp phonon-4.2.0-pulseaudio/phonon/globalconfig.cpp +--- phonon-4.2.0/phonon/globalconfig.cpp 2008-07-22 18:31:58.000000000 +0200 ++++ phonon-4.2.0-pulseaudio/phonon/globalconfig.cpp 2008-08-10 20:04:22.000000000 +0200 +@@ -28,6 +28,7 @@ + #include "phononnamespace_p.h" + + #include ++#include + #include + + QT_BEGIN_NAMESPACE +@@ -158,6 +159,15 @@ + | (defaultList.isEmpty() ? 0 : FilterHardwareDevices) + ); + } ++ // 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; + } + +@@ -212,6 +222,15 @@ + | (defaultList.isEmpty() ? 0 : FilterHardwareDevices) + ); + } ++ // 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.spec b/phonon.spec index 96143dc..d049a51 100644 --- a/phonon.spec +++ b/phonon.spec @@ -2,12 +2,19 @@ Summary: Multimedia framework api Name: phonon Version: 4.2.0 -Release: 2%{?dist} +Release: 4%{?dist} Group: System Environment/Libraries License: LGPLv2+ URL: http://phonon.kde.org/ Source0: ftp://ftp.kde.org/pub/kde/stable/phonon/%{version}/phonon-%{version}.tar.bz2 +# Make PulseAudio the default again 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.0-pulseaudio.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: automoc4 @@ -24,14 +31,14 @@ Requires: phonon-backend %description %{summary}. -%package backend-gst +%package backend-gstreamer Summary: Gstreamer phonon backend Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} Provides: phonon-backend = %{version}-%{release} -Obsoletes: %{name}-backend-gstreamer < 4.2-2 -Provides: %{name}-backend-gstreamer = %{version}-%{release} -%description backend-gst +Obsoletes: %{name}-backend-gst < 4.2.0-4 +Provides: %{name}-backend-gst = %{version}-%{release} +%description backend-gstreamer %{summary}. %package devel @@ -46,6 +53,7 @@ Requires: pkgconfig %prep %setup -q +%patch0 -p1 -b .pulseaudio %build @@ -82,7 +90,7 @@ rm -rf %{buildroot} %dir %{_kde4_libdir}/kde4/plugins/phonon_backend/ %dir %{_kde4_datadir}/kde4/services/phononbackends/ -%files backend-gst +%files backend-gstreamer %defattr(-,root,root,-) %{_kde4_libdir}/kde4/plugins/phonon_backend/phonon_gstreamer.so %{_kde4_datadir}/kde4/services/phononbackends/gstreamer.desktop @@ -97,6 +105,15 @@ rm -rf %{buildroot} %changelog +* Sun Aug 10 2008 Kevin Kofler 4.2.0-4 +- rename -backend-gst back to -backend-gstreamer (longer name as -backend-xine) + The GStreamer backend isn't ready to be the default, and KDE 4.1 also defaults + to the Xine backend when both are installed. +- fix PulseAudio not being the default in the Xine backend (4.2 regression) + +* Sat Aug 02 2008 Rex Dieter 4.2.0-3 +- -backend-gst: Obsoletes: -backend-gstreamer < 4.2.0-2 + * Thu Jul 24 2008 Rex Dieter 4.2.0-2 - rename -backend-gstreamer -> backend-gst