mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
gst-libs/gst/audio/gstaudiosink.c: Set the worker thread's running flag to TRUE before starting the thread.
Original commit message from CVS: 2005-06-25 Jan Schmidt <thaytan@mad.scientist.com> * gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_acquire): Set the worker thread's running flag to TRUE before starting the thread. * gst/playback/gstdecodebin.c: (gst_decode_bin_init): Catch a failure to add typefind to the bin.
This commit is contained in:
parent
4cb699caf6
commit
2255ffd384
3 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-06-25 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
* gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_acquire):
|
||||||
|
Set the worker thread's running flag to TRUE before starting the
|
||||||
|
thread.
|
||||||
|
* gst/playback/gstdecodebin.c: (gst_decode_bin_init):
|
||||||
|
Catch a failure to add typefind to the bin.
|
||||||
|
|
||||||
2005-06-24 Thomas Vander Stichele <thomas at apestaart dot org>
|
2005-06-24 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/sine/gstsinesrc.c: (gst_sinesrc_class_init),
|
* gst/sine/gstsinesrc.c: (gst_sinesrc_class_init),
|
||||||
|
|
|
@ -240,6 +240,7 @@ gst_audioringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
|
||||||
{
|
{
|
||||||
GstAudioSink *sink;
|
GstAudioSink *sink;
|
||||||
GstAudioSinkClass *csink;
|
GstAudioSinkClass *csink;
|
||||||
|
GstAudioRingBuffer *abuf;
|
||||||
gboolean result = FALSE;
|
gboolean result = FALSE;
|
||||||
|
|
||||||
sink = GST_AUDIOSINK (GST_OBJECT_PARENT (buf));
|
sink = GST_AUDIOSINK (GST_OBJECT_PARENT (buf));
|
||||||
|
@ -257,6 +258,9 @@ gst_audioringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
|
||||||
buf->data = gst_buffer_new_and_alloc (spec->segtotal * spec->segsize);
|
buf->data = gst_buffer_new_and_alloc (spec->segtotal * spec->segsize);
|
||||||
memset (GST_BUFFER_DATA (buf->data), 0, GST_BUFFER_SIZE (buf->data));
|
memset (GST_BUFFER_DATA (buf->data), 0, GST_BUFFER_SIZE (buf->data));
|
||||||
|
|
||||||
|
abuf = GST_AUDIORINGBUFFER (buf);
|
||||||
|
abuf->running = TRUE;
|
||||||
|
|
||||||
sink->thread =
|
sink->thread =
|
||||||
g_thread_create ((GThreadFunc) audioringbuffer_thread_func, buf, TRUE,
|
g_thread_create ((GThreadFunc) audioringbuffer_thread_func, buf, TRUE,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -312,7 +312,11 @@ gst_decode_bin_init (GstDecodeBin * decode_bin)
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
||||||
/* add the typefind element */
|
/* add the typefind element */
|
||||||
gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind);
|
if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind)) {
|
||||||
|
g_warning ("Could not add typefind element, decodebin will not work");
|
||||||
|
gst_object_unref (GST_OBJECT (decode_bin->typefind));
|
||||||
|
decode_bin->typefind = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* get the sinkpad */
|
/* get the sinkpad */
|
||||||
pad = gst_element_get_pad (decode_bin->typefind, "sink");
|
pad = gst_element_get_pad (decode_bin->typefind, "sink");
|
||||||
|
|
Loading…
Reference in a new issue