From f405e12b4a7fe0ca2a0342977ce06746211deb6b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 21 Nov 2005 16:35:24 +0000 Subject: [PATCH] *.*: Ran scripts/update-macros. Oh yes. Original commit message from CVS: 2005-11-21 Andy Wingo * *.h: * *.c: Ran scripts/update-macros. Oh yes. --- ChangeLog | 5 +++ ext/ogg/gstoggdemux.c | 16 ++++---- ext/ogg/gstoggmux.c | 4 +- ext/theora/theoradec.c | 4 +- gst-libs/gst/audio/gstaudiosink.c | 12 +++--- gst-libs/gst/audio/gstaudiosrc.c | 12 +++--- gst-libs/gst/audio/gstringbuffer.c | 60 +++++++++++++++--------------- gst-libs/gst/audio/gstringbuffer.h | 2 +- gst/adder/gstadder.c | 4 +- gst/playback/gstdecodebin.c | 14 +++---- 10 files changed, 69 insertions(+), 64 deletions(-) diff --git a/ChangeLog b/ChangeLog index 55a0f33a2..3b2ae2426 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-21 Andy Wingo + + * *.h: + * *.c: Ran scripts/update-macros. Oh yes. + 2005-11-21 Tim-Philipp Müller * sys/ximage/Makefile.am: diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 9cbf503df..7ae7f308c 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -1505,7 +1505,7 @@ gst_ogg_demux_configure_segment (GstOggDemux * ogg, GstEvent * event, } /* store start and stop values */ - GST_LOCK (ogg); + GST_OBJECT_LOCK (ogg); ogg->segment_rate = rate; ogg->segment_flags = flags; ogg->segment_start = cur; @@ -1518,7 +1518,7 @@ gst_ogg_demux_configure_segment (GstOggDemux * ogg, GstEvent * event, /* check if we can do the seek now */ if (running) *running = ogg->running; - GST_UNLOCK (ogg); + GST_OBJECT_UNLOCK (ogg); return TRUE; @@ -1576,7 +1576,7 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg) * forever. */ GST_STREAM_LOCK (ogg->sinkpad); - GST_LOCK (ogg); + GST_OBJECT_LOCK (ogg); /* nothing configured, play complete file */ if (ogg->segment_start == GST_CLOCK_TIME_NONE) start = 0; @@ -1587,7 +1587,7 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg) stop = ogg->total_time; else stop = CLAMP (ogg->segment_stop, 0, ogg->total_time); - GST_UNLOCK (ogg); + GST_OBJECT_UNLOCK (ogg); /* we need to stop flushing on the srcpad as we're going to use it * next. We can do this as we have the STREAM lock now. */ @@ -2400,9 +2400,9 @@ gst_ogg_demux_loop (GstOggPad * pad) ogg->need_chains = FALSE; - GST_LOCK (ogg); + GST_OBJECT_LOCK (ogg); ogg->running = TRUE; - GST_UNLOCK (ogg); + GST_OBJECT_UNLOCK (ogg); /* and seek to configured positions without FLUSH */ gst_ogg_demux_perform_seek (ogg); @@ -2562,13 +2562,13 @@ gst_ogg_demux_change_state (GstElement * element, GstStateChange transition) break; case GST_STATE_CHANGE_PAUSED_TO_READY: gst_ogg_demux_clear_chains (ogg); - GST_LOCK (ogg); + GST_OBJECT_LOCK (ogg); ogg->running = FALSE; ogg->segment_rate = 1.0; ogg->segment_flags = GST_SEEK_FLAG_NONE; ogg->segment_start = GST_CLOCK_TIME_NONE; ogg->segment_stop = GST_CLOCK_TIME_NONE; - GST_UNLOCK (ogg); + GST_OBJECT_UNLOCK (ogg); break; case GST_STATE_CHANGE_READY_TO_NULL: ogg_sync_clear (&ogg->sync); diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index d6fd6bb44..7a7750249 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -867,10 +867,10 @@ gst_ogg_mux_send_headers (GstOggMux * mux) gst_buffer_ref (buf); } else { /* fixme -- should be caught in the previous list traversal. */ - GST_LOCK (pad); + GST_OBJECT_LOCK (pad); g_critical ("No headers or buffers on pad %s:%s", GST_DEBUG_PAD_NAME (pad)); - GST_UNLOCK (pad); + GST_OBJECT_UNLOCK (pad); continue; } diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index a52db1747..3b5259b30 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -579,11 +579,11 @@ theora_dec_src_getcaps (GstPad * pad) { GstCaps *caps; - GST_LOCK (pad); + GST_OBJECT_LOCK (pad); if (!(caps = GST_PAD_CAPS (pad))) caps = (GstCaps *) gst_pad_get_pad_template_caps (pad); caps = gst_caps_ref (caps); - GST_UNLOCK (pad); + GST_OBJECT_UNLOCK (pad); return caps; } diff --git a/gst-libs/gst/audio/gstaudiosink.c b/gst-libs/gst/audio/gstaudiosink.c index 513c69cbb..1fc3d502b 100644 --- a/gst-libs/gst/audio/gstaudiosink.c +++ b/gst-libs/gst/audio/gstaudiosink.c @@ -44,7 +44,7 @@ typedef struct _GstAudioRingBuffer GstAudioRingBuffer; typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass; #define GST_AUDIORING_BUFFER_GET_COND(buf) (((GstAudioRingBuffer *)buf)->cond) -#define GST_AUDIORING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORING_BUFFER_GET_COND (buf), GST_GET_LOCK (buf))) +#define GST_AUDIORING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf))) #define GST_AUDIORING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIORING_BUFFER_GET_COND (buf))) #define GST_AUDIORING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIORING_BUFFER_GET_COND (buf))) @@ -190,7 +190,7 @@ audioringbuffer_thread_func (GstRingBuffer * buf) /* we wrote one segment */ gst_ring_buffer_advance (buf, 1); } else { - GST_LOCK (abuf); + GST_OBJECT_LOCK (abuf); if (!abuf->running) goto stop_running; GST_DEBUG ("signal wait"); @@ -201,7 +201,7 @@ audioringbuffer_thread_func (GstRingBuffer * buf) if (!abuf->running) goto stop_running; GST_DEBUG ("continue running"); - GST_UNLOCK (abuf); + GST_OBJECT_UNLOCK (abuf); } } GST_DEBUG ("exit thread"); @@ -216,7 +216,7 @@ no_function: } stop_running: { - GST_UNLOCK (abuf); + GST_OBJECT_UNLOCK (abuf); GST_DEBUG ("stop running, exit thread"); return; } @@ -346,12 +346,12 @@ gst_audioringbuffer_release (GstRingBuffer * buf) abuf->running = FALSE; GST_AUDIORING_BUFFER_SIGNAL (buf); - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); /* join the thread */ g_thread_join (sink->thread); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); /* free the buffer */ gst_buffer_unref (buf->data); diff --git a/gst-libs/gst/audio/gstaudiosrc.c b/gst-libs/gst/audio/gstaudiosrc.c index 7e06aa80d..069a8bc21 100644 --- a/gst-libs/gst/audio/gstaudiosrc.c +++ b/gst-libs/gst/audio/gstaudiosrc.c @@ -44,7 +44,7 @@ typedef struct _GstAudioRingBuffer GstAudioRingBuffer; typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass; #define GST_AUDIORING_BUFFER_GET_COND(buf) (((GstAudioRingBuffer *)buf)->cond) -#define GST_AUDIORING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORING_BUFFER_GET_COND (buf), GST_GET_LOCK (buf))) +#define GST_AUDIORING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf))) #define GST_AUDIORING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIORING_BUFFER_GET_COND (buf))) #define GST_AUDIORING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIORING_BUFFER_GET_COND (buf))) @@ -186,7 +186,7 @@ audioringbuffer_thread_func (GstRingBuffer * buf) /* we read one segment */ gst_ring_buffer_advance (buf, 1); } else { - GST_LOCK (abuf); + GST_OBJECT_LOCK (abuf); if (!abuf->running) goto stop_running; GST_DEBUG ("signal wait"); @@ -197,7 +197,7 @@ audioringbuffer_thread_func (GstRingBuffer * buf) if (!abuf->running) goto stop_running; GST_DEBUG ("continue running"); - GST_UNLOCK (abuf); + GST_OBJECT_UNLOCK (abuf); } } GST_DEBUG ("exit thread"); @@ -212,7 +212,7 @@ no_function: } stop_running: { - GST_UNLOCK (abuf); + GST_OBJECT_UNLOCK (abuf); GST_DEBUG ("stop running, exit thread"); return; } @@ -342,12 +342,12 @@ gst_audioringbuffer_release (GstRingBuffer * buf) abuf->running = FALSE; GST_AUDIORING_BUFFER_SIGNAL (buf); - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); /* join the thread */ g_thread_join (src->thread); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); /* free the buffer */ gst_buffer_unref (buf->data); diff --git a/gst-libs/gst/audio/gstringbuffer.c b/gst-libs/gst/audio/gstringbuffer.c index 5083bda9d..2d3380a74 100644 --- a/gst-libs/gst/audio/gstringbuffer.c +++ b/gst-libs/gst/audio/gstringbuffer.c @@ -325,10 +325,10 @@ gst_ring_buffer_set_callback (GstRingBuffer * buf, GstRingBufferCallback cb, { g_return_if_fail (buf != NULL); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); buf->callback = cb; buf->cb_data = user_data; - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); } @@ -354,7 +354,7 @@ gst_ring_buffer_open_device (GstRingBuffer * buf) GST_DEBUG_OBJECT (buf, "opening device"); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); if (buf->open) { g_warning ("Device for ring buffer %p already open, fix your code", buf); res = TRUE; @@ -377,7 +377,7 @@ gst_ring_buffer_open_device (GstRingBuffer * buf) } done: - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; } @@ -403,7 +403,7 @@ gst_ring_buffer_close_device (GstRingBuffer * buf) GST_DEBUG_OBJECT (buf, "closing device"); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); if (!buf->open) { g_warning ("Device for ring buffer %p already closed, fix your code", buf); res = TRUE; @@ -430,7 +430,7 @@ gst_ring_buffer_close_device (GstRingBuffer * buf) } done: - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; } @@ -452,11 +452,11 @@ gst_ring_buffer_device_is_open (GstRingBuffer * buf) g_return_val_if_fail (GST_IS_RING_BUFFER (buf), FALSE); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); res = buf->open; - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; } @@ -485,7 +485,7 @@ gst_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec) GST_DEBUG_OBJECT (buf, "acquiring device"); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); if (!buf->open) { g_critical ("Device for %p not opened", buf); res = FALSE; @@ -527,7 +527,7 @@ gst_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec) } } done: - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; } @@ -554,7 +554,7 @@ gst_ring_buffer_release (GstRingBuffer * buf) gst_ring_buffer_stop (buf); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); if (!buf->acquired) { res = TRUE; GST_DEBUG_OBJECT (buf, "device was released"); @@ -582,7 +582,7 @@ gst_ring_buffer_release (GstRingBuffer * buf) } done: - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; } @@ -604,9 +604,9 @@ gst_ring_buffer_is_acquired (GstRingBuffer * buf) g_return_val_if_fail (buf != NULL, FALSE); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); res = buf->acquired; - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; } @@ -622,7 +622,7 @@ gst_ring_buffer_is_acquired (GstRingBuffer * buf) void gst_ring_buffer_set_flushing (GstRingBuffer * buf, gboolean flushing) { - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); buf->flushing = flushing; gst_ring_buffer_clear_all (buf); @@ -630,7 +630,7 @@ gst_ring_buffer_set_flushing (GstRingBuffer * buf, gboolean flushing) gst_ring_buffer_pause_unlocked (buf); } - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); } @@ -655,7 +655,7 @@ gst_ring_buffer_start (GstRingBuffer * buf) GST_DEBUG_OBJECT (buf, "starting ringbuffer"); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); if (buf->flushing) goto flushing; @@ -694,13 +694,13 @@ gst_ring_buffer_start (GstRingBuffer * buf) } done: - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; flushing: { - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return FALSE; } } @@ -759,19 +759,19 @@ gst_ring_buffer_pause (GstRingBuffer * buf) g_return_val_if_fail (buf != NULL, FALSE); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); if (buf->flushing) goto flushing; res = gst_ring_buffer_pause_unlocked (buf); - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; flushing: { - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return FALSE; } } @@ -796,7 +796,7 @@ gst_ring_buffer_stop (GstRingBuffer * buf) GST_DEBUG_OBJECT (buf, "stopping"); - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); /* if started, set to stopped */ res = g_atomic_int_compare_and_exchange (&buf->state, @@ -823,7 +823,7 @@ gst_ring_buffer_stop (GstRingBuffer * buf) GST_DEBUG_OBJECT (buf, "stopped"); } done: - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return res; } @@ -969,7 +969,7 @@ wait_segment (GstRingBuffer * buf) } /* take lock first, then update our waiting flag */ - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); if (buf->flushing) goto flushing; @@ -985,20 +985,20 @@ wait_segment (GstRingBuffer * buf) if (g_atomic_int_get (&buf->state) != GST_RING_BUFFER_STATE_STARTED) goto not_started; } - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); return TRUE; /* ERROR */ not_started: { - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); GST_DEBUG ("stopped processing"); return FALSE; } flushing: { - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); GST_DEBUG ("flushing"); return FALSE; } @@ -1286,10 +1286,10 @@ gst_ring_buffer_advance (GstRingBuffer * buf, guint advance) * we grab the lock as well to make sure the waiter is actually * waiting for the signal */ if (g_atomic_int_compare_and_exchange (&buf->waiting, 1, 0)) { - GST_LOCK (buf); + GST_OBJECT_LOCK (buf); GST_DEBUG ("signal waiter"); GST_RING_BUFFER_SIGNAL (buf); - GST_UNLOCK (buf); + GST_OBJECT_UNLOCK (buf); } } diff --git a/gst-libs/gst/audio/gstringbuffer.h b/gst-libs/gst/audio/gstringbuffer.h index 9e9211008..00699fb3b 100644 --- a/gst-libs/gst/audio/gstringbuffer.h +++ b/gst-libs/gst/audio/gstringbuffer.h @@ -145,7 +145,7 @@ struct _GstRingBufferSpec }; #define GST_RING_BUFFER_GET_COND(buf) (((GstRingBuffer *)buf)->cond) -#define GST_RING_BUFFER_WAIT(buf) (g_cond_wait (GST_RING_BUFFER_GET_COND (buf), GST_GET_LOCK (buf))) +#define GST_RING_BUFFER_WAIT(buf) (g_cond_wait (GST_RING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf))) #define GST_RING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_RING_BUFFER_GET_COND (buf))) #define GST_RING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_RING_BUFFER_GET_COND (buf))) diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index b412a0b49..58ee202cc 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -132,7 +132,7 @@ MAKE_FUNC (add_int32, gint32, gint64, MIN_INT_32, MAX_INT_32) adder = GST_ADDER (GST_PAD_PARENT (pad)); /* see if the other pads can accept the format */ - GST_LOCK (adder); + GST_OBJECT_LOCK (adder); pads = GST_ELEMENT (adder)->pads; while (pads) { GstPad *otherpad = GST_PAD (pads->data); @@ -142,7 +142,7 @@ MAKE_FUNC (add_int32, gint32, gint64, MIN_INT_32, MAX_INT_32) } pads = g_list_next (pads); } - GST_UNLOCK (adder); + GST_OBJECT_UNLOCK (adder); /* parse caps now */ structure = gst_caps_get_structure (caps, 0); diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index ca925db5b..d35ef0a21 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -856,10 +856,10 @@ new_pad (GstElement * element, GstPad * pad, GstDynamic * dynamic) GstDecodeBin *decode_bin = dynamic->decode_bin; GstCaps *caps; - GST_LOCK (decode_bin); + GST_OBJECT_LOCK (decode_bin); if (decode_bin->shutting_down) goto shutting_down1; - GST_UNLOCK (decode_bin); + GST_OBJECT_UNLOCK (decode_bin); GST_STATE_LOCK (decode_bin); if (decode_bin->shutting_down) @@ -877,7 +877,7 @@ new_pad (GstElement * element, GstPad * pad, GstDynamic * dynamic) return; shutting_down1: - GST_UNLOCK (decode_bin); + GST_OBJECT_UNLOCK (decode_bin); return; shutting_down2: @@ -1173,17 +1173,17 @@ gst_decode_bin_change_state (GstElement * element, GstStateChange transition) decode_bin->dynamics = NULL; break; case GST_STATE_CHANGE_READY_TO_PAUSED: - GST_LOCK (decode_bin); + GST_OBJECT_LOCK (decode_bin); decode_bin->shutting_down = FALSE; - GST_UNLOCK (decode_bin); + GST_OBJECT_UNLOCK (decode_bin); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: case GST_STATE_CHANGE_PLAYING_TO_PAUSED: break; case GST_STATE_CHANGE_PAUSED_TO_READY: - GST_LOCK (decode_bin); + GST_OBJECT_LOCK (decode_bin); decode_bin->shutting_down = TRUE; - GST_UNLOCK (decode_bin); + GST_OBJECT_UNLOCK (decode_bin); break; default: break; -- 2.34.1