summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2009-11-11 03:56:04 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-13 12:10:27 (GMT)
commitab231a57a56654f350b876365646e41b135c43be (patch)
tree3811e323238bd4924cfe6dffb8ac6a8d52932716
parentf354190476f78e51c71a0800a9164b255854c14b (diff)
downloadQt-ab231a57a56654f350b876365646e41b135c43be.zip
Qt-ab231a57a56654f350b876365646e41b135c43be.tar.gz
Qt-ab231a57a56654f350b876365646e41b135c43be.tar.bz2
Gstreamer: Added DVD support
Intergrated KDE change 1040729 by nlecureuil This bug was already fixed in Qt phonon repo in exactly the same way, but KDE change is applyed to keep phonon sources in sync. Reviewed-by: Dmytro Poplavskiy (cherry picked from commit efc566799797a9088628ac21d83ee2d39805fabc)
-rw-r--r--src/3rdparty/phonon/gstreamer/mediaobject.cpp34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp
index f312b6f..eafaeec 100644
--- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp
+++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp
@@ -344,7 +344,7 @@ void MediaObject::cb_pad_added(GstElement *decodebin,
Q_UNUSED(decodebin);
GstPad *decodepad = static_cast<GstPad*>(data);
gst_pad_link (pad, decodepad);
- gst_object_unref (decodepad);
+ //gst_object_unref (decodepad);
}
/**
@@ -928,23 +928,27 @@ void MediaObject::setSource(const MediaSource &source)
setError(tr("Could not open media source."));
break;
- case MediaSource::Disc: // CD tracks can be specified by setting the url in the following way uri=cdda:4
+ case MediaSource::Disc:
{
- QUrl url;
+ QString mediaUrl;
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;
+ case Phonon::NoDisc:
+ qWarning() << "I should never get to see a MediaSource that is a disc but doesn't specify which one";
+ return;
+ case Phonon::Cd: // CD tracks can be specified by setting the url in the following way uri=cdda:4
+ mediaUrl = QLatin1String("cdda://");
+ break;
+ case Phonon::Dvd:
+ mediaUrl = QLatin1String("dvd://");
+ break;
+ case Phonon::Vcd:
+ mediaUrl = QLatin1String("vcd://");
+ break;
+ default:
+ qWarning() << "media " << source.discType() << " not implemented";
+ return;
}
- if (!url.isEmpty() && createPipefromURL(url))
+ if (!mediaUrl.isEmpty() && createPipefromURL(QUrl(mediaUrl)))
m_loading = true;
else
setError(tr("Could not open media source."));