[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdereview/phonon/gstreamer
From: Matthias Kretz <kretz () kde ! org>
Date: 2008-04-22 13:58:18
Message-ID: 1208872698.442309.11959.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 799841 by mkretz:
try all possible devices to determine whether a sink is useful
M +9 -3 devicemanager.cpp
--- trunk/kdereview/phonon/gstreamer/devicemanager.cpp #799840:799841
@@ -127,9 +127,15 @@
if (gst_element_set_state(element, GST_STATE_READY) == \
GST_STATE_CHANGE_SUCCESS) return true;
- // FIXME: if the above failed that might only mean that some property \
first has to be
- // set/changed before it will go the READY. E.g. the alsasink only \
probes the "default" device.
- // If that fails for some reason it doesn't indicate a fatal error
+ const QList<QByteArray> &list = GstHelper::extractProperties(element, \
"device"); + foreach (const QByteArray &gstId, list) {
+ GstHelper::setProperty(element, "device", gstId);
+ if (gst_element_set_state(element, GST_STATE_READY) == \
GST_STATE_CHANGE_SUCCESS) { + return true;
+ }
+ }
+ // FIXME: the above can still fail for a valid alsasink because list \
only contains entries of + // the form "hw:X,Y". Would be better to use \
"default:X" or "dmix:X,Y"
gst_element_set_state(element, GST_STATE_NULL);
return false;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic