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/a52dec/gsta52dec.c: (gst_a52dec_init):
* ext/dvdnav/dvdnavsrc.c: (dvdnavsrc_is_open),
(dvdnavsrc_set_property), (dvdnavsrc_open), (dvdnavsrc_close),
(dvdnavsrc_event), (dvdnavsrc_convert), (dvdnavsrc_query):
* ext/dvdread/dvdreadsrc.c: (dvdreadsrc_set_property),
(dvdreadsrc_srcpad_query), (dvdreadsrc_get),
(dvdreadsrc_open_file), (dvdreadsrc_close_file):
* ext/dvdread/dvdreadsrc.h:
* ext/lame/gstlame.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_init):
* gst/asfdemux/gstasfmux.c: (gst_asfmux_init):
* gst/iec958/ac3iec.h:
* gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_init):
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_init):
* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_init):
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_init):
* gst/synaesthesia/gstsynaesthesia.c: (gst_synaesthesia_init):
renamed GST_FLAGS macros to GST_OBJECT_FLAGS
moved bitshift from macro to enum definition
This commit is contained in:
Stefan Kost 2005-10-12 14:30:36 +00:00
parent f7690579ef
commit 470f3bb857
16 changed files with 54 additions and 30 deletions

View file

@ -1,3 +1,26 @@
2005-10-12 Stefan Kost <ensonic@users.sf.net>
* examples/indexing/indexmpeg.c: (main):
* ext/a52dec/gsta52dec.c: (gst_a52dec_init):
* ext/dvdnav/dvdnavsrc.c: (dvdnavsrc_is_open),
(dvdnavsrc_set_property), (dvdnavsrc_open), (dvdnavsrc_close),
(dvdnavsrc_event), (dvdnavsrc_convert), (dvdnavsrc_query):
* ext/dvdread/dvdreadsrc.c: (dvdreadsrc_set_property),
(dvdreadsrc_srcpad_query), (dvdreadsrc_get),
(dvdreadsrc_open_file), (dvdreadsrc_close_file):
* ext/dvdread/dvdreadsrc.h:
* ext/lame/gstlame.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_init):
* gst/asfdemux/gstasfmux.c: (gst_asfmux_init):
* gst/iec958/ac3iec.h:
* gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_init):
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_init):
* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_init):
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_init):
* gst/synaesthesia/gstsynaesthesia.c: (gst_synaesthesia_init):
renamed GST_FLAGS macros to GST_OBJECT_FLAGS
moved bitshift from macro to enum definition
2005-10-11 Wim Taymans <wim@fluendo.com>
* ext/mad/gstid3tag.c: (gst_id3_tag_sink_event):

2
common

@ -1 +1 @@
Subproject commit 615cf4d4506ef1ffb1f600c434fced1fa26b0f44
Subproject commit 2485a65b662de25fb7b71857e34411426c6f530c

View file

@ -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");

View file

@ -157,7 +157,7 @@ gst_a52dec_class_init (GstA52DecClass * klass)
static void
gst_a52dec_init (GstA52Dec * a52dec)
{
GST_FLAG_SET (GST_ELEMENT (a52dec), GST_ELEMENT_EVENT_AWARE);
GST_OBJECT_FLAG_SET (GST_ELEMENT (a52dec), GST_ELEMENT_EVENT_AWARE);
/* create the sink and src pads */
a52dec->sinkpad =

View file

@ -439,7 +439,7 @@ dvdnavsrc_is_open (DVDNavSrc * src)
g_return_val_if_fail (src != NULL, FALSE);
g_return_val_if_fail (GST_IS_DVDNAVSRC (src), FALSE);
return GST_FLAG_IS_SET (src, DVDNAVSRC_OPEN);
return GST_OBJECT_FLAG_IS_SET (src, DVDNAVSRC_OPEN);
}
static void
@ -456,7 +456,7 @@ dvdnavsrc_set_property (GObject * object, guint prop_id,
case ARG_LOCATION:
case ARG_DEVICE:
/* the element must be stopped in order to do this */
/*g_return_if_fail(!GST_FLAG_IS_SET(src,GST_STATE_RUNNING)); */
/*g_return_if_fail(!GST_OBJECT_FLAG_IS_SET(src,GST_STATE_RUNNING)); */
g_free (src->location);
/* clear the filename if we get a NULL (is that possible?) */
@ -1533,7 +1533,7 @@ dvdnavsrc_open (DVDNavSrc * src)
return FALSE;
}
GST_FLAG_SET (src, DVDNAVSRC_OPEN);
GST_OBJECT_FLAG_SET (src, DVDNAVSRC_OPEN);
/* Read the first block before seeking to force a libdvdnav internal
* call to vm_start, otherwise it ignores our seek position.
@ -1578,7 +1578,7 @@ dvdnavsrc_close (DVDNavSrc * src)
DVDNAV_CALLVAL (dvdnav_close, (src->dvdnav), src, FALSE);
GST_FLAG_UNSET (src, DVDNAVSRC_OPEN);
GST_OBJECT_FLAG_UNSET (src, DVDNAVSRC_OPEN);
return TRUE;
}
@ -1684,7 +1684,7 @@ dvdnavsrc_event (GstPad * pad, GstEvent * event)
src = DVDNAVSRC (gst_pad_get_parent (pad));
if (!GST_FLAG_IS_SET (src, DVDNAVSRC_OPEN))
if (!GST_OBJECT_FLAG_IS_SET (src, DVDNAVSRC_OPEN))
goto error;
switch (GST_EVENT_TYPE (event)) {
@ -1879,7 +1879,7 @@ dvdnavsrc_convert (GstPad * pad,
src = DVDNAVSRC (gst_pad_get_parent (pad));
if (!GST_FLAG_IS_SET (src, DVDNAVSRC_OPEN))
if (!GST_OBJECT_FLAG_IS_SET (src, DVDNAVSRC_OPEN))
return FALSE;
switch (src_format) {
@ -1923,7 +1923,7 @@ dvdnavsrc_query (GstPad * pad, GstQueryType type,
src = DVDNAVSRC (gst_pad_get_parent (pad));
if (!GST_FLAG_IS_SET (src, DVDNAVSRC_OPEN))
if (!GST_OBJECT_FLAG_IS_SET (src, DVDNAVSRC_OPEN))
return FALSE;
switch (type) {

View file

@ -285,7 +285,7 @@ dvdreadsrc_set_property (GObject * object, guint prop_id, const GValue * value,
case ARG_LOCATION:
case ARG_DEVICE:
/* the element must be stopped in order to do this */
/*g_return_if_fail(!GST_FLAG_IS_SET(src,GST_STATE_RUNNING)); */
/*g_return_if_fail(!GST_OBJECT_FLAG_IS_SET(src,GST_STATE_RUNNING)); */
g_free (priv->location);
/* clear the filename if we get a NULL (is that possible?) */
@ -491,7 +491,7 @@ dvdreadsrc_srcpad_query (GstPad * pad, GstQueryType type,
DVDReadSrcPrivate *priv = dvdreadsrc->priv;
gboolean res = TRUE;
if (!GST_FLAG_IS_SET (dvdreadsrc, DVDREADSRC_OPEN))
if (!GST_OBJECT_FLAG_IS_SET (dvdreadsrc, DVDREADSRC_OPEN))
return FALSE;
switch (type) {
@ -989,7 +989,8 @@ dvdreadsrc_get (GstPad * pad)
dvdreadsrc = DVDREADSRC (gst_pad_get_parent (pad));
priv = dvdreadsrc->priv;
g_return_val_if_fail (GST_FLAG_IS_SET (dvdreadsrc, DVDREADSRC_OPEN), NULL);
g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (dvdreadsrc, DVDREADSRC_OPEN),
NULL);
/* handle vents, if any */
if (priv->seek_pend) {
@ -1056,7 +1057,7 @@ dvdreadsrc_open_file (DVDReadSrc * src)
{
g_return_val_if_fail (src != NULL, FALSE);
g_return_val_if_fail (GST_IS_DVDREADSRC (src), FALSE);
g_return_val_if_fail (!GST_FLAG_IS_SET (src, DVDREADSRC_OPEN), FALSE);
g_return_val_if_fail (!GST_OBJECT_FLAG_IS_SET (src, DVDREADSRC_OPEN), FALSE);
if (_open (src->priv, src->priv->location)) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL), (NULL));
@ -1065,7 +1066,7 @@ dvdreadsrc_open_file (DVDReadSrc * src)
src->priv->seek_pend_fmt = title_format;
src->priv->seek_pend = TRUE;
GST_FLAG_SET (src, DVDREADSRC_OPEN);
GST_OBJECT_FLAG_SET (src, DVDREADSRC_OPEN);
return TRUE;
}
@ -1074,11 +1075,11 @@ dvdreadsrc_open_file (DVDReadSrc * src)
static void
dvdreadsrc_close_file (DVDReadSrc * src)
{
g_return_if_fail (GST_FLAG_IS_SET (src, DVDREADSRC_OPEN));
g_return_if_fail (GST_OBJECT_FLAG_IS_SET (src, DVDREADSRC_OPEN));
_close (src->priv);
GST_FLAG_UNSET (src, DVDREADSRC_OPEN);
GST_OBJECT_FLAG_UNSET (src, DVDREADSRC_OPEN);
}
static GstStateChangeReturn

View file

@ -39,9 +39,9 @@ GstElementDetails dvdreadsrc_details;
/* NOTE: per-element flags start with 16 for now */
typedef enum {
DVDREADSRC_OPEN = GST_ELEMENT_FLAG_LAST,
DVDREADSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
DVDREADSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
DVDREADSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2)
} DVDReadSrcFlags;
typedef struct _DVDReadSrc DVDReadSrc;

View file

@ -42,9 +42,9 @@ extern "C" {
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_LAME))
typedef enum {
GST_LAME_OPEN = GST_ELEMENT_FLAG_LAST,
GST_LAME_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
GST_LAME_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
GST_LAME_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2)
} GstLameFlags;
typedef struct _GstLame GstLame;

View file

@ -175,7 +175,7 @@ gst_asf_demux_init (GstASFDemux * asf_demux)
asf_demux->seek_pending = GST_CLOCK_TIME_NONE;
asf_demux->seek_discont = FALSE;
GST_FLAG_SET (asf_demux, GST_ELEMENT_EVENT_AWARE);
GST_OBJECT_FLAG_SET (asf_demux, GST_ELEMENT_EVENT_AWARE);
}
static gboolean

View file

@ -240,7 +240,7 @@ gst_asfmux_init (GstAsfMux * asfmux)
(&gst_asfmux_src_template), "src");
gst_element_add_pad (GST_ELEMENT (asfmux), asfmux->srcpad);
GST_FLAG_SET (GST_ELEMENT (asfmux), GST_ELEMENT_EVENT_AWARE);
GST_OBJECT_FLAG_SET (GST_ELEMENT (asfmux), GST_ELEMENT_EVENT_AWARE);
asfmux->num_outputs = asfmux->num_video = asfmux->num_audio = 0;
memset (&asfmux->output, 0, sizeof (asfmux->output));

View file

@ -46,8 +46,8 @@ typedef struct _AC3IECClass AC3IECClass;
typedef enum {
AC3IEC_OPEN = GST_ELEMENT_FLAG_LAST,
AC3IEC_FLAG_LAST
AC3IEC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
AC3IEC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2)
} Ac3iecFlags;

View file

@ -275,7 +275,7 @@ gst_dvd_demux_init (GstDVDDemux * dvd_demux)
GstMPEGDemux *mpeg_demux = GST_MPEG_DEMUX (dvd_demux);
gint i;
GST_FLAG_SET (dvd_demux, GST_ELEMENT_EVENT_AWARE);
GST_OBJECT_FLAG_SET (dvd_demux, GST_ELEMENT_EVENT_AWARE);
/* Create the pads for the current streams. */
dvd_demux->cur_video =

View file

@ -246,7 +246,7 @@ gst_mpeg_demux_init (GstMPEGDemux * mpeg_demux)
mpeg_demux->adjust = 0;
GST_FLAG_SET (mpeg_demux, GST_ELEMENT_EVENT_AWARE);
GST_OBJECT_FLAG_SET (mpeg_demux, GST_ELEMENT_EVENT_AWARE);
}
static void

View file

@ -249,7 +249,7 @@ gst_mpeg_parse_init (GstMPEGParse * mpeg_parse)
mpeg_parse->do_adjust = TRUE;
mpeg_parse->use_adjust = TRUE;
GST_FLAG_SET (mpeg_parse, GST_ELEMENT_EVENT_AWARE);
GST_OBJECT_FLAG_SET (mpeg_parse, GST_ELEMENT_EVENT_AWARE);
}
static void

View file

@ -161,7 +161,7 @@ gst_rfc2250_enc_init (GstRFC2250Enc * rfc2250_enc)
rfc2250_enc->bit_rate = 0;
rfc2250_enc->MTU = 3048;
GST_FLAG_SET (rfc2250_enc, GST_ELEMENT_EVENT_AWARE);
GST_OBJECT_FLAG_SET (rfc2250_enc, GST_ELEMENT_EVENT_AWARE);
}
static void

View file

@ -194,7 +194,7 @@ gst_synaesthesia_init (GstSynaesthesia * synaesthesia)
gst_synaesthesia_src_getcaps);
gst_pad_set_link_function (synaesthesia->srcpad, gst_synaesthesia_src_link);
GST_FLAG_SET (synaesthesia, GST_ELEMENT_EVENT_AWARE);
GST_OBJECT_FLAG_SET (synaesthesia, GST_ELEMENT_EVENT_AWARE);
synaesthesia->adapter = gst_adapter_new ();