[Bug 759227] New: ring buffer state is still GST_AUDIO_RING_BUFFER_STATE_ERROR after changing element state from null to ready failed.
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Dec 8 23:05:18 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=759227
Bug ID: 759227
Summary: ring buffer state is still
GST_AUDIO_RING_BUFFER_STATE_ERROR after changing
element state from null to ready failed.
Classification: Platform
Product: GStreamer
Version: 1.0.0
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-base
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: 27210403 at qq.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
try to setup a pipeline of which the source is alsasrc.
when set pipeline state to playing, the alsasrc device is not ready and we got
a resource error, the state change failed.
after this the state of audiosrcringbuffer is
GST_AUDIO_RING_BUFFER_STATE_ERROR.
then we set pipeline state to null and try to set the pipeline state to play
again, this time the alsa src device is ready and open is success. but we still
get an internal flow error as the ring buffer is not created again, the state
is still GST_AUDIO_RING_BUFFER_STATE_ERROR.
simply use following modification to help understanding this problem:
===========================code===============================
static GstStateChangeReturn
gst_audio_base_src_change_state (GstElement * element,
GstStateChange transition)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GstAudioBaseSrc *src = GST_AUDIO_BASE_SRC (element);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
GST_DEBUG_OBJECT (src, "NULL->READY");
GST_OBJECT_LOCK (src);
+ if (src->ringbuffer != NULL) {
+ gst_object_unparent (GST_OBJECT_CAST (src->ringbuffer));
+ src->ringbuffer = NULL;
+ }
if (src->ringbuffer == NULL) {
gst_audio_clock_reset (GST_AUDIO_CLOCK (src->clock), 0);
src->ringbuffer = gst_audio_base_src_create_ringbuffer (src);
}
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list