mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
107da3e93c
commit
4e3b19e5fb
2 changed files with 16 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue