rpms/qt/devel qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch, NONE, 1.1 qt.spec, 1.307, 1.308
Than Ngo
than at fedoraproject.org
Sun Aug 16 12:52:35 UTC 2009
Author: than
Update of /cvs/extras/rpms/qt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11544
Modified Files:
qt.spec
Added Files:
qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch
Log Message:
fix phonon-backend-gstreamer for using pulsaudio
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: qt.spec
===================================================================
RCS file: /cvs/extras/rpms/qt/devel/qt.spec,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -p -r1.307 -r1.308
--- qt.spec 15 Aug 2009 20:18:11 -0000 1.307
+++ qt.spec 16 Aug 2009 12:52:35 -0000 1.308
@@ -12,7 +12,7 @@ Epoch: 1
Name: qt4
%endif
Version: 4.5.2
-Release: 7%{?dist}
+Release: 8%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@@ -49,6 +49,7 @@ Patch17: phonon-4.2.96-pulseaudio.patch
Patch19: qt-x11-opensource-src-4.5.1-phonon.patch
# fix the qt-copy patch 0274-shm-native-image-fix.diff to apply against 4.5.2
Patch20: qt-copy-20090626-qt452.patch
+Patch21: qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch
## upstreamable bits
# http://bugzilla.redhat.com/485677
@@ -398,6 +399,7 @@ pushd src/3rdparty/phonon
%patch17 -p1 -b .phonon-pulseaudio
popd
%patch19 -p1 -b .servicesfile
+%patch21 -p1 -b .gst-pulsaudio
%patch51 -p1 -b .qdoc3
%patch52 -p1 -b .sparc64
%patch53 -p1 -b .qatomic-inline-asm
@@ -929,6 +931,9 @@ fi
%{_datadir}/icons/hicolor/*/apps/qt4-logo.*
%changelog
+* Sun Aug 16 2009 Than Ngo <than at redhat.com> - 4.5.2-8
+- fix phonon-backend-gstreamer for using pulsaudio
+
* Sat Aug 18 2009 Rex Dieter <rdieter at fedoraproject.org> 4.5.2-7
- kde-qt: 287-qmenu-respect-minwidth
- kde-qt: 0288-more-x-keycodes (#475247)
More information about the fedora-extras-commits
mailing list