diff --git a/.cvsignore b/.cvsignore index 734ae23..1158bb2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -6,3 +6,4 @@ hi32-phonon-gstreamer.png hi48-phonon-gstreamer.png hi64-phonon-gstreamer.png phonon-4.3.80.tar.bz2 +phonon-4.4.0.tgz diff --git a/phonon-4.2.0-ogg-mime-type.patch b/phonon-4.2.0-ogg-mime-type.patch deleted file mode 100644 index 1213b3a..0000000 --- a/phonon-4.2.0-ogg-mime-type.patch +++ /dev/null @@ -1,20 +0,0 @@ -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.80-fix-gstreamer-pulseaudio-deadlock.patch b/phonon-4.3.80-fix-gstreamer-pulseaudio-deadlock.patch deleted file mode 100644 index b11abf2..0000000 --- a/phonon-4.3.80-fix-gstreamer-pulseaudio-deadlock.patch +++ /dev/null @@ -1,63 +0,0 @@ -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-4.3.80-fix-xine-pulseaudio-init.patch b/phonon-4.3.80-fix-xine-pulseaudio-init.patch deleted file mode 100644 index f297abe..0000000 --- a/phonon-4.3.80-fix-xine-pulseaudio-init.patch +++ /dev/null @@ -1,78 +0,0 @@ -commit 7ab2d9572662f1afc776e5d90ecf35e212e3543c -Author: cguthrie -Date: Thu Jan 21 20:13:50 2010 +0000 - - xine: Always ensure we create the correct xine port for audio output. - - When integrating with pulseaudio it was possible that the port was not correctly created. - This could happen if phonon was started and the first device detected from PA was a capture device - rather than a playback device (which is unlikely) or if the first device detected - was a removable audio device which was subsequently removed before playback started. - - There are possibly other cases where this could happen too. - In this case xine would create a null port. - - This change reverts a previous 'fix' committed in r1051721. I now issue a special case - for dealing with PA support in the createPort() method. As a result I no longer need - to special case handle the audioDriverFor() method of the backend so this is - now removed. - - CCBUG: 223662 - - git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/kdesupport/phonon@1078226 283d02a7-25f6-0310-bc7c-ecb5cbfe19da - -diff --git a/xine/audiooutput.cpp b/xine/audiooutput.cpp -index c6ca730..1444aa3 100644 ---- a/xine/audiooutput.cpp -+++ b/xine/audiooutput.cpp -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - #include "mediaobject.h" - #include "backend.h" - #include "events.h" -@@ -48,10 +49,6 @@ namespace Xine - AudioOutput::AudioOutput(QObject *parent) - : AbstractAudioOutput(new AudioOutputXT, parent) - { -- // Always initialise the "device" in use. -- // This is needed for PulseAudio support as subsequent calls to setOutputDevice() -- // are suppressed -- setOutputDevice(0); - } - - AudioOutput::~AudioOutput() -@@ -132,6 +129,17 @@ xine_audio_port_t *AudioOutput::createPort(const AudioOutputDevice &deviceDesc) - { - K_XT(AudioOutput); - xine_audio_port_t *port = 0; -+ -+ PulseSupport *pulse = PulseSupport::getInstance(); -+ if (pulse->isActive()) { -+ // Here we trust that the PA plugin is setup correctly and we just want to use it. -+ const QByteArray &outputPlugin = "pulseaudio"; -+ debug() << Q_FUNC_INFO << "PA Active: use output plugin:" << outputPlugin; -+ port = xine_open_audio_driver(xt->m_xine, outputPlugin.constData(), 0); -+ debug() << Q_FUNC_INFO << "----------------------------------------------- audio_port created"; -+ return port; -+ } -+ - if (!deviceDesc.isValid()) { - // use null output for invalid devices - port = xine_open_audio_driver(xt->m_xine, "none", 0); -diff --git a/xine/backend.cpp b/xine/backend.cpp -index 7e881da..9010b8c 100644 ---- a/xine/backend.cpp -+++ b/xine/backend.cpp -@@ -588,9 +588,6 @@ QHash Backend::audioOutputProperties(int audioDevice) - - QByteArray Backend::audioDriverFor(int audioDevice) - { -- if (PulseSupport::getInstance()->isActive()) -- return "pulseaudio"; -- - instance()->checkAudioOutputs(); - const Backend *const that = instance(); - for (int i = 0; i < that->m_audioOutputInfos.size(); ++i) { diff --git a/phonon-4.3.80-old_pa.patch b/phonon-4.3.80-old_pa.patch deleted file mode 100644 index 9983bdc..0000000 --- a/phonon-4.3.80-old_pa.patch +++ /dev/null @@ -1,186 +0,0 @@ -diff -up phonon-4.3.80/phonon/CMakeLists.txt.old_pa phonon-4.3.80/phonon/CMakeLists.txt ---- phonon-4.3.80/phonon/CMakeLists.txt.old_pa 2009-12-03 13:29:35.000000000 -0600 -+++ phonon-4.3.80/phonon/CMakeLists.txt 2010-01-22 09:52:53.195187362 -0600 -@@ -8,15 +8,21 @@ endif (PHONON_BUILD_EXAMPLES) - - add_subdirectory(experimental) - --set(PULSEAUDIO_MINIMUM_VERSION "0.9.21") -+set(PULSEAUDIO_MINIMUM_VERSION "0.9.15") - macro_optional_find_package(PulseAudio) -+# PULSEAUDIO_DEVICE_MANAGER feature check could be moved to FindPulseAudio.cmake, hint hint. -- Rex -+macro_ensure_version("0.9.21" "${PULSEAUDIO_VERSION}" PULSEAUDIO_DEVICE_MANAGER) - macro_log_feature(PULSEAUDIO_FOUND "PulseAudio" "A cross-platform, networked sound server." "http://www.pulseaudio.org" FALSE "" "Allows audio playback via the PulseAudio soundserver when it is running") - macro_optional_find_package(GLIB2) - macro_log_feature(GLIB2_FOUND "GLib2" "GLib 2 is required to compile the pulseaudio for Phonon" "http://www.gtk.org/download/" FALSE) - -+ - if (GLIB2_FOUND AND PULSEAUDIO_FOUND) - add_definitions(-DHAVE_PULSEAUDIO) - include_directories(${GLIB2_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIR}) -+ if (PULSEAUDIO_DEVICE_MANAGER) -+ add_definitions(-DHAVE_PULSEAUDIO_DEVICE_MANAGER) -+ endif(PULSEAUDIO_DEVICE_MANAGER) - else(GLIB2_FOUND AND PULSEAUDIO_FOUND) - set(PULSEAUDIO_INCLUDE_DIR "") - set(PULSEAUDIO_LIBRARY "") -diff -up phonon-4.3.80/phonon/pulsesupport.cpp.old_pa phonon-4.3.80/phonon/pulsesupport.cpp ---- phonon-4.3.80/phonon/pulsesupport.cpp.old_pa 2009-12-03 13:29:35.000000000 -0600 -+++ phonon-4.3.80/phonon/pulsesupport.cpp 2010-01-22 09:48:15.699935986 -0600 -@@ -30,7 +30,9 @@ - #include - #include - #include --#include -+#ifdef HAVE_PULSEAUDIO_DEVICE_MANAGER -+# include -+#endif - #endif // HAVE_PULSEAUDIO - - #include "pulsesupport_p.h" -@@ -151,7 +153,34 @@ static QMap s_captureStreamIndexMap; - static QMap s_captureStreamMoveQueue; - -+static void fakeSingleOutputDevice() -+{ -+ // OK so we don't have the device manager extension, but we can show a single device and fake it. -+ int index; -+ s_outputDeviceIndexes.clear(); -+ s_outputDevices.clear(); -+ s_outputDevicePriorities.clear(); -+ index = s_deviceIndexCounter++; -+ s_outputDeviceIndexes.insert("sink:default", index); -+ s_outputDevices.insert(index, AudioDevice("sink:default", QObject::tr("PulseAudio Sound Server").toUtf8(), "audio-backend-pulseaudio", 0)); -+ for (int i = Phonon::NoCategory; i <= Phonon::LastCategory; ++i) { -+ Phonon::Category cat = static_cast(i); -+ s_outputDevicePriorities[cat].insert(0, index); -+ } -+ -+ s_captureDeviceIndexes.clear(); -+ s_captureDevices.clear(); -+ s_captureDevicePriorities.clear(); -+ index = s_deviceIndexCounter++; -+ s_captureDeviceIndexes.insert("source:default", index); -+ s_captureDevices.insert(index, AudioDevice("source:default", QObject::tr("PulseAudio Sound Server").toUtf8(), "audio-backend-pulseaudio", 0)); -+ for (int i = Phonon::NoCategory; i <= Phonon::LastCategory; ++i) { -+ Phonon::Category cat = static_cast(i); -+ s_captureDevicePriorities[cat].insert(0, index); -+ } -+} - -+#ifdef HAVE_PULSEAUDIO_DEVICE_MANAGER - static void ext_device_manager_subscribe_cb(pa_context *, void *); - static void ext_device_manager_read_cb(pa_context *c, const pa_ext_device_manager_info *info, int eol, void *userdata) { - Q_ASSERT(c); -@@ -171,30 +200,7 @@ static void ext_device_manager_read_cb(p - - if (eol < 0) { - logMessage(QString("Failed to initialize device manager extension: %1").arg(pa_strerror(pa_context_errno(c)))); -- // OK so we don't have the device manager extension, but we can show a single device and fake it. -- int index; -- s_outputDeviceIndexes.clear(); -- s_outputDevices.clear(); -- s_outputDevicePriorities.clear(); -- index = s_deviceIndexCounter++; -- s_outputDeviceIndexes.insert("sink:default", index); -- s_outputDevices.insert(index, AudioDevice("sink:default", QObject::tr("PulseAudio Sound Server").toUtf8(), "audio-backend-pulseaudio", 0)); -- for (int i = Phonon::NoCategory; i <= Phonon::LastCategory; ++i) { -- Phonon::Category cat = static_cast(i); -- s_outputDevicePriorities[cat].insert(0, index); -- } -- -- s_captureDeviceIndexes.clear(); -- s_captureDevices.clear(); -- s_captureDevicePriorities.clear(); -- index = s_deviceIndexCounter++; -- s_captureDeviceIndexes.insert("source:default", index); -- s_captureDevices.insert(index, AudioDevice("source:default", QObject::tr("PulseAudio Sound Server").toUtf8(), "audio-backend-pulseaudio", 0)); -- for (int i = Phonon::NoCategory; i <= Phonon::LastCategory; ++i) { -- Phonon::Category cat = static_cast(i); -- s_captureDevicePriorities[cat].insert(0, index); -- } -- -+ fakeSingleOutputDevice(); - return; - } - -@@ -369,6 +375,7 @@ static void ext_device_manager_read_cb(p - } - } - } -+#endif - - static void set_output_device(QString streamUuid) - { -@@ -550,12 +557,12 @@ static void subscribe_cb(pa_context *c, - } - } - -- - static void ext_device_manager_subscribe_cb(pa_context *c, void *) { - Q_ASSERT(c); - - pa_operation *o; - PulseUserData *u = new PulseUserData; /** @todo Make some object to receive the info... */ -+#ifdef HAVE_PULSEAUDIO_DEVICE_MANAGER - if (!(o = pa_ext_device_manager_read(c, ext_device_manager_read_cb, u))) { - // We need to deal with failure on first iteration - if (s_connectionEventloop) { -@@ -566,6 +573,7 @@ static void ext_device_manager_subscribe - return; - } - pa_operation_unref(o); -+#endif - - - // Register for the stream changes... -@@ -584,6 +592,7 @@ static void context_state_callback(pa_co - { - Q_ASSERT(c); - -+ logMessage(QString("context_state_callback %1").arg(pa_context_get_state(c))); - switch (pa_context_get_state(c)) { - case PA_CONTEXT_UNCONNECTED: - case PA_CONTEXT_CONNECTING: -@@ -592,8 +601,18 @@ static void context_state_callback(pa_co - break; - - case PA_CONTEXT_READY: -+#ifdef HAVE_PULSEAUDIO_DEVICE_MANAGER - // Attempt to load things up - ext_device_manager_subscribe_cb(c, NULL); -+#else -+ s_pulseActive = true; -+ if (s_connectionEventloop) { -+ s_connectionEventloop->exit(0); -+ s_connectionEventloop = 0; -+ } -+ fakeSingleOutputDevice(); -+ ext_device_manager_subscribe_cb(c, NULL); -+#endif - break; - - case PA_CONTEXT_FAILED: -@@ -665,6 +684,7 @@ PulseSupport::PulseSupport() - if (pa_context_connect(s_context, NULL, static_cast(0), 0) >= 0) { - pa_context_set_state_callback(s_context, &context_state_callback, s_connectionEventloop); - // Now we block until we connect or otherwise... -+ logMessage("Entering eventloop..."); - s_connectionEventloop->exec(); - } - #endif -@@ -821,11 +841,13 @@ static void setDevicePriority(Category c - } - devices[list.size()] = NULL; - -+#ifdef HAVE_PULSEAUDIO_DEVICE_MANAGER - pa_operation *o; - if (!(o = pa_ext_device_manager_reorder_devices_for_role(s_context, role.toUtf8().constData(), (const char**)devices, NULL, NULL))) - logMessage(QString("pa_ext_device_manager_reorder_devices_for_role() failed")); - else - pa_operation_unref(o); -+#endif - - for (i = 0; i < list.size(); ++i) - pa_xfree(devices[i]); diff --git a/phonon.spec b/phonon.spec index 1d864e6..c8048f4 100644 --- a/phonon.spec +++ b/phonon.spec @@ -1,14 +1,15 @@ -#define snap 20091203svn +%define tar_ver 4.4 Summary: Multimedia framework api Name: phonon -Version: 4.3.80 -Release: 6%{?dist} +Version: 4.4.0 +Release: 0.2%{?dist} Group: System Environment/Libraries License: LGPLv2+ URL: http://phonon.kde.org/ -Source0: ftp://ftp.kde.org/pub/kde/unstable/phonon/phonon-%{version}.tar.bz2 +Source0: http://home.samfundet.no/~sandsmark/phonon-%{version}.tgz +#Source0: ftp://ftp.kde.org/pub/kde/stable/phonon/phonon-%{version}.tar.bz2 #Source0: phonon-%{snap}.tar.bz2 Source1: phonon_snapshot.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -28,17 +29,9 @@ Patch0: phonon-4.3.80-pulseaudio-device-priorities.patch 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 -# http://bugs.kde.org/223662 -Patch55: phonon-4.3.80-fix-xine-pulseaudio-init.patch - -# patch adapted from http://permalink.gmane.org/gmane.comp.kde.users.multimedia/5700 -# splits out device_manager bits used only on pa >= 0.9.21 -Patch60: phonon-4.3.80-old_pa.patch ## Upstream patches @@ -69,7 +62,7 @@ Requires: qt4%{?_isa} >= %{_qt4_version} %package devel Summary: Developer files for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: qt4-devel Requires: pkgconfig %description devel @@ -97,27 +90,24 @@ Provides: %{name}-backend-gst = %{version}-%{release} %prep -%setup -q -n phonon%{!?snap:-%{version}} +%setup -q -n phonon%{!?snap:-%{?tar_ver}%{!?tar_ver:%{version}}} %if 0%{?pa_keep_old_hacks} -%patch0 -p1 -b .pulseaudio-device-priorities -%patch1 -p1 -b .xine_pulseaudio +# FIXME/adapt to 4.4, or drop +#patch0 -p1 -b .pulseaudio-device-priorities +#patch1 -p1 -b .xine_pulseaudio %endif -%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 .fix-gstreamer-pulseaudio-deadlock -%patch55 -p1 -b .fix-xine-pulseaudio-init - -%patch60 -p1 -b .old_pa %build mkdir -p %{_target_platform} pushd %{_target_platform} %{cmake} \ + %{?_cmake_skip_rpath} \ -DUSE_INSTALL_PLUGIN=TRUE \ .. popd @@ -216,6 +206,9 @@ gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: %changelog +* Wed Feb 24 2010 Rex Dieter - 4.4.0-0.2 +- preliminary phonon-4.4.0 tarball + * Fri Jan 22 2010 Rex Dieter - 4.3.80-6 - sync w/mdv patches diff --git a/sources b/sources index dc0adc2..e9f9fad 100644 --- a/sources +++ b/sources @@ -5,4 +5,4 @@ 12db12c009b722a6dc141f78feb7e330 hi32-phonon-gstreamer.png 86c34a1b81d44980b1381f94ed6b7a23 hi48-phonon-gstreamer.png 153505c71ec021b0a3bd4b74f2492e93 hi64-phonon-gstreamer.png -6b0c5554291615433c14c3c38f741690 phonon-4.3.80.tar.bz2 +80544b876cf0e0af05f2303b3f534351 phonon-4.4.0.tgz