From 43bc15fa94f9ec545ec140bf6c39e71f575e2ebe Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 12 Oct 2005 14:32:29 +0000 Subject: [PATCH] renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition Original commit message from CVS: * examples/indexing/indexmpeg.c: (main): * ext/cdparanoia/gstcdparanoia.c: (cdparanoia_get), (cdparanoia_open), (cdparanoia_close), (cdparanoia_event), (cdparanoia_convert), (cdparanoia_query): * ext/cdparanoia/gstcdparanoia.h: * ext/gnomevfs/gstgnomevfssink.c: (gst_gnomevfssink_init), (gst_gnomevfssink_open_file), (gst_gnomevfssink_close_file), (gst_gnomevfssink_chain), (gst_gnomevfssink_change_state): * ext/ogg/gstoggmux.c: (gst_ogg_mux_init): * gst/audioscale/gstaudioscale.c: (gst_audioscale_init): * gst/playback/gststreamselector.c: (gst_stream_selector_init): * gst/tcp/gstmultifdsink.c: (gst_multifdsink_init), (gst_multifdsink_render), (gst_multifdsink_start), (gst_multifdsink_stop): * gst/tcp/gstmultifdsink.h: * gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_init), (gst_tcpclientsink_render), (gst_tcpclientsink_start), (gst_tcpclientsink_stop): * gst/tcp/gsttcpclientsink.h: * gst/tcp/gsttcpclientsrc.c: (gst_tcpclientsrc_init), (gst_tcpclientsrc_getcaps), (gst_tcpclientsrc_create), (gst_tcpclientsrc_start), (gst_tcpclientsrc_stop): * gst/tcp/gsttcpclientsrc.h: * gst/tcp/gsttcpserversink.h: * gst/tcp/gsttcpserversrc.c: (gst_tcpserversrc_init), (gst_tcpserversrc_create), (gst_tcpserversrc_start), (gst_tcpserversrc_stop): * gst/tcp/gsttcpserversrc.h: * sys/v4l/gstv4lmjpegsink.c: (gst_v4lmjpegsink_init): * sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_init): * sys/ximage/ximagesink.c: (gst_ximagesink_init): renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition --- ChangeLog | 36 +++++++++++++++++++++++++++++++++ examples/indexing/indexmpeg.c | 2 +- ext/cdparanoia/gstcdparanoia.c | 16 +++++++-------- ext/cdparanoia/gstcdparanoia.h | 4 ++-- ext/gnomevfs/gstgnomevfssink.c | 17 ++++++++-------- ext/ogg/gstoggmux.c | 2 +- gst/audioscale/gstaudioscale.c | 2 +- gst/playback/gststreamselector.c | 2 +- gst/tcp/gstmultifdsink.c | 12 +++++------ gst/tcp/gstmultifdsink.h | 4 ++-- gst/tcp/gsttcpclientsink.c | 12 +++++------ gst/tcp/gsttcpclientsink.h | 4 ++-- gst/tcp/gsttcpclientsrc.c | 10 ++++----- gst/tcp/gsttcpclientsrc.h | 4 ++-- gst/tcp/gsttcpserversink.h | 4 ++-- gst/tcp/gsttcpserversrc.c | 8 ++++---- gst/tcp/gsttcpserversrc.h | 4 ++-- sys/v4l/gstv4lmjpegsink.c | 2 +- sys/v4l/gstv4lmjpegsrc.c | 2 +- sys/ximage/ximagesink.c | 4 ++-- tests/old/examples/indexing/indexmpeg.c | 2 +- 21 files changed, 95 insertions(+), 58 deletions(-) diff --git a/ChangeLog b/ChangeLog index 056b202..e013677 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,39 @@ +2005-10-12 Stefan Kost + + * examples/indexing/indexmpeg.c: (main): + * ext/cdparanoia/gstcdparanoia.c: (cdparanoia_get), + (cdparanoia_open), (cdparanoia_close), (cdparanoia_event), + (cdparanoia_convert), (cdparanoia_query): + * ext/cdparanoia/gstcdparanoia.h: + * ext/gnomevfs/gstgnomevfssink.c: (gst_gnomevfssink_init), + (gst_gnomevfssink_open_file), (gst_gnomevfssink_close_file), + (gst_gnomevfssink_chain), (gst_gnomevfssink_change_state): + * ext/ogg/gstoggmux.c: (gst_ogg_mux_init): + * gst/audioscale/gstaudioscale.c: (gst_audioscale_init): + * gst/playback/gststreamselector.c: (gst_stream_selector_init): + * gst/tcp/gstmultifdsink.c: (gst_multifdsink_init), + (gst_multifdsink_render), (gst_multifdsink_start), + (gst_multifdsink_stop): + * gst/tcp/gstmultifdsink.h: + * gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_init), + (gst_tcpclientsink_render), (gst_tcpclientsink_start), + (gst_tcpclientsink_stop): + * gst/tcp/gsttcpclientsink.h: + * gst/tcp/gsttcpclientsrc.c: (gst_tcpclientsrc_init), + (gst_tcpclientsrc_getcaps), (gst_tcpclientsrc_create), + (gst_tcpclientsrc_start), (gst_tcpclientsrc_stop): + * gst/tcp/gsttcpclientsrc.h: + * gst/tcp/gsttcpserversink.h: + * gst/tcp/gsttcpserversrc.c: (gst_tcpserversrc_init), + (gst_tcpserversrc_create), (gst_tcpserversrc_start), + (gst_tcpserversrc_stop): + * gst/tcp/gsttcpserversrc.h: + * sys/v4l/gstv4lmjpegsink.c: (gst_v4lmjpegsink_init): + * sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_init): + * sys/ximage/ximagesink.c: (gst_ximagesink_init): + renamed GST_FLAGS macros to GST_OBJECT_FLAGS + moved bitshift from macro to enum definition + 2005-10-12 Wim Taymans * examples/seeking/Makefile.am: diff --git a/examples/indexing/indexmpeg.c b/examples/indexing/indexmpeg.c index 3b690af..a670ad8 100644 --- a/examples/indexing/indexmpeg.c +++ b/examples/indexing/indexmpeg.c @@ -272,7 +272,7 @@ main (gint argc, gchar * argv[]) gst_element_set_state (pipeline, GST_STATE_PAUSED); if (index) - GST_FLAG_UNSET (index, GST_INDEX_WRITABLE); + GST_OBJECT_FLAG_UNSET (index, GST_INDEX_WRITABLE); src = gst_bin_get_by_name (GST_BIN (pipeline), "video_decoder"); diff --git a/ext/cdparanoia/gstcdparanoia.c b/ext/cdparanoia/gstcdparanoia.c index 19065b5..81f242e 100644 --- a/ext/cdparanoia/gstcdparanoia.c +++ b/ext/cdparanoia/gstcdparanoia.c @@ -477,7 +477,7 @@ cdparanoia_get (GstPad * pad) src = CDPARANOIA (gst_pad_get_parent (pad)); - g_return_val_if_fail (GST_FLAG_IS_SET (src, CDPARANOIA_OPEN), NULL); + g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (src, CDPARANOIA_OPEN), NULL); if (src->seek_request != -1) { gst_pad_send_event (src->srcpad, @@ -662,7 +662,7 @@ cdparanoia_open (CDParanoia * src) gint i; gint paranoia_mode; - g_return_val_if_fail (!GST_FLAG_IS_SET (src, CDPARANOIA_OPEN), FALSE); + g_return_val_if_fail (!GST_OBJECT_FLAG_IS_SET (src, CDPARANOIA_OPEN), FALSE); GST_DEBUG_OBJECT (src, "trying to open device..."); @@ -759,7 +759,7 @@ cdparanoia_open (CDParanoia * src) paranoia_seek (src->p, src->cur_sector, SEEK_SET); GST_DEBUG ("successfully seek'd to beginning of disk"); - GST_FLAG_SET (src, CDPARANOIA_OPEN); + GST_OBJECT_FLAG_SET (src, CDPARANOIA_OPEN); if (src->index && GST_INDEX_IS_WRITABLE (src->index)) { add_index_associations (src); @@ -774,7 +774,7 @@ cdparanoia_open (CDParanoia * src) static void cdparanoia_close (CDParanoia * src) { - g_return_if_fail (GST_FLAG_IS_SET (src, CDPARANOIA_OPEN)); + g_return_if_fail (GST_OBJECT_FLAG_IS_SET (src, CDPARANOIA_OPEN)); /* kill the paranoia state */ paranoia_free (src->p); @@ -785,7 +785,7 @@ cdparanoia_close (CDParanoia * src) cdda_close (src->d); src->d = NULL; - GST_FLAG_UNSET (src, CDPARANOIA_OPEN); + GST_OBJECT_FLAG_UNSET (src, CDPARANOIA_OPEN); } static GstStateChangeReturn @@ -853,7 +853,7 @@ cdparanoia_event (GstPad * pad, GstEvent * event) src = CDPARANOIA (gst_pad_get_parent (pad)); - if (!GST_FLAG_IS_SET (src, CDPARANOIA_OPEN)) { + if (!GST_OBJECT_FLAG_IS_SET (src, CDPARANOIA_OPEN)) { GST_DEBUG ("device not open, cannot handle event"); goto error; } @@ -974,7 +974,7 @@ cdparanoia_convert (GstPad * pad, src = CDPARANOIA (gst_pad_get_parent (pad)); - if (!GST_FLAG_IS_SET (src, CDPARANOIA_OPEN)) { + if (!GST_OBJECT_FLAG_IS_SET (src, CDPARANOIA_OPEN)) { return FALSE; } @@ -1095,7 +1095,7 @@ cdparanoia_query (GstPad * pad, GstQueryType type, src = CDPARANOIA (gst_pad_get_parent (pad)); - if (!GST_FLAG_IS_SET (src, CDPARANOIA_OPEN)) { + if (!GST_OBJECT_FLAG_IS_SET (src, CDPARANOIA_OPEN)) { return FALSE; } diff --git a/ext/cdparanoia/gstcdparanoia.h b/ext/cdparanoia/gstcdparanoia.h index d862002..e3c16e1 100644 --- a/ext/cdparanoia/gstcdparanoia.h +++ b/ext/cdparanoia/gstcdparanoia.h @@ -58,9 +58,9 @@ extern "C" { /* NOTE: per-element flags start with 16 for now */ typedef enum { - CDPARANOIA_OPEN = GST_ELEMENT_FLAG_LAST, + CDPARANOIA_OPEN = (GST_ELEMENT_FLAG_LAST << 0), - CDPARANOIA_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2, + CDPARANOIA_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2), } CDParanoiaFlags; typedef struct _CDParanoia CDParanoia; diff --git a/ext/gnomevfs/gstgnomevfssink.c b/ext/gnomevfs/gstgnomevfssink.c index 4900eff..fb1a3e1 100644 --- a/ext/gnomevfs/gstgnomevfssink.c +++ b/ext/gnomevfs/gstgnomevfssink.c @@ -244,7 +244,7 @@ gst_gnomevfssink_init (GstGnomeVFSSink * gnomevfssink) { GstPad *pad; - GST_FLAG_SET (gnomevfssink, GST_ELEMENT_EVENT_AWARE); + GST_OBJECT_FLAG_SET (gnomevfssink, GST_ELEMENT_EVENT_AWARE); pad = gst_pad_new ("sink", GST_PAD_SINK); gst_element_add_pad (GST_ELEMENT (gnomevfssink), pad); @@ -399,7 +399,8 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink * sink) { GnomeVFSResult result; - g_return_val_if_fail (!GST_FLAG_IS_SET (sink, GST_GNOMEVFSSINK_OPEN), FALSE); + g_return_val_if_fail (!GST_OBJECT_FLAG_IS_SET (sink, GST_GNOMEVFSSINK_OPEN), + FALSE); if (sink->uri) { /* open the file */ @@ -441,7 +442,7 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink * sink) sink->own_handle = FALSE; } - GST_FLAG_SET (sink, GST_GNOMEVFSSINK_OPEN); + GST_OBJECT_FLAG_SET (sink, GST_GNOMEVFSSINK_OPEN); return TRUE; } @@ -451,7 +452,7 @@ gst_gnomevfssink_close_file (GstGnomeVFSSink * sink) { GnomeVFSResult result; - g_return_if_fail (GST_FLAG_IS_SET (sink, GST_GNOMEVFSSINK_OPEN)); + g_return_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_GNOMEVFSSINK_OPEN)); if (sink->own_handle) { /* close the file */ @@ -470,7 +471,7 @@ gst_gnomevfssink_close_file (GstGnomeVFSSink * sink) sink->handle = NULL; } - GST_FLAG_UNSET (sink, GST_GNOMEVFSSINK_OPEN); + GST_OBJECT_FLAG_UNSET (sink, GST_GNOMEVFSSINK_OPEN); } /** @@ -594,7 +595,7 @@ gst_gnomevfssink_chain (GstPad * pad, GstData * _data) sink = GST_GNOMEVFSSINK (gst_pad_get_parent (pad)); - if (GST_FLAG_IS_SET (sink, GST_GNOMEVFSSINK_OPEN)) { + if (GST_OBJECT_FLAG_IS_SET (sink, GST_GNOMEVFSSINK_OPEN)) { if (GST_IS_EVENT (_data)) { gst_gnomevfssink_handle_event (sink, GST_EVENT (_data)); return; @@ -624,13 +625,13 @@ gst_gnomevfssink_change_state (GstElement * element, GstStateChange transition) switch (transition) { case GST_STATE_CHANGE_READY_TO_PAUSED: - if (!GST_FLAG_IS_SET (element, GST_GNOMEVFSSINK_OPEN)) { + if (!GST_OBJECT_FLAG_IS_SET (element, GST_GNOMEVFSSINK_OPEN)) { if (!gst_gnomevfssink_open_file (GST_GNOMEVFSSINK (element))) return GST_STATE_CHANGE_FAILURE; } break; case GST_STATE_CHANGE_PAUSED_TO_READY: - if (GST_FLAG_IS_SET (element, GST_GNOMEVFSSINK_OPEN)) + if (GST_OBJECT_FLAG_IS_SET (element, GST_GNOMEVFSSINK_OPEN)) gst_gnomevfssink_close_file (GST_GNOMEVFSSINK (element)); break; default: diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 9d5894b..63e5628 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -266,7 +266,7 @@ gst_ogg_mux_init (GstOggMux * ogg_mux) gst_pad_set_event_function (ogg_mux->srcpad, gst_ogg_mux_handle_src_event); gst_element_add_pad (GST_ELEMENT (ogg_mux), ogg_mux->srcpad); - GST_FLAG_SET (GST_ELEMENT (ogg_mux), GST_OGG_FLAG_BOS); + GST_OBJECT_FLAG_SET (GST_ELEMENT (ogg_mux), GST_OGG_FLAG_BOS); /* seed random number generator for creation of serial numbers */ srand (time (NULL)); diff --git a/gst/audioscale/gstaudioscale.c b/gst/audioscale/gstaudioscale.c index 8c25d30..0377b74 100644 --- a/gst/audioscale/gstaudioscale.c +++ b/gst/audioscale/gstaudioscale.c @@ -519,7 +519,7 @@ gst_audioscale_init (Audioscale * audioscale) audioscale->gst_resample_offset = 0; audioscale->increase = FALSE; - GST_FLAG_SET (audioscale, GST_ELEMENT_EVENT_AWARE); + GST_OBJECT_FLAG_SET (audioscale, GST_ELEMENT_EVENT_AWARE); } static void diff --git a/gst/playback/gststreamselector.c b/gst/playback/gststreamselector.c index d2ca7b0..23db80c 100644 --- a/gst/playback/gststreamselector.c +++ b/gst/playback/gststreamselector.c @@ -140,7 +140,7 @@ gst_stream_selector_init (GstStreamSelector * sel) sel->last_active_sinkpad = NULL; sel->nb_sinkpads = 0; - //GST_FLAG_SET (sel, GST_ELEMENT_WORK_IN_PLACE); + //GST_OBJECT_FLAG_SET (sel, GST_ELEMENT_WORK_IN_PLACE); } static void diff --git a/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c index 650357a..bd81b53 100644 --- a/gst/tcp/gstmultifdsink.c +++ b/gst/tcp/gstmultifdsink.c @@ -446,7 +446,7 @@ gst_multifdsink_class_init (GstMultiFdSinkClass * klass) static void gst_multifdsink_init (GstMultiFdSink * this) { - GST_FLAG_UNSET (this, GST_MULTIFDSINK_OPEN); + GST_OBJECT_FLAG_UNSET (this, GST_MULTIFDSINK_OPEN); this->protocol = DEFAULT_PROTOCOL; this->mode = DEFAULT_MODE; @@ -1523,7 +1523,7 @@ gst_multifdsink_render (GstBaseSink * bsink, GstBuffer * buf) /* since we keep this buffer out of the scope of this method */ gst_buffer_ref (buf); - g_return_val_if_fail (GST_FLAG_IS_SET (sink, GST_MULTIFDSINK_OPEN), + g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_MULTIFDSINK_OPEN), GST_FLOW_ERROR); GST_LOG_OBJECT (sink, "received buffer %p", buf); @@ -1691,7 +1691,7 @@ gst_multifdsink_start (GstBaseSink * bsink) int control_socket[2]; GstMultiFdSink *this; - if (GST_FLAG_IS_SET (bsink, GST_MULTIFDSINK_OPEN)) + if (GST_OBJECT_FLAG_IS_SET (bsink, GST_MULTIFDSINK_OPEN)) return TRUE; this = GST_MULTIFDSINK (bsink); @@ -1724,7 +1724,7 @@ gst_multifdsink_start (GstBaseSink * bsink) this->thread = g_thread_create ((GThreadFunc) gst_multifdsink_thread, this, TRUE, NULL); - GST_FLAG_SET (this, GST_MULTIFDSINK_OPEN); + GST_OBJECT_FLAG_SET (this, GST_MULTIFDSINK_OPEN); return TRUE; @@ -1752,7 +1752,7 @@ gst_multifdsink_stop (GstBaseSink * bsink) this = GST_MULTIFDSINK (bsink); fclass = GST_MULTIFDSINK_GET_CLASS (this); - if (!GST_FLAG_IS_SET (bsink, GST_MULTIFDSINK_OPEN)) + if (!GST_OBJECT_FLAG_IS_SET (bsink, GST_MULTIFDSINK_OPEN)) return TRUE; this->running = FALSE; @@ -1784,7 +1784,7 @@ gst_multifdsink_stop (GstBaseSink * bsink) this->fdset = NULL; } g_hash_table_foreach_remove (this->fd_hash, multifdsink_hash_remove, this); - GST_FLAG_UNSET (this, GST_MULTIFDSINK_OPEN); + GST_OBJECT_FLAG_UNSET (this, GST_MULTIFDSINK_OPEN); return TRUE; } diff --git a/gst/tcp/gstmultifdsink.h b/gst/tcp/gstmultifdsink.h index a672e3b..ae33b6a 100644 --- a/gst/tcp/gstmultifdsink.h +++ b/gst/tcp/gstmultifdsink.h @@ -48,9 +48,9 @@ typedef struct _GstMultiFdSink GstMultiFdSink; typedef struct _GstMultiFdSinkClass GstMultiFdSinkClass; typedef enum { - GST_MULTIFDSINK_OPEN = GST_ELEMENT_FLAG_LAST, + GST_MULTIFDSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0), - GST_MULTIFDSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, + GST_MULTIFDSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2), } GstMultiFdSinkFlags; typedef enum diff --git a/gst/tcp/gsttcpclientsink.c b/gst/tcp/gsttcpclientsink.c index 05641dc..7a08916 100644 --- a/gst/tcp/gsttcpclientsink.c +++ b/gst/tcp/gsttcpclientsink.c @@ -160,7 +160,7 @@ gst_tcpclientsink_init (GstTCPClientSink * this) this->sock_fd = -1; this->protocol = GST_TCP_PROTOCOL_NONE; - GST_FLAG_UNSET (this, GST_TCPCLIENTSINK_OPEN); + GST_OBJECT_FLAG_UNSET (this, GST_TCPCLIENTSINK_OPEN); } static void @@ -224,7 +224,7 @@ gst_tcpclientsink_render (GstBaseSink * bsink, GstBuffer * buf) sink = GST_TCPCLIENTSINK (bsink); - g_return_val_if_fail (GST_FLAG_IS_SET (sink, GST_TCPCLIENTSINK_OPEN), + g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_TCPCLIENTSINK_OPEN), GST_FLOW_WRONG_STATE); size = GST_BUFFER_SIZE (buf); @@ -335,7 +335,7 @@ gst_tcpclientsink_start (GstTCPClientSink * this) int ret; gchar *ip; - if (GST_FLAG_IS_SET (this, GST_TCPCLIENTSINK_OPEN)) + if (GST_OBJECT_FLAG_IS_SET (this, GST_TCPCLIENTSINK_OPEN)) return TRUE; /* reset caps_sent flag */ @@ -388,7 +388,7 @@ gst_tcpclientsink_start (GstTCPClientSink * this) } } - GST_FLAG_SET (this, GST_TCPCLIENTSINK_OPEN); + GST_OBJECT_FLAG_SET (this, GST_TCPCLIENTSINK_OPEN); this->data_written = 0; @@ -398,7 +398,7 @@ gst_tcpclientsink_start (GstTCPClientSink * this) static gboolean gst_tcpclientsink_stop (GstTCPClientSink * this) { - if (!GST_FLAG_IS_SET (this, GST_TCPCLIENTSINK_OPEN)) + if (!GST_OBJECT_FLAG_IS_SET (this, GST_TCPCLIENTSINK_OPEN)) return TRUE; if (this->sock_fd != -1) { @@ -406,7 +406,7 @@ gst_tcpclientsink_stop (GstTCPClientSink * this) this->sock_fd = -1; } - GST_FLAG_UNSET (this, GST_TCPCLIENTSINK_OPEN); + GST_OBJECT_FLAG_UNSET (this, GST_TCPCLIENTSINK_OPEN); return TRUE; } diff --git a/gst/tcp/gsttcpclientsink.h b/gst/tcp/gsttcpclientsink.h index 0b3991e..69f7e24 100644 --- a/gst/tcp/gsttcpclientsink.h +++ b/gst/tcp/gsttcpclientsink.h @@ -59,9 +59,9 @@ typedef struct _GstTCPClientSink GstTCPClientSink; typedef struct _GstTCPClientSinkClass GstTCPClientSinkClass; typedef enum { - GST_TCPCLIENTSINK_OPEN = GST_ELEMENT_FLAG_LAST, + GST_TCPCLIENTSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0), - GST_TCPCLIENTSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, + GST_TCPCLIENTSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2), } GstTCPClientSinkFlags; struct _GstTCPClientSink { diff --git a/gst/tcp/gsttcpclientsrc.c b/gst/tcp/gsttcpclientsrc.c index 90f5852..27f0bc0 100644 --- a/gst/tcp/gsttcpclientsrc.c +++ b/gst/tcp/gsttcpclientsrc.c @@ -160,7 +160,7 @@ gst_tcpclientsrc_init (GstTCPClientSrc * this, GstTCPClientSrcClass * g_class) gst_base_src_set_live (GST_BASE_SRC (this), TRUE); - GST_FLAG_UNSET (this, GST_TCPCLIENTSRC_OPEN); + GST_OBJECT_FLAG_UNSET (this, GST_TCPCLIENTSRC_OPEN); } static void @@ -179,7 +179,7 @@ gst_tcpclientsrc_getcaps (GstBaseSrc * bsrc) src = GST_TCPCLIENTSRC (bsrc); - if (!GST_FLAG_IS_SET (src, GST_TCPCLIENTSRC_OPEN)) + if (!GST_OBJECT_FLAG_IS_SET (src, GST_TCPCLIENTSRC_OPEN)) caps = gst_caps_new_any (); else if (src->caps) caps = gst_caps_copy (src->caps); @@ -198,7 +198,7 @@ gst_tcpclientsrc_create (GstPushSrc * psrc, GstBuffer ** outbuf) src = GST_TCPCLIENTSRC (psrc); - if (!GST_FLAG_IS_SET (src, GST_TCPCLIENTSRC_OPEN)) + if (!GST_OBJECT_FLAG_IS_SET (src, GST_TCPCLIENTSRC_OPEN)) goto wrong_state; GST_LOG_OBJECT (src, "asked for a buffer"); @@ -338,7 +338,7 @@ gst_tcpclientsrc_start (GstBaseSrc * bsrc) GST_DEBUG_OBJECT (src, "opened receiving client socket with fd %d", src->sock_fd); - GST_FLAG_SET (src, GST_TCPCLIENTSRC_OPEN); + GST_OBJECT_FLAG_SET (src, GST_TCPCLIENTSRC_OPEN); /* look up name if we need to */ if (!(ip = gst_tcp_host_to_ip (GST_ELEMENT (src), src->host))) @@ -414,7 +414,7 @@ gst_tcpclientsrc_stop (GstBaseSrc * bsrc) gst_caps_unref (src->caps); src->caps = NULL; } - GST_FLAG_UNSET (src, GST_TCPCLIENTSRC_OPEN); + GST_OBJECT_FLAG_UNSET (src, GST_TCPCLIENTSRC_OPEN); close (READ_SOCKET (src)); close (WRITE_SOCKET (src)); diff --git a/gst/tcp/gsttcpclientsrc.h b/gst/tcp/gsttcpclientsrc.h index a871385..8972cfb 100644 --- a/gst/tcp/gsttcpclientsrc.h +++ b/gst/tcp/gsttcpclientsrc.h @@ -50,9 +50,9 @@ typedef struct _GstTCPClientSrc GstTCPClientSrc; typedef struct _GstTCPClientSrcClass GstTCPClientSrcClass; typedef enum { - GST_TCPCLIENTSRC_OPEN = GST_ELEMENT_FLAG_LAST, + GST_TCPCLIENTSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0), - GST_TCPCLIENTSRC_FLAG_LAST, + GST_TCPCLIENTSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) } GstTCPClientSrcFlags; struct _GstTCPClientSrc { diff --git a/gst/tcp/gsttcpserversink.h b/gst/tcp/gsttcpserversink.h index c4d98fa..03e6c7d 100644 --- a/gst/tcp/gsttcpserversink.h +++ b/gst/tcp/gsttcpserversink.h @@ -57,9 +57,9 @@ typedef struct _GstTCPServerSink GstTCPServerSink; typedef struct _GstTCPServerSinkClass GstTCPServerSinkClass; typedef enum { - GST_TCPSERVERSINK_OPEN = GST_ELEMENT_FLAG_LAST, + GST_TCPSERVERSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0), - GST_TCPSERVERSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, + GST_TCPSERVERSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) } GstTCPServerSinkFlags; struct _GstTCPServerSink { diff --git a/gst/tcp/gsttcpserversrc.c b/gst/tcp/gsttcpserversrc.c index 5bfab2f..d8627f1 100644 --- a/gst/tcp/gsttcpserversrc.c +++ b/gst/tcp/gsttcpserversrc.c @@ -154,7 +154,7 @@ gst_tcpserversrc_init (GstTCPServerSrc * src, GstTCPServerSrcClass * g_class) READ_SOCKET (src) = -1; WRITE_SOCKET (src) = -1; - GST_FLAG_UNSET (src, GST_TCPSERVERSRC_OPEN); + GST_OBJECT_FLAG_UNSET (src, GST_TCPSERVERSRC_OPEN); } static void @@ -175,7 +175,7 @@ gst_tcpserversrc_create (GstPushSrc * psrc, GstBuffer ** outbuf) src = GST_TCPSERVERSRC (psrc); - if (!GST_FLAG_IS_SET (src, GST_TCPSERVERSRC_OPEN)) + if (!GST_OBJECT_FLAG_IS_SET (src, GST_TCPSERVERSRC_OPEN)) goto wrong_state; restart: @@ -418,7 +418,7 @@ gst_tcpserversrc_start (GstBaseSrc * bsrc) GST_DEBUG_OBJECT (src, "received client"); - GST_FLAG_SET (src, GST_TCPSERVERSRC_OPEN); + GST_OBJECT_FLAG_SET (src, GST_TCPSERVERSRC_OPEN); return TRUE; @@ -478,7 +478,7 @@ gst_tcpserversrc_stop (GstBaseSrc * bsrc) close (src->client_sock_fd); src->client_sock_fd = -1; } - GST_FLAG_UNSET (src, GST_TCPSERVERSRC_OPEN); + GST_OBJECT_FLAG_UNSET (src, GST_TCPSERVERSRC_OPEN); close (READ_SOCKET (src)); close (WRITE_SOCKET (src)); diff --git a/gst/tcp/gsttcpserversrc.h b/gst/tcp/gsttcpserversrc.h index 7cb2914..c96e11a 100644 --- a/gst/tcp/gsttcpserversrc.h +++ b/gst/tcp/gsttcpserversrc.h @@ -53,9 +53,9 @@ typedef struct _GstTCPServerSrc GstTCPServerSrc; typedef struct _GstTCPServerSrcClass GstTCPServerSrcClass; typedef enum { - GST_TCPSERVERSRC_OPEN = GST_ELEMENT_FLAG_LAST, + GST_TCPSERVERSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0), - GST_TCPSERVERSRC_FLAG_LAST, + GST_TCPSERVERSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) } GstTCPServerSrcFlags; struct _GstTCPServerSrc { diff --git a/sys/v4l/gstv4lmjpegsink.c b/sys/v4l/gstv4lmjpegsink.c index 1e42198..2b5a1ff 100644 --- a/sys/v4l/gstv4lmjpegsink.c +++ b/sys/v4l/gstv4lmjpegsink.c @@ -196,7 +196,7 @@ gst_v4lmjpegsink_init (GstV4lMjpegSink * v4lmjpegsink) v4lmjpegsink->numbufs = 64; v4lmjpegsink->bufsize = 256; - GST_FLAG_SET (v4lmjpegsink, GST_ELEMENT_THREAD_SUGGESTED); + GST_OBJECT_FLAG_SET (v4lmjpegsink, GST_ELEMENT_THREAD_SUGGESTED); } diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index 6a5c1f7..f8bf153 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -229,7 +229,7 @@ gst_v4lmjpegsrc_init (GstV4lMjpegSrc * v4lmjpegsrc) { GstElementClass *klass = GST_ELEMENT_GET_CLASS (v4lmjpegsrc); - GST_FLAG_SET (GST_ELEMENT (v4lmjpegsrc), GST_ELEMENT_THREAD_SUGGESTED); + GST_OBJECT_FLAG_SET (GST_ELEMENT (v4lmjpegsrc), GST_ELEMENT_THREAD_SUGGESTED); v4lmjpegsrc->srcpad = gst_pad_new_from_template (gst_element_class_get_pad_template (klass, diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 8e6c41b..f6ba29e 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -1799,8 +1799,8 @@ gst_ximagesink_init (GstXImageSink * ximagesink) ximagesink->pend_nav_events = NULL; #if 0 - GST_FLAG_SET (ximagesink, GST_ELEMENT_THREAD_SUGGESTED); - GST_FLAG_SET (ximagesink, GST_ELEMENT_EVENT_AWARE); + GST_OBJECT_FLAG_SET (ximagesink, GST_ELEMENT_THREAD_SUGGESTED); + GST_OBJECT_FLAG_SET (ximagesink, GST_ELEMENT_EVENT_AWARE); #endif } diff --git a/tests/old/examples/indexing/indexmpeg.c b/tests/old/examples/indexing/indexmpeg.c index 3b690af..a670ad8 100644 --- a/tests/old/examples/indexing/indexmpeg.c +++ b/tests/old/examples/indexing/indexmpeg.c @@ -272,7 +272,7 @@ main (gint argc, gchar * argv[]) gst_element_set_state (pipeline, GST_STATE_PAUSED); if (index) - GST_FLAG_UNSET (index, GST_INDEX_WRITABLE); + GST_OBJECT_FLAG_UNSET (index, GST_INDEX_WRITABLE); src = gst_bin_get_by_name (GST_BIN (pipeline), "video_decoder"); -- 2.7.4