static gboolean
gst_osx_audio_ring_buffer_open_device (GstAudioRingBuffer * buf)
{
  GstOsxAudioRingBuffer *osxbuf = GST_OSX_AUDIO_RING_BUFFER (buf);

  if (!gst_core_audio_select_device (osxbuf->core_audio))
    return FALSE;

  return gst_core_audio_open (osxbuf->core_audio);
}
예제 #2
0
static gboolean
gst_osx_audio_sink_select_device (GstOsxAudioSink * osxsink)
{
  gboolean res = FALSE;

  if (!gst_core_audio_select_device (&osxsink->device_id))
    return FALSE;
  res = gst_osx_audio_sink_allowed_caps (osxsink);

  return res;
}
static gboolean
gst_osx_audio_ring_buffer_open_device (GstAudioRingBuffer * buf)
{
  GstObject *osxel = GST_OBJECT_PARENT (buf);
  GstOsxAudioRingBuffer *osxbuf = GST_OSX_AUDIO_RING_BUFFER (buf);

  if (!gst_core_audio_select_device (osxbuf->core_audio)) {
    GST_ELEMENT_ERROR (osxel, RESOURCE, NOT_FOUND,
        (_("CoreAudio device not found")), (NULL));
    return FALSE;
  }

  if (!gst_core_audio_open (osxbuf->core_audio)) {
    GST_ELEMENT_ERROR (osxel, RESOURCE, OPEN_READ,
        (_("CoreAudio device could not be opened")), (NULL));
    return FALSE;
  }

  return TRUE;
}