Commit 4e3b19e5 authored by Wim Taymans's avatar Wim Taymans
Browse files

gst-libs/gst/audio/gstbaseaudiosrc.c: Open and close device in READY<->NULL state change.

Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_change_state):
Open and close device in READY<->NULL state change.
parent 107da3e9
2005-08-16 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_change_state):
Open and close device in READY<->NULL state change.
2005-08-16 Andy Wingo <wingo@pobox.com>
 
* examples/seeking/Makefile.am: Don't compile non-compiling
......
......@@ -369,11 +369,15 @@ gst_base_audio_src_change_state (GstElement * element)
switch (transition) {
case GST_STATE_NULL_TO_READY:
if (src->ringbuffer == NULL) {
src->ringbuffer = gst_base_audio_src_create_ringbuffer (src);
gst_ring_buffer_set_callback (src->ringbuffer,
gst_base_audio_src_callback, src);
}
if (!gst_ring_buffer_open_device (src->ringbuffer))
return GST_STATE_FAILURE;
break;
case GST_STATE_READY_TO_PAUSED:
src->ringbuffer = gst_base_audio_src_create_ringbuffer (src);
gst_ring_buffer_set_callback (src->ringbuffer,
gst_base_audio_src_callback, src);
break;
case GST_STATE_PAUSED_TO_PLAYING:
break;
......@@ -390,10 +394,11 @@ gst_base_audio_src_change_state (GstElement * element)
case GST_STATE_PAUSED_TO_READY:
gst_ring_buffer_stop (src->ringbuffer);
gst_ring_buffer_release (src->ringbuffer);
gst_object_unref (GST_OBJECT (src->ringbuffer));
src->ringbuffer = NULL;
break;
case GST_STATE_READY_TO_NULL:
gst_ring_buffer_close_device (src->ringbuffer);
gst_object_unref (GST_OBJECT (src->ringbuffer));
src->ringbuffer = NULL;
break;
default:
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment