Commit 5474600d authored by Wim Taymans's avatar Wim Taymans
Browse files

gst-libs/gst/audio/: Various small cleanups.

Original commit message from CVS:
* gst-libs/gst/audio/gstaudiosink.c:
(gst_audioringbuffer_get_type), (gst_audioringbuffer_class_init),
(audioringbuffer_thread_func), (gst_audioringbuffer_init),
(gst_audioringbuffer_acquire), (gst_audioringbuffer_release),
(gst_audioringbuffer_play), (gst_audioringbuffer_stop),
(gst_audioringbuffer_delay), (gst_audiosink_class_init),
(gst_audiosink_create_ringbuffer):
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_baseaudiosink_class_init), (gst_baseaudiosink_init),
(gst_baseaudiosink_get_clock), (gst_baseaudiosink_get_time),
(gst_baseaudiosink_set_property), (build_linear_format),
(debug_spec_caps), (debug_spec_buffer),
(gst_baseaudiosink_setcaps), (gst_baseaudiosink_get_times),
(gst_baseaudiosink_event), (gst_baseaudiosink_preroll),
(gst_baseaudiosink_render), (gst_baseaudiosink_create_ringbuffer),
(gst_baseaudiosink_callback), (gst_baseaudiosink_change_state):
* gst-libs/gst/audio/gstringbuffer.c: (gst_ringbuffer_get_type),
(gst_ringbuffer_set_callback), (gst_ringbuffer_acquire),
(gst_ringbuffer_release), (gst_ringbuffer_is_acquired),
(gst_ringbuffer_play), (gst_ringbuffer_pause),
(gst_ringbuffer_stop), (gst_ringbuffer_delay),
(gst_ringbuffer_played_samples), (gst_ringbuffer_set_sample),
(wait_segment), (gst_ringbuffer_commit),
(gst_ringbuffer_prepare_read), (gst_ringbuffer_advance),
(gst_ringbuffer_clear):
Various small cleanups.

* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_chain),
(gst_audio_convert_change_state):
* gst/subparse/gstsubparse.c: (gst_subparse_chain):
No need to take the locks anymore.
parent b48b315b
2005-05-25 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstaudiosink.c:
(gst_audioringbuffer_get_type), (gst_audioringbuffer_class_init),
(audioringbuffer_thread_func), (gst_audioringbuffer_init),
(gst_audioringbuffer_acquire), (gst_audioringbuffer_release),
(gst_audioringbuffer_play), (gst_audioringbuffer_stop),
(gst_audioringbuffer_delay), (gst_audiosink_class_init),
(gst_audiosink_create_ringbuffer):
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_baseaudiosink_class_init), (gst_baseaudiosink_init),
(gst_baseaudiosink_get_clock), (gst_baseaudiosink_get_time),
(gst_baseaudiosink_set_property), (build_linear_format),
(debug_spec_caps), (debug_spec_buffer),
(gst_baseaudiosink_setcaps), (gst_baseaudiosink_get_times),
(gst_baseaudiosink_event), (gst_baseaudiosink_preroll),
(gst_baseaudiosink_render), (gst_baseaudiosink_create_ringbuffer),
(gst_baseaudiosink_callback), (gst_baseaudiosink_change_state):
* gst-libs/gst/audio/gstringbuffer.c: (gst_ringbuffer_get_type),
(gst_ringbuffer_set_callback), (gst_ringbuffer_acquire),
(gst_ringbuffer_release), (gst_ringbuffer_is_acquired),
(gst_ringbuffer_play), (gst_ringbuffer_pause),
(gst_ringbuffer_stop), (gst_ringbuffer_delay),
(gst_ringbuffer_played_samples), (gst_ringbuffer_set_sample),
(wait_segment), (gst_ringbuffer_commit),
(gst_ringbuffer_prepare_read), (gst_ringbuffer_advance),
(gst_ringbuffer_clear):
Various small cleanups.
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_chain),
(gst_audio_convert_change_state):
* gst/subparse/gstsubparse.c: (gst_subparse_chain):
No need to take the locks anymore.
2005-05-25 Wim Taymans <wim@fluendo.com>
 
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
......
......@@ -294,6 +294,7 @@ gst_audioringbuffer_release (GstRingBuffer * buf)
/* free the buffer */
gst_buffer_unref (buf->data);
buf->data = NULL;
if (csink->close)
result = csink->close (sink);
......
......@@ -457,6 +457,7 @@ gst_baseaudiosink_event (GstBaseSink * bsink, GstEvent * event)
sample = 0;
have_value:
GST_DEBUG ("discont now at %lld", sample);
gst_ringbuffer_set_sample (sink->ringbuffer, sample);
break;
}
......@@ -483,7 +484,8 @@ gst_baseaudiosink_render (GstBaseSink * bsink, GstBuffer * buf)
offset = GST_BUFFER_OFFSET (buf);
GST_DEBUG ("in offset %llu, time %lld", offset, GST_BUFFER_TIMESTAMP (buf));
GST_DEBUG ("in offset %llu, time %" GST_TIME_FORMAT, offset,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
if (!gst_ringbuffer_is_acquired (sink->ringbuffer))
goto wrong_state;
......
......@@ -244,8 +244,6 @@ gst_audio_convert_chain (GstPad * pad, GstBuffer * buf)
* - convert rate and channels
* - convert back to output format
*/
GST_STREAM_LOCK (pad);
if (!GST_RPAD_CAPS (this->sink)) {
goto not_negotiated;
} else if (!GST_RPAD_CAPS (this->src)) {
......@@ -262,8 +260,6 @@ gst_audio_convert_chain (GstPad * pad, GstBuffer * buf)
ret = gst_pad_push (this->src, buf);
GST_STREAM_UNLOCK (pad);
return ret;
not_negotiated:
......@@ -271,7 +267,6 @@ not_negotiated:
GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, (NULL),
("Pad not negotiated before chain function was called"));
gst_buffer_unref (buf);
GST_STREAM_UNLOCK (pad);
return GST_FLOW_NOT_NEGOTIATED;
}
no_format:
......@@ -279,7 +274,6 @@ no_format:
GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, (NULL),
("Could not negotiate format"));
gst_buffer_unref (buf);
GST_STREAM_UNLOCK (pad);
return GST_FLOW_ERROR;
}
}
......@@ -648,12 +642,10 @@ gst_audio_convert_change_state (GstElement * element)
switch (transition) {
case GST_STATE_PAUSED_TO_READY:
GST_STREAM_LOCK (this->sink);
this->convert_internal = NULL;
gst_audio_convert_unset_matrix (this);
gst_caps_replace (&GST_RPAD_CAPS (this->sink), NULL);
gst_caps_replace (&GST_RPAD_CAPS (this->src), NULL);
GST_STREAM_UNLOCK (this->sink);
break;
default:
break;
......
......@@ -618,12 +618,8 @@ gst_subparse_chain (GstPad * sinkpad, GstBuffer * buf)
GST_DEBUG ("gst_subparse_chain");
self = GST_SUBPARSE (GST_OBJECT_PARENT (sinkpad));
GST_STREAM_LOCK (sinkpad);
ret = handle_buffer (self, buf);
GST_STREAM_UNLOCK (sinkpad);
return ret;
}
......
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