diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2009-10-01 06:56:53 (GMT) |
---|---|---|
committer | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2009-10-01 06:56:53 (GMT) |
commit | 58344e4fc4503e20c1eb0f8d97986bae5f1f4f71 (patch) | |
tree | 9af4c6248584cf976f3211929b0fbe2f28961581 /src | |
parent | eb26efd476faa6e6986e62de12c24527a5476fd3 (diff) | |
download | Qt-58344e4fc4503e20c1eb0f8d97986bae5f1f4f71.zip Qt-58344e4fc4503e20c1eb0f8d97986bae5f1f4f71.tar.gz Qt-58344e4fc4503e20c1eb0f8d97986bae5f1f4f71.tar.bz2 |
Fixes: Phonon-gst: Respect device MediaSource property.
Task: QT-1027
RevBy: Andrew den Exter
Details:
All gst disk sources support setting device name with "device" property,
otherwise the default device is used.
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/gstreamer/mediaobject.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp index 71cd87f..5dcbd42 100644 --- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp +++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp @@ -369,6 +369,11 @@ bool MediaObject::createPipefromURL(const QUrl &url) if (!m_datasource) return false; + // Set the device for MediaSource::Disc + QByteArray mediaDevice = QFile::encodeName(m_source.deviceName()); + if (!mediaDevice.isEmpty()) + g_object_set (m_datasource, "device", mediaDevice.constData(), (const char*)NULL); + // Link data source into pipeline gst_bin_add(GST_BIN(m_pipeline), m_datasource); if (!gst_element_link(m_datasource, m_decodebin)) { |