gst-libs/gst/audio/gstringbuffer.*: Sun's Forte compiler doesn't seem to like anonymous structs, so use same setup as...

Original commit message from CVS:
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_init),
(gst_ring_buffer_set_flushing), (gst_ring_buffer_start),
(gst_ring_buffer_pause), (wait_segment):
* gst-libs/gst/audio/gstringbuffer.h:
Sun's Forte compiler doesn't seem to like anonymous structs,
so use same setup as in GstBaseSrc (fixes #324900).
This commit is contained in:
Tim-Philipp Müller 2006-01-02 23:37:38 +00:00
parent f2092fc757
commit be8f055317
3 changed files with 16 additions and 7 deletions

View file

@ -1,3 +1,12 @@
2006-01-02 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_init),
(gst_ring_buffer_set_flushing), (gst_ring_buffer_start),
(gst_ring_buffer_pause), (wait_segment):
* gst-libs/gst/audio/gstringbuffer.h:
Sun's Forte compiler doesn't seem to like anonymous structs,
so use same setup as in GstBaseSrc (fixes #324900).
2005-12-30 Stefan Kost <ensonic@users.sf.net> 2005-12-30 Stefan Kost <ensonic@users.sf.net>
* configure.ac: * configure.ac:

View file

@ -97,7 +97,7 @@ gst_ring_buffer_init (GstRingBuffer * ringbuffer)
ringbuffer->cond = g_cond_new (); ringbuffer->cond = g_cond_new ();
ringbuffer->waiting = 0; ringbuffer->waiting = 0;
ringbuffer->empty_seg = NULL; ringbuffer->empty_seg = NULL;
ringbuffer->flushing = TRUE; ringbuffer->ABI.flushing = TRUE;
} }
static void static void
@ -710,7 +710,7 @@ void
gst_ring_buffer_set_flushing (GstRingBuffer * buf, gboolean flushing) gst_ring_buffer_set_flushing (GstRingBuffer * buf, gboolean flushing)
{ {
GST_OBJECT_LOCK (buf); GST_OBJECT_LOCK (buf);
buf->flushing = flushing; buf->ABI.flushing = flushing;
gst_ring_buffer_clear_all (buf); gst_ring_buffer_clear_all (buf);
if (flushing) { if (flushing) {
@ -743,7 +743,7 @@ gst_ring_buffer_start (GstRingBuffer * buf)
GST_DEBUG_OBJECT (buf, "starting ringbuffer"); GST_DEBUG_OBJECT (buf, "starting ringbuffer");
GST_OBJECT_LOCK (buf); GST_OBJECT_LOCK (buf);
if (buf->flushing) if (buf->ABI.flushing)
goto flushing; goto flushing;
/* if stopped, set to started */ /* if stopped, set to started */
@ -847,7 +847,7 @@ gst_ring_buffer_pause (GstRingBuffer * buf)
g_return_val_if_fail (buf != NULL, FALSE); g_return_val_if_fail (buf != NULL, FALSE);
GST_OBJECT_LOCK (buf); GST_OBJECT_LOCK (buf);
if (buf->flushing) if (buf->ABI.flushing)
goto flushing; goto flushing;
res = gst_ring_buffer_pause_unlocked (buf); res = gst_ring_buffer_pause_unlocked (buf);
@ -1058,7 +1058,7 @@ wait_segment (GstRingBuffer * buf)
/* take lock first, then update our waiting flag */ /* take lock first, then update our waiting flag */
GST_OBJECT_LOCK (buf); GST_OBJECT_LOCK (buf);
if (buf->flushing) if (buf->ABI.flushing)
goto flushing; goto flushing;
if (g_atomic_int_compare_and_exchange (&buf->waiting, 0, 1)) { if (g_atomic_int_compare_and_exchange (&buf->waiting, 0, 1)) {
@ -1067,7 +1067,7 @@ wait_segment (GstRingBuffer * buf)
goto not_started; goto not_started;
GST_RING_BUFFER_WAIT (buf); GST_RING_BUFFER_WAIT (buf);
if (buf->flushing) if (buf->ABI.flushing)
goto flushing; goto flushing;
if (g_atomic_int_get (&buf->state) != GST_RING_BUFFER_STATE_STARTED) if (g_atomic_int_get (&buf->state) != GST_RING_BUFFER_STATE_STARTED)

View file

@ -226,7 +226,7 @@ struct _GstRingBuffer {
union { union {
struct { struct {
gboolean flushing; gboolean flushing;
}; } ABI;
/* adding + 0 to mark ABI change to be undone later */ /* adding + 0 to mark ABI change to be undone later */
gpointer _gst_reserved[GST_PADDING + 0]; gpointer _gst_reserved[GST_PADDING + 0];
}; };