parent
1a71b98d9a
commit
c4abb88163
@ -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 <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;
|
||||
}
|
||||
|
@ -1,29 +0,0 @@
|
||||
diff -up phonon-4.3.1/CMakeLists.txt.orig phonon-4.3.1/CMakeLists.txt
|
||||
--- phonon-4.3.1/CMakeLists.txt.orig 2009-06-05 16:16:00.000000000 +0200
|
||||
+++ phonon-4.3.1/CMakeLists.txt 2009-06-05 16:22:48.000000000 +0200
|
||||
@@ -248,25 +248,8 @@ if(APPLE)
|
||||
set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
|
||||
endif(APPLE)
|
||||
|
||||
-
|
||||
-add_subdirectory(cmake)
|
||||
-add_subdirectory(phonon)
|
||||
-add_subdirectory(includes)
|
||||
-if (Q_WS_MAC AND BUILD_PHONON_QT7)
|
||||
- add_subdirectory(qt7)
|
||||
-endif (Q_WS_MAC AND BUILD_PHONON_QT7)
|
||||
-if (Q_WS_WIN)
|
||||
- add_subdirectory(ds9)
|
||||
-endif (Q_WS_WIN)
|
||||
-
|
||||
if (Q_WS_X11)
|
||||
- add_subdirectory(gstreamer)
|
||||
add_subdirectory(xine)
|
||||
endif (Q_WS_X11)
|
||||
|
||||
-if(NOT WIN32) # pkgconfig file
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/phonon.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/phonon.pc @ONLY)
|
||||
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/phonon.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
|
||||
-endif(NOT WIN32)
|
||||
-
|
||||
macro_display_feature_log()
|
@ -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."));
|
@ -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();
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
diff -up phonon-4.3.1/xine/mediaobject.cpp.kde#172242-2 phonon-4.3.1/xine/mediaobject.cpp
|
||||
--- phonon-4.3.1/xine/mediaobject.cpp.kde#172242-2 2009-06-18 12:37:45.641000922 -0500
|
||||
+++ phonon-4.3.1/xine/mediaobject.cpp 2009-06-18 12:39:15.917231311 -0500
|
||||
@@ -321,7 +321,7 @@ static QByteArray mrlEncode(QByteArray m
|
||||
{
|
||||
for (int i = 0; i < mrl.size(); ++i) {
|
||||
const unsigned char c = static_cast<unsigned char>(mrl.at(i));
|
||||
- if (c & 0x80 || c == '\\' || c < 32 || c == '%') {
|
||||
+ if (c & 0x80 || c == '\\' || c < 32 || c == '%' || c == '#') {
|
||||
char enc[4];
|
||||
qsnprintf(enc, 4, "%%%02X", c);
|
||||
mrl = mrl.left(i) + QByteArray(enc, 3) + mrl.mid(i + 1);
|
@ -1,101 +0,0 @@
|
||||
Index: phonon/xine/xinestream.h
|
||||
===================================================================
|
||||
--- phonon/xine/xinestream.h (revision 924144)
|
||||
+++ phonon/xine/xinestream.h (revision 924145)
|
||||
@@ -86,7 +86,6 @@
|
||||
//void needRewire(AudioPostList *postList);
|
||||
void useGaplessPlayback(bool);
|
||||
void useGapOf(int gap);
|
||||
- void gaplessSwitchTo(const QUrl &url);
|
||||
void gaplessSwitchTo(const QByteArray &mrl);
|
||||
void closeBlocking();
|
||||
void aboutToDeleteVideoWidget();
|
||||
@@ -141,7 +140,6 @@
|
||||
|
||||
void unload();
|
||||
public slots:
|
||||
- void setUrl(const QUrl &url);
|
||||
void setMrl(const QByteArray &mrl, StateForNewMrl = StoppedState);
|
||||
void play();
|
||||
void pause();
|
||||
Index: phonon/xine/mediaobject.cpp
|
||||
===================================================================
|
||||
--- phonon/xine/mediaobject.cpp (revision 924144)
|
||||
+++ phonon/xine/mediaobject.cpp (revision 924145)
|
||||
@@ -317,6 +317,20 @@
|
||||
setSourceInternal(source, HardSwitch);
|
||||
}
|
||||
|
||||
+static QByteArray mrlEncode(QByteArray mrl)
|
||||
+{
|
||||
+ for (int i = 0; i < mrl.size(); ++i) {
|
||||
+ const unsigned char c = static_cast<unsigned char>(mrl.at(i));
|
||||
+ if (c & 0x80 || c == '\\' || c < 32 || c == '%') {
|
||||
+ char enc[4];
|
||||
+ qsnprintf(enc, 4, "%%%02X", c);
|
||||
+ mrl = mrl.left(i) + QByteArray(enc, 3) + mrl.mid(i + 1);
|
||||
+ i += 2;
|
||||
+ }
|
||||
+ }
|
||||
+ return mrl;
|
||||
+}
|
||||
+
|
||||
void MediaObject::setSourceInternal(const MediaSource &source, HowToSetTheUrl how)
|
||||
{
|
||||
//debug() << Q_FUNC_INFO;
|
||||
@@ -340,13 +354,18 @@
|
||||
m_stream->setError(Phonon::NormalError, tr("Cannot open media data at '<i>%1</i>'").arg(source.url().toString(QUrl::RemovePassword)));
|
||||
return;
|
||||
}
|
||||
- switch (how) {
|
||||
- case GaplessSwitch:
|
||||
- m_stream->gaplessSwitchTo(source.url());
|
||||
- break;
|
||||
- case HardSwitch:
|
||||
- m_stream->setUrl(source.url());
|
||||
- break;
|
||||
+ {
|
||||
+ const QByteArray &mrl = (source.url().scheme() == QLatin1String("file") ?
|
||||
+ "file:/" + mrlEncode(QFile::encodeName(source.url().toLocalFile())) :
|
||||
+ source.url().toEncoded());
|
||||
+ switch (how) {
|
||||
+ case GaplessSwitch:
|
||||
+ m_stream->gaplessSwitchTo(mrl);
|
||||
+ break;
|
||||
+ case HardSwitch:
|
||||
+ m_stream->setMrl(mrl);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
case MediaSource::Disc:
|
||||
Index: phonon/xine/xinestream.cpp
|
||||
===================================================================
|
||||
--- phonon/xine/xinestream.cpp (revision 924144)
|
||||
+++ phonon/xine/xinestream.cpp (revision 924145)
|
||||
@@ -619,12 +619,6 @@
|
||||
}
|
||||
|
||||
// called from main thread
|
||||
-void XineStream::gaplessSwitchTo(const QUrl &url)
|
||||
-{
|
||||
- gaplessSwitchTo(url.toEncoded());
|
||||
-}
|
||||
-
|
||||
-// called from main thread
|
||||
void XineStream::gaplessSwitchTo(const QByteArray &mrl)
|
||||
{
|
||||
QCoreApplication::postEvent(this, new GaplessSwitchEvent(mrl));
|
||||
@@ -1707,12 +1701,6 @@
|
||||
}
|
||||
|
||||
// called from main thread
|
||||
-void XineStream::setUrl(const QUrl &url)
|
||||
-{
|
||||
- setMrl(url.toEncoded());
|
||||
-}
|
||||
-
|
||||
-// called from main thread
|
||||
void XineStream::setMrl(const QByteArray &mrl, StateForNewMrl sfnm)
|
||||
{
|
||||
debug() << Q_FUNC_INFO << mrl << ", " << sfnm;
|
@ -1,8 +1,8 @@
|
||||
diff -Naurw phonon-4.2.96/xine/backend.cpp phonon-4.2.96.xine-pulseaudio/xine/backend.cpp
|
||||
--- phonon-4.2.96/xine/backend.cpp 2008-12-19 08:08:53.000000000 +0100
|
||||
+++ phonon-4.2.96.xine-pulseaudio/xine/backend.cpp 2009-01-08 21:31:10.000000000 +0100
|
||||
@@ -649,7 +649,7 @@
|
||||
"in KDE2 and KDE3. Its use is discuraged.</p></html>"),
|
||||
diff -up phonon/xine/backend.cpp.pulseaudio phonon/xine/backend.cpp
|
||||
--- phonon/xine/backend.cpp.pulseaudio 2009-10-03 14:00:19.000000000 -0500
|
||||
+++ phonon/xine/backend.cpp 2009-10-19 12:23:17.768923476 -0500
|
||||
@@ -649,7 +649,7 @@ void Backend::checkAudioOutputs()
|
||||
"in KDE2 and KDE3. Its use is discouraged.</p></html>"),
|
||||
/*icon name */"audio-backend-arts", outputPlugins[i]);
|
||||
} else if (0 == strcmp(outputPlugins[i], "pulseaudio")) {
|
||||
- addAudioOutput(nextIndex++, 10, tr("PulseAudio"),
|
@ -0,0 +1,15 @@
|
||||
#/bin/sh
|
||||
|
||||
DATE=$(date +%Y%m%d)
|
||||
EXPORT_DIR=phonon
|
||||
|
||||
set -x
|
||||
rm -rf $EXPORT_DIR
|
||||
# app
|
||||
svn export svn://anonsvn.kde.org/home/kde/trunk/kdesupport/phonon $EXPORT_DIR/
|
||||
|
||||
tar cjf $EXPORT_DIR-${DATE}svn.tar.bz2 $EXPORT_DIR
|
||||
|
||||
# cleanup
|
||||
rm -rf $EXPORT_DIR
|
||||
|
@ -1,60 +0,0 @@
|
||||
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);
|
@ -1,8 +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
|
||||
e009dfbb29af69abf8e11e5feb6a2007 phonon-20091019svn.tar.bz2
|
||||
|
Loading…
Reference in new issue