summaryrefslogtreecommitdiff
path: root/sys/opensles
diff options
context:
space:
mode:
authorJosep Torra <n770galaxy@gmail.com>2012-09-28 15:10:19 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-18 14:03:09 +0200
commit78e3b9f4281e5ea6cf7baf24a02f344123ab567c (patch)
tree9917f150c5d0c1e9ac66ab54b92dd27aeeb20590 /sys/opensles
parent1d9f48a33d78c301d98e548ba04bfc526ff86afd (diff)
opensles: check for device outputs in the mixer
Diffstat (limited to 'sys/opensles')
-rw-r--r--sys/opensles/openslesringbuffer.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/opensles/openslesringbuffer.c b/sys/opensles/openslesringbuffer.c
index aa0486a04..518e26614 100644
--- a/sys/opensles/openslesringbuffer.c
+++ b/sys/opensles/openslesringbuffer.c
@@ -678,6 +678,8 @@ gst_opensles_ringbuffer_open_device (GstRingBuffer * rb)
}
if (thiz->mode == RB_MODE_SINK_PCM) {
+ SLOutputMixItf outputMix;
+
/* Create an output mixer */
result = (*thiz->engineEngine)->CreateOutputMix (thiz->engineEngine,
&thiz->outputMixObject, 0, NULL, NULL);
@@ -695,6 +697,24 @@ gst_opensles_ringbuffer_open_device (GstRingBuffer * rb)
(guint32) result);
goto failed;
}
+
+ /* Check for output device options */
+ result = (*thiz->outputMixObject)->GetInterface (thiz->outputMixObject,
+ SL_IID_OUTPUTMIX, &outputMix);
+ if (result != SL_RESULT_SUCCESS) {
+ GST_WARNING_OBJECT (thiz, "outputMix.GetInterface failed(0x%08x)",
+ (guint32) result);
+ } else {
+ SLint32 numDevices;
+ SLuint32 deviceIDs[16];
+ gint i;
+ (*outputMix)->GetDestinationOutputDeviceIDs (outputMix, &numDevices,
+ deviceIDs);
+ GST_DEBUG_OBJECT (thiz, "Found %d output devices", (gint) numDevices);
+ for (i = 0; i < numDevices; i++) {
+ GST_DEBUG_OBJECT (thiz, " DeviceID: %08x", (guint) deviceIDs[i]);
+ }
+ }
}
GST_DEBUG_OBJECT (thiz, "device opened");