From eb26efd476faa6e6986e62de12c24527a5476fd3 Mon Sep 17 00:00:00 2001 From: Dmytro Poplavskiy Date: Thu, 1 Oct 2009 16:49:23 +1000 Subject: Fixes: Phonon-gst: use correct URLs for different disk types. RevBy: Andrew den Exter Details: Phonon gstreamer backend used cdda:// URL and corresponding gst source element regardless of disk type. --- src/3rdparty/phonon/gstreamer/mediaobject.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp index 13f9734..71cd87f 100644 --- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp +++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp @@ -904,8 +904,21 @@ void MediaObject::setSource(const MediaSource &source) case MediaSource::Disc: // CD tracks can be specified by setting the url in the following way uri=cdda:4 { - QUrl cdurl(QLatin1String("cdda://")); - if (createPipefromURL(cdurl)) + QUrl url; + switch (source.discType()) { + case Phonon::Cd: + url = QUrl(QLatin1String("cdda://")); + break; + case Phonon::Dvd: + url = QUrl(QLatin1String("dvd://")); + break; + case Phonon::Vcd: + url = QUrl(QLatin1String("vcd://")); + break; + default: + break; + } + if (!url.isEmpty() && createPipefromURL(url)) m_loading = true; else setError(tr("Could not open media source.")); -- cgit v0.12