rev 15546 - in trunk/packages/phonon/debian: . patches
Sune Vuorela
pusling-guest at alioth.debian.org
Thu Aug 6 20:39:34 UTC 2009
Author: pusling-guest
Date: 2009-08-06 20:39:34 +0000 (Thu, 06 Aug 2009)
New Revision: 15546
Added:
trunk/packages/phonon/debian/patches/05_924144_encoding_local_files_fix.diff
Modified:
trunk/packages/phonon/debian/changelog
trunk/packages/phonon/debian/patches/series
Log:
+++ Changes by Modestas Vainius:
+++ Changes by Sune Vuorela:
* Backport a bugfix from upstream to fix encoding issues with filenames.
Modified: trunk/packages/phonon/debian/changelog
===================================================================
--- trunk/packages/phonon/debian/changelog 2009-08-06 17:17:27 UTC (rev 15545)
+++ trunk/packages/phonon/debian/changelog 2009-08-06 20:39:34 UTC (rev 15546)
@@ -1,10 +1,16 @@
phonon (4:4.3.1-4~pre1) unstable; urgency=low
+ +++ Changes by Modestas Vainius:
+
* Install backends to /usr/lib/qt4 (Closes: #539623). Otherwise pure Qt4
applications cannot find any backends.
- -- Modestas Vainius <modestas at vainius.eu> Sun, 02 Aug 2009 18:10:57 +0300
+ +++ Changes by Sune Vuorela:
+ * Backport a bugfix from upstream to fix encoding issues with filenames.
+
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Thu, 06 Aug 2009 22:36:33 +0200
+
phonon (4:4.3.1-3) unstable; urgency=low
+++ Changes by Fathi Boudra:
Added: trunk/packages/phonon/debian/patches/05_924144_encoding_local_files_fix.diff
===================================================================
--- trunk/packages/phonon/debian/patches/05_924144_encoding_local_files_fix.diff (rev 0)
+++ trunk/packages/phonon/debian/patches/05_924144_encoding_local_files_fix.diff 2009-08-06 20:39:34 UTC (rev 15546)
@@ -0,0 +1,95 @@
+--- a/xine/xinestream.h
++++ b/xine/xinestream.h
+@@ -86,7 +86,6 @@ class XineStream : public QObject, publi
+ //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 @@ class XineStream : public QObject, publi
+
+ void unload();
+ public slots:
+- void setUrl(const QUrl &url);
+ void setMrl(const QByteArray &mrl, StateForNewMrl = StoppedState);
+ void play();
+ void pause();
+--- a/xine/mediaobject.cpp
++++ b/xine/mediaobject.cpp
+@@ -317,6 +317,20 @@ void MediaObject::setSource(const MediaS
+ 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 @@ void MediaObject::setSourceInternal(cons
+ 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:
+--- a/xine/xinestream.cpp
++++ b/xine/xinestream.cpp
+@@ -619,12 +619,6 @@ void XineStream::useGapOf(int gap)
+ }
+
+ // 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 @@ xine_post_out_t *XineStream::videoOutput
+ }
+
+ // 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;
Modified: trunk/packages/phonon/debian/patches/series
===================================================================
--- trunk/packages/phonon/debian/patches/series 2009-08-06 17:17:27 UTC (rev 15545)
+++ trunk/packages/phonon/debian/patches/series 2009-08-06 20:39:34 UTC (rev 15546)
@@ -2,3 +2,4 @@
02_disable_phonon_build.diff
03_r950739_fullscreen_hidecursor.diff
04_backends_to_qt4_plugins_dir.diff
+05_924144_encoding_local_files_fix.diff
More information about the pkg-kde-commits
mailing list