From 0675bff0fcceade293e244ed5e3026a5be736cc5 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 5 Jul 2005 16:38:13 +0000 Subject: [PATCH] gst/: s/BASESRC/BASE_SRC/g. Original commit message from CVS: 2005-07-05 Andy Wingo * gst/elements/gstfilesrc.c: * gst/elements/gstfakesrc.c: * gst/base/gstpushsrc.c: * gst/base/gstbasesrc.h: * gst/base/gstbasesrc.c: s/BASESRC/BASE_SRC/g. --- ChangeLog | 8 ++++++ docs/gst/tmpl/gstbasesrc.sgml | 12 ++------- gst/base/gstbasesrc.c | 48 +++++++++++++++++------------------ gst/base/gstbasesrc.h | 24 +++++++++--------- gst/base/gstpushsrc.c | 4 +-- gst/elements/gstfakesrc.c | 10 ++++---- gst/elements/gstfilesrc.c | 2 +- libs/gst/base/gstbasesrc.c | 48 +++++++++++++++++------------------ libs/gst/base/gstbasesrc.h | 24 +++++++++--------- libs/gst/base/gstpushsrc.c | 4 +-- plugins/elements/gstfakesrc.c | 10 ++++---- plugins/elements/gstfilesrc.c | 2 +- 12 files changed, 98 insertions(+), 98 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba7f55f5ff..13e07592b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-07-05 Andy Wingo + + * gst/elements/gstfilesrc.c: + * gst/elements/gstfakesrc.c: + * gst/base/gstpushsrc.c: + * gst/base/gstbasesrc.h: + * gst/base/gstbasesrc.c: s/BASESRC/BASE_SRC/g. + 2005-07-05 Stefan Kost * Makefile.am: diff --git a/docs/gst/tmpl/gstbasesrc.sgml b/docs/gst/tmpl/gstbasesrc.sgml index cbb6723f28..8ce519f2b3 100644 --- a/docs/gst/tmpl/gstbasesrc.sgml +++ b/docs/gst/tmpl/gstbasesrc.sgml @@ -73,8 +73,8 @@ GstBaseSrc -@GST_BASESRC_STARTED: -@GST_BASESRC_FLAG_LAST: +@GST_BASE_SRC_STARTED: +@GST_BASE_SRC_FLAG_LAST: @@ -94,11 +94,3 @@ GstBaseSrc @live: - - - - - -@obj: - - diff --git a/gst/base/gstbasesrc.c b/gst/base/gstbasesrc.c index e8aca6f7bc..333a947963 100644 --- a/gst/base/gstbasesrc.c +++ b/gst/base/gstbasesrc.c @@ -180,7 +180,7 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class) basesrc->blocksize = DEFAULT_BLOCKSIZE; basesrc->clock_id = NULL; - GST_FLAG_UNSET (basesrc, GST_BASESRC_STARTED); + GST_FLAG_UNSET (basesrc, GST_BASE_SRC_STARTED); } void @@ -222,7 +222,7 @@ gst_base_src_query (GstPad * pad, GstQuery * query) gint64 i64; GstBaseSrc *src; - src = GST_BASESRC (GST_PAD_PARENT (pad)); + src = GST_BASE_SRC (GST_PAD_PARENT (pad)); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION: @@ -384,8 +384,8 @@ gst_base_src_event_handler (GstPad * pad, GstEvent * event) GstBaseSrcClass *bclass; gboolean result; - src = GST_BASESRC (GST_PAD_PARENT (pad)); - bclass = GST_BASESRC_GET_CLASS (src); + src = GST_BASE_SRC (GST_PAD_PARENT (pad)); + bclass = GST_BASE_SRC_GET_CLASS (src); if (bclass->event) result = bclass->event (src, event); @@ -427,7 +427,7 @@ gst_base_src_set_property (GObject * object, guint prop_id, { GstBaseSrc *src; - src = GST_BASESRC (object); + src = GST_BASE_SRC (object); switch (prop_id) { case PROP_BLOCKSIZE: @@ -453,7 +453,7 @@ gst_base_src_get_property (GObject * object, guint prop_id, GValue * value, { GstBaseSrc *src; - src = GST_BASESRC (object); + src = GST_BASE_SRC (object); switch (prop_id) { case PROP_BLOCKSIZE: @@ -479,8 +479,8 @@ gst_base_src_get_range (GstPad * pad, guint64 offset, guint length, GstBaseSrc *src; GstBaseSrcClass *bclass; - src = GST_BASESRC (GST_OBJECT_PARENT (pad)); - bclass = GST_BASESRC_GET_CLASS (src); + src = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); + bclass = GST_BASE_SRC_GET_CLASS (src); GST_LIVE_LOCK (src); if (src->is_live) { @@ -492,7 +492,7 @@ gst_base_src_get_range (GstPad * pad, guint64 offset, guint length, } GST_LIVE_UNLOCK (src); - if (!GST_FLAG_IS_SET (src, GST_BASESRC_STARTED)) + if (!GST_FLAG_IS_SET (src, GST_BASE_SRC_STARTED)) goto not_started; if (!bclass->create) @@ -542,9 +542,9 @@ gst_base_src_check_get_range (GstPad * pad) { GstBaseSrc *src; - src = GST_BASESRC (GST_OBJECT_PARENT (pad)); + src = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); - if (!GST_FLAG_IS_SET (src, GST_BASESRC_STARTED)) { + if (!GST_FLAG_IS_SET (src, GST_BASE_SRC_STARTED)) { gst_base_src_start (src); gst_base_src_stop (src); } @@ -559,7 +559,7 @@ gst_base_src_loop (GstPad * pad) GstBuffer *buf = NULL; GstFlowReturn ret; - src = GST_BASESRC (GST_OBJECT_PARENT (pad)); + src = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); ret = gst_base_src_get_range (pad, src->offset, src->blocksize, &buf); if (ret != GST_FLOW_OK) @@ -596,7 +596,7 @@ gst_base_src_unlock (GstBaseSrc * basesrc) GST_DEBUG ("unlock"); /* unblock whatever the subclass is doing */ - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); if (bclass->unlock) result = bclass->unlock (basesrc); @@ -619,7 +619,7 @@ gst_base_src_get_size (GstBaseSrc * basesrc, guint64 * size) GstBaseSrcClass *bclass; gboolean result = FALSE; - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); if (bclass->get_size) result = bclass->get_size (basesrc, size); @@ -634,7 +634,7 @@ gst_base_src_is_seekable (GstBaseSrc * basesrc) { GstBaseSrcClass *bclass; - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); /* check if we can seek */ if (bclass->is_seekable) @@ -651,10 +651,10 @@ gst_base_src_start (GstBaseSrc * basesrc) GstBaseSrcClass *bclass; gboolean result; - if (GST_FLAG_IS_SET (basesrc, GST_BASESRC_STARTED)) + if (GST_FLAG_IS_SET (basesrc, GST_BASE_SRC_STARTED)) return TRUE; - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); if (bclass->start) result = bclass->start (basesrc); else @@ -663,7 +663,7 @@ gst_base_src_start (GstBaseSrc * basesrc) if (!result) goto could_not_start; - GST_FLAG_SET (basesrc, GST_BASESRC_STARTED); + GST_FLAG_SET (basesrc, GST_BASE_SRC_STARTED); /* start in the beginning */ basesrc->offset = 0; @@ -713,15 +713,15 @@ gst_base_src_stop (GstBaseSrc * basesrc) GstBaseSrcClass *bclass; gboolean result = TRUE; - if (!GST_FLAG_IS_SET (basesrc, GST_BASESRC_STARTED)) + if (!GST_FLAG_IS_SET (basesrc, GST_BASE_SRC_STARTED)) return TRUE; - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); if (bclass->stop) result = bclass->stop (basesrc); if (result) - GST_FLAG_UNSET (basesrc, GST_BASESRC_STARTED); + GST_FLAG_UNSET (basesrc, GST_BASE_SRC_STARTED); return result; } @@ -750,7 +750,7 @@ gst_base_src_activate_push (GstPad * pad, gboolean active) { GstBaseSrc *basesrc; - basesrc = GST_BASESRC (GST_OBJECT_PARENT (pad)); + basesrc = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); /* prepare subclass first */ if (active) { @@ -774,7 +774,7 @@ gst_base_src_activate_pull (GstPad * pad, gboolean active) { GstBaseSrc *basesrc; - basesrc = GST_BASESRC (GST_OBJECT_PARENT (pad)); + basesrc = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); /* prepare subclass first */ if (active) { @@ -806,7 +806,7 @@ gst_base_src_change_state (GstElement * element) GstElementStateReturn presult; GstElementState transition; - basesrc = GST_BASESRC (element); + basesrc = GST_BASE_SRC (element); transition = GST_STATE_TRANSITION (element); diff --git a/gst/base/gstbasesrc.h b/gst/base/gstbasesrc.h index d7c23d774b..3ebb4f5dd1 100644 --- a/gst/base/gstbasesrc.h +++ b/gst/base/gstbasesrc.h @@ -28,17 +28,17 @@ G_BEGIN_DECLS -#define GST_TYPE_BASESRC (gst_base_src_get_type()) -#define GST_BASESRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASESRC,GstBaseSrc)) -#define GST_BASESRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASESRC,GstBaseSrcClass)) -#define GST_BASESRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASESRC, GstBaseSrcClass)) -#define GST_IS_BASESRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASESRC)) -#define GST_IS_BASESRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASESRC)) +#define GST_TYPE_BASE_SRC (gst_base_src_get_type()) +#define GST_BASE_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_SRC,GstBaseSrc)) +#define GST_BASE_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_SRC,GstBaseSrcClass)) +#define GST_BASE_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_SRC, GstBaseSrcClass)) +#define GST_IS_BASE_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_SRC)) +#define GST_IS_BASE_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_SRC)) typedef enum { - GST_BASESRC_STARTED = GST_ELEMENT_FLAG_LAST, + GST_BASE_SRC_STARTED = GST_ELEMENT_FLAG_LAST, - GST_BASESRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2 + GST_BASE_SRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2 } GstBaseSrcFlags; /* base class for random access sources @@ -52,13 +52,13 @@ typedef enum { typedef struct _GstBaseSrc GstBaseSrc; typedef struct _GstBaseSrcClass GstBaseSrcClass; -#define GST_BASESRC_PAD(obj) (GST_BASESRC (obj)->srcpad) +#define GST_BASE_SRC_PAD(obj) (GST_BASE_SRC (obj)->srcpad) -#define GST_LIVE_GET_LOCK(elem) (GST_BASESRC(elem)->live_lock) +#define GST_LIVE_GET_LOCK(elem) (GST_BASE_SRC(elem)->live_lock) #define GST_LIVE_LOCK(elem) g_mutex_lock(GST_LIVE_GET_LOCK(elem)) #define GST_LIVE_TRYLOCK(elem) g_mutex_trylock(GST_LIVE_GET_LOCK(elem)) #define GST_LIVE_UNLOCK(elem) g_mutex_unlock(GST_LIVE_GET_LOCK(elem)) -#define GST_LIVE_GET_COND(elem) (GST_BASESRC(elem)->live_cond) +#define GST_LIVE_GET_COND(elem) (GST_BASE_SRC(elem)->live_cond) #define GST_LIVE_WAIT(elem) g_cond_wait (GST_LIVE_GET_COND (elem), GST_LIVE_GET_LOCK (elem)) #define GST_LIVE_TIMED_WAIT(elem, timeval) g_cond_timed_wait (GST_LIVE_GET_COND (elem), GST_LIVE_GET_LOCK (elem),\ timeval) @@ -146,4 +146,4 @@ gboolean gst_base_src_is_live (GstBaseSrc *src); G_END_DECLS -#endif /* __GST_BASESRC_H__ */ +#endif /* __GST_BASE_SRC_H__ */ diff --git a/gst/base/gstpushsrc.c b/gst/base/gstpushsrc.c index 6f67642d8d..1bc09cae6a 100644 --- a/gst/base/gstpushsrc.c +++ b/gst/base/gstpushsrc.c @@ -71,7 +71,7 @@ gst_pushsrc_get_type (void) (GInstanceInitFunc) gst_pushsrc_init, }; - pushsrc_type = g_type_register_static (GST_TYPE_BASESRC, + pushsrc_type = g_type_register_static (GST_TYPE_BASE_SRC, "GstPushSrc", &pushsrc_info, G_TYPE_FLAG_ABSTRACT); } return pushsrc_type; @@ -101,7 +101,7 @@ gst_pushsrc_class_init (GstPushSrcClass * klass) gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; - parent_class = g_type_class_ref (GST_TYPE_BASESRC); + parent_class = g_type_class_ref (GST_TYPE_BASE_SRC); gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_pushsrc_create); } diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index 8016b73e32..8b33420c9d 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -180,7 +180,7 @@ gst_fakesrc_filltype_get_type (void) #define _do_init(bla) \ GST_DEBUG_CATEGORY_INIT (gst_fakesrc_debug, "fakesrc", 0, "fakesrc element"); -GST_BOILERPLATE_FULL (GstFakeSrc, gst_fakesrc, GstBaseSrc, GST_TYPE_BASESRC, +GST_BOILERPLATE_FULL (GstFakeSrc, gst_fakesrc, GstBaseSrc, GST_TYPE_BASE_SRC, _do_init); static void gst_fakesrc_set_property (GObject * object, guint prop_id, @@ -369,7 +369,7 @@ gst_fakesrc_set_property (GObject * object, guint prop_id, const GValue * value, GstBaseSrc *basesrc; src = GST_FAKESRC (object); - basesrc = GST_BASESRC (object); + basesrc = GST_BASE_SRC (object); switch (prop_id) { case PROP_OUTPUT: @@ -428,11 +428,11 @@ gst_fakesrc_set_property (GObject * object, guint prop_id, const GValue * value, src->dump = g_value_get_boolean (value); break; case PROP_HAS_LOOP: - g_return_if_fail (!GST_FLAG_IS_SET (object, GST_BASESRC_STARTED)); + g_return_if_fail (!GST_FLAG_IS_SET (object, GST_BASE_SRC_STARTED)); src->has_loop = g_value_get_boolean (value); break; case PROP_HAS_GETRANGE: - g_return_if_fail (!GST_FLAG_IS_SET (object, GST_BASESRC_STARTED)); + g_return_if_fail (!GST_FLAG_IS_SET (object, GST_BASE_SRC_STARTED)); src->has_getrange = g_value_get_boolean (value); break; case PROP_IS_LIVE: @@ -454,7 +454,7 @@ gst_fakesrc_get_property (GObject * object, guint prop_id, GValue * value, g_return_if_fail (GST_IS_FAKESRC (object)); src = GST_FAKESRC (object); - basesrc = GST_BASESRC (object); + basesrc = GST_BASE_SRC (object); switch (prop_id) { case PROP_OUTPUT: diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index cc3367c151..b0a0a2b9af 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -157,7 +157,7 @@ _do_init (GType filesrc_type) GST_DEBUG_CATEGORY_INIT (gst_filesrc_debug, "filesrc", 0, "filesrc element"); } -GST_BOILERPLATE_FULL (GstFileSrc, gst_filesrc, GstBaseSrc, GST_TYPE_BASESRC, +GST_BOILERPLATE_FULL (GstFileSrc, gst_filesrc, GstBaseSrc, GST_TYPE_BASE_SRC, _do_init); static void diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index e8aca6f7bc..333a947963 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -180,7 +180,7 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class) basesrc->blocksize = DEFAULT_BLOCKSIZE; basesrc->clock_id = NULL; - GST_FLAG_UNSET (basesrc, GST_BASESRC_STARTED); + GST_FLAG_UNSET (basesrc, GST_BASE_SRC_STARTED); } void @@ -222,7 +222,7 @@ gst_base_src_query (GstPad * pad, GstQuery * query) gint64 i64; GstBaseSrc *src; - src = GST_BASESRC (GST_PAD_PARENT (pad)); + src = GST_BASE_SRC (GST_PAD_PARENT (pad)); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION: @@ -384,8 +384,8 @@ gst_base_src_event_handler (GstPad * pad, GstEvent * event) GstBaseSrcClass *bclass; gboolean result; - src = GST_BASESRC (GST_PAD_PARENT (pad)); - bclass = GST_BASESRC_GET_CLASS (src); + src = GST_BASE_SRC (GST_PAD_PARENT (pad)); + bclass = GST_BASE_SRC_GET_CLASS (src); if (bclass->event) result = bclass->event (src, event); @@ -427,7 +427,7 @@ gst_base_src_set_property (GObject * object, guint prop_id, { GstBaseSrc *src; - src = GST_BASESRC (object); + src = GST_BASE_SRC (object); switch (prop_id) { case PROP_BLOCKSIZE: @@ -453,7 +453,7 @@ gst_base_src_get_property (GObject * object, guint prop_id, GValue * value, { GstBaseSrc *src; - src = GST_BASESRC (object); + src = GST_BASE_SRC (object); switch (prop_id) { case PROP_BLOCKSIZE: @@ -479,8 +479,8 @@ gst_base_src_get_range (GstPad * pad, guint64 offset, guint length, GstBaseSrc *src; GstBaseSrcClass *bclass; - src = GST_BASESRC (GST_OBJECT_PARENT (pad)); - bclass = GST_BASESRC_GET_CLASS (src); + src = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); + bclass = GST_BASE_SRC_GET_CLASS (src); GST_LIVE_LOCK (src); if (src->is_live) { @@ -492,7 +492,7 @@ gst_base_src_get_range (GstPad * pad, guint64 offset, guint length, } GST_LIVE_UNLOCK (src); - if (!GST_FLAG_IS_SET (src, GST_BASESRC_STARTED)) + if (!GST_FLAG_IS_SET (src, GST_BASE_SRC_STARTED)) goto not_started; if (!bclass->create) @@ -542,9 +542,9 @@ gst_base_src_check_get_range (GstPad * pad) { GstBaseSrc *src; - src = GST_BASESRC (GST_OBJECT_PARENT (pad)); + src = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); - if (!GST_FLAG_IS_SET (src, GST_BASESRC_STARTED)) { + if (!GST_FLAG_IS_SET (src, GST_BASE_SRC_STARTED)) { gst_base_src_start (src); gst_base_src_stop (src); } @@ -559,7 +559,7 @@ gst_base_src_loop (GstPad * pad) GstBuffer *buf = NULL; GstFlowReturn ret; - src = GST_BASESRC (GST_OBJECT_PARENT (pad)); + src = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); ret = gst_base_src_get_range (pad, src->offset, src->blocksize, &buf); if (ret != GST_FLOW_OK) @@ -596,7 +596,7 @@ gst_base_src_unlock (GstBaseSrc * basesrc) GST_DEBUG ("unlock"); /* unblock whatever the subclass is doing */ - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); if (bclass->unlock) result = bclass->unlock (basesrc); @@ -619,7 +619,7 @@ gst_base_src_get_size (GstBaseSrc * basesrc, guint64 * size) GstBaseSrcClass *bclass; gboolean result = FALSE; - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); if (bclass->get_size) result = bclass->get_size (basesrc, size); @@ -634,7 +634,7 @@ gst_base_src_is_seekable (GstBaseSrc * basesrc) { GstBaseSrcClass *bclass; - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); /* check if we can seek */ if (bclass->is_seekable) @@ -651,10 +651,10 @@ gst_base_src_start (GstBaseSrc * basesrc) GstBaseSrcClass *bclass; gboolean result; - if (GST_FLAG_IS_SET (basesrc, GST_BASESRC_STARTED)) + if (GST_FLAG_IS_SET (basesrc, GST_BASE_SRC_STARTED)) return TRUE; - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); if (bclass->start) result = bclass->start (basesrc); else @@ -663,7 +663,7 @@ gst_base_src_start (GstBaseSrc * basesrc) if (!result) goto could_not_start; - GST_FLAG_SET (basesrc, GST_BASESRC_STARTED); + GST_FLAG_SET (basesrc, GST_BASE_SRC_STARTED); /* start in the beginning */ basesrc->offset = 0; @@ -713,15 +713,15 @@ gst_base_src_stop (GstBaseSrc * basesrc) GstBaseSrcClass *bclass; gboolean result = TRUE; - if (!GST_FLAG_IS_SET (basesrc, GST_BASESRC_STARTED)) + if (!GST_FLAG_IS_SET (basesrc, GST_BASE_SRC_STARTED)) return TRUE; - bclass = GST_BASESRC_GET_CLASS (basesrc); + bclass = GST_BASE_SRC_GET_CLASS (basesrc); if (bclass->stop) result = bclass->stop (basesrc); if (result) - GST_FLAG_UNSET (basesrc, GST_BASESRC_STARTED); + GST_FLAG_UNSET (basesrc, GST_BASE_SRC_STARTED); return result; } @@ -750,7 +750,7 @@ gst_base_src_activate_push (GstPad * pad, gboolean active) { GstBaseSrc *basesrc; - basesrc = GST_BASESRC (GST_OBJECT_PARENT (pad)); + basesrc = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); /* prepare subclass first */ if (active) { @@ -774,7 +774,7 @@ gst_base_src_activate_pull (GstPad * pad, gboolean active) { GstBaseSrc *basesrc; - basesrc = GST_BASESRC (GST_OBJECT_PARENT (pad)); + basesrc = GST_BASE_SRC (GST_OBJECT_PARENT (pad)); /* prepare subclass first */ if (active) { @@ -806,7 +806,7 @@ gst_base_src_change_state (GstElement * element) GstElementStateReturn presult; GstElementState transition; - basesrc = GST_BASESRC (element); + basesrc = GST_BASE_SRC (element); transition = GST_STATE_TRANSITION (element); diff --git a/libs/gst/base/gstbasesrc.h b/libs/gst/base/gstbasesrc.h index d7c23d774b..3ebb4f5dd1 100644 --- a/libs/gst/base/gstbasesrc.h +++ b/libs/gst/base/gstbasesrc.h @@ -28,17 +28,17 @@ G_BEGIN_DECLS -#define GST_TYPE_BASESRC (gst_base_src_get_type()) -#define GST_BASESRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASESRC,GstBaseSrc)) -#define GST_BASESRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASESRC,GstBaseSrcClass)) -#define GST_BASESRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASESRC, GstBaseSrcClass)) -#define GST_IS_BASESRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASESRC)) -#define GST_IS_BASESRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASESRC)) +#define GST_TYPE_BASE_SRC (gst_base_src_get_type()) +#define GST_BASE_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_SRC,GstBaseSrc)) +#define GST_BASE_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_SRC,GstBaseSrcClass)) +#define GST_BASE_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_SRC, GstBaseSrcClass)) +#define GST_IS_BASE_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_SRC)) +#define GST_IS_BASE_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_SRC)) typedef enum { - GST_BASESRC_STARTED = GST_ELEMENT_FLAG_LAST, + GST_BASE_SRC_STARTED = GST_ELEMENT_FLAG_LAST, - GST_BASESRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2 + GST_BASE_SRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2 } GstBaseSrcFlags; /* base class for random access sources @@ -52,13 +52,13 @@ typedef enum { typedef struct _GstBaseSrc GstBaseSrc; typedef struct _GstBaseSrcClass GstBaseSrcClass; -#define GST_BASESRC_PAD(obj) (GST_BASESRC (obj)->srcpad) +#define GST_BASE_SRC_PAD(obj) (GST_BASE_SRC (obj)->srcpad) -#define GST_LIVE_GET_LOCK(elem) (GST_BASESRC(elem)->live_lock) +#define GST_LIVE_GET_LOCK(elem) (GST_BASE_SRC(elem)->live_lock) #define GST_LIVE_LOCK(elem) g_mutex_lock(GST_LIVE_GET_LOCK(elem)) #define GST_LIVE_TRYLOCK(elem) g_mutex_trylock(GST_LIVE_GET_LOCK(elem)) #define GST_LIVE_UNLOCK(elem) g_mutex_unlock(GST_LIVE_GET_LOCK(elem)) -#define GST_LIVE_GET_COND(elem) (GST_BASESRC(elem)->live_cond) +#define GST_LIVE_GET_COND(elem) (GST_BASE_SRC(elem)->live_cond) #define GST_LIVE_WAIT(elem) g_cond_wait (GST_LIVE_GET_COND (elem), GST_LIVE_GET_LOCK (elem)) #define GST_LIVE_TIMED_WAIT(elem, timeval) g_cond_timed_wait (GST_LIVE_GET_COND (elem), GST_LIVE_GET_LOCK (elem),\ timeval) @@ -146,4 +146,4 @@ gboolean gst_base_src_is_live (GstBaseSrc *src); G_END_DECLS -#endif /* __GST_BASESRC_H__ */ +#endif /* __GST_BASE_SRC_H__ */ diff --git a/libs/gst/base/gstpushsrc.c b/libs/gst/base/gstpushsrc.c index 6f67642d8d..1bc09cae6a 100644 --- a/libs/gst/base/gstpushsrc.c +++ b/libs/gst/base/gstpushsrc.c @@ -71,7 +71,7 @@ gst_pushsrc_get_type (void) (GInstanceInitFunc) gst_pushsrc_init, }; - pushsrc_type = g_type_register_static (GST_TYPE_BASESRC, + pushsrc_type = g_type_register_static (GST_TYPE_BASE_SRC, "GstPushSrc", &pushsrc_info, G_TYPE_FLAG_ABSTRACT); } return pushsrc_type; @@ -101,7 +101,7 @@ gst_pushsrc_class_init (GstPushSrcClass * klass) gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; - parent_class = g_type_class_ref (GST_TYPE_BASESRC); + parent_class = g_type_class_ref (GST_TYPE_BASE_SRC); gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_pushsrc_create); } diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 8016b73e32..8b33420c9d 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -180,7 +180,7 @@ gst_fakesrc_filltype_get_type (void) #define _do_init(bla) \ GST_DEBUG_CATEGORY_INIT (gst_fakesrc_debug, "fakesrc", 0, "fakesrc element"); -GST_BOILERPLATE_FULL (GstFakeSrc, gst_fakesrc, GstBaseSrc, GST_TYPE_BASESRC, +GST_BOILERPLATE_FULL (GstFakeSrc, gst_fakesrc, GstBaseSrc, GST_TYPE_BASE_SRC, _do_init); static void gst_fakesrc_set_property (GObject * object, guint prop_id, @@ -369,7 +369,7 @@ gst_fakesrc_set_property (GObject * object, guint prop_id, const GValue * value, GstBaseSrc *basesrc; src = GST_FAKESRC (object); - basesrc = GST_BASESRC (object); + basesrc = GST_BASE_SRC (object); switch (prop_id) { case PROP_OUTPUT: @@ -428,11 +428,11 @@ gst_fakesrc_set_property (GObject * object, guint prop_id, const GValue * value, src->dump = g_value_get_boolean (value); break; case PROP_HAS_LOOP: - g_return_if_fail (!GST_FLAG_IS_SET (object, GST_BASESRC_STARTED)); + g_return_if_fail (!GST_FLAG_IS_SET (object, GST_BASE_SRC_STARTED)); src->has_loop = g_value_get_boolean (value); break; case PROP_HAS_GETRANGE: - g_return_if_fail (!GST_FLAG_IS_SET (object, GST_BASESRC_STARTED)); + g_return_if_fail (!GST_FLAG_IS_SET (object, GST_BASE_SRC_STARTED)); src->has_getrange = g_value_get_boolean (value); break; case PROP_IS_LIVE: @@ -454,7 +454,7 @@ gst_fakesrc_get_property (GObject * object, guint prop_id, GValue * value, g_return_if_fail (GST_IS_FAKESRC (object)); src = GST_FAKESRC (object); - basesrc = GST_BASESRC (object); + basesrc = GST_BASE_SRC (object); switch (prop_id) { case PROP_OUTPUT: diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index cc3367c151..b0a0a2b9af 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -157,7 +157,7 @@ _do_init (GType filesrc_type) GST_DEBUG_CATEGORY_INIT (gst_filesrc_debug, "filesrc", 0, "filesrc element"); } -GST_BOILERPLATE_FULL (GstFileSrc, gst_filesrc, GstBaseSrc, GST_TYPE_BASESRC, +GST_BOILERPLATE_FULL (GstFileSrc, gst_filesrc, GstBaseSrc, GST_TYPE_BASE_SRC, _do_init); static void