From 0572e3c3ae7359bf341a0c0abd2c38280dee99e6 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 28 Oct 2005 16:46:58 +0000 Subject: [PATCH] docs/gst/gstreamer-sections.txt: move some macros to private sections Original commit message from CVS: * docs/gst/gstreamer-sections.txt: move some macros to private sections * gst/gstminiobject.c: * gst/gstminiobject.h: add descriptions provided by ds and some more * gst/gstpad.h: mark macro as to be removed --- ChangeLog | 10 +++++++ docs/gst/gstreamer-sections.txt | 50 +++++++++++++++++---------------- gst/gstminiobject.c | 10 ++++++- gst/gstminiobject.h | 31 ++++++++++++++++++-- gst/gstpad.h | 4 ++- 5 files changed, 77 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5bf7d28b6f..fad723b29f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-10-28 Stefan Kost + + * docs/gst/gstreamer-sections.txt: + move some macros to private sections + * gst/gstminiobject.c: + * gst/gstminiobject.h: + add descriptions provided by ds and some more + * gst/gstpad.h: + mark macro as to be removed + 2005-10-28 Wim Taymans * docs/design/part-TODO.txt: diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 8ebf02afea..cd5790c56e 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -375,6 +375,7 @@ GST_CLOCK_GET_CLASS GST_TYPE_CLOCK_ENTRY_TYPE GST_TYPE_CLOCK_FLAGS GST_TYPE_CLOCK_RETURN +GST_TYPE_CLOCK_TIME gst_clock_get_type gst_clock_entry_type_get_type @@ -1069,10 +1070,6 @@ GST_OBJECT_FLAG_SET GST_OBJECT_FLAG_UNSET GST_OBJECT_NAME GST_OBJECT_PARENT -GST_LOCK -GST_TRYLOCK -GST_UNLOCK -GST_GET_LOCK GST_OBJECT_IS_DISPOSING GST_OBJECT_IS_FLOATING GST_OBJECT_REFCOUNT @@ -1081,6 +1078,10 @@ GST_CLASS_GET_LOCK GST_CLASS_LOCK GST_CLASS_TRYLOCK GST_CLASS_UNLOCK +GST_LOCK +GST_TRYLOCK +GST_UNLOCK +GST_GET_LOCK gst_object_set_name gst_object_get_name @@ -1264,15 +1265,6 @@ gst_pad_stop_task gst_pad_set_active -GST_PREROLL_BROADCAST -GST_PREROLL_GET_COND -GST_PREROLL_GET_LOCK -GST_PREROLL_LOCK -GST_PREROLL_SIGNAL -GST_PREROLL_TIMED_WAIT -GST_PREROLL_TRYLOCK -GST_PREROLL_UNLOCK -GST_PREROLL_WAIT GST_STREAM_GET_LOCK GST_STREAM_LOCK GST_STREAM_LOCK_FULL @@ -1349,6 +1341,16 @@ GST_PAD_QUERYFUNC GST_PAD_QUERYTYPEFUNC GST_PAD_SETCAPSFUNC GST_PAD_UNLINKFUNC + +GST_PREROLL_BROADCAST +GST_PREROLL_GET_COND +GST_PREROLL_GET_LOCK +GST_PREROLL_LOCK +GST_PREROLL_SIGNAL +GST_PREROLL_TIMED_WAIT +GST_PREROLL_TRYLOCK +GST_PREROLL_UNLOCK +GST_PREROLL_WAIT @@ -1357,7 +1359,6 @@ GST_PAD_UNLINKFUNC GstPadTemplate GstPadTemplate GstStaticPadTemplate -GST_IS_PAD_FAST GST_PAD_TEMPLATE_NAME_TEMPLATE GST_PAD_TEMPLATE_DIRECTION GST_PAD_TEMPLATE_PRESENCE @@ -1384,6 +1385,8 @@ GST_TYPE_PAD_TEMPLATE_FLAGS gst_pad_template_get_type gst_pad_template_flags_get_type gst_pad_template_pad_created + +GST_IS_PAD_FAST @@ -2249,16 +2252,6 @@ GstBaseSink GST_BASE_SINK_CLOCK GST_BASE_SINK_PAD -GST_LIVE_BROADCAST -GST_LIVE_GET_COND -GST_LIVE_GET_LOCK -GST_LIVE_LOCK -GST_LIVE_SIGNAL -GST_LIVE_TIMED_WAIT -GST_LIVE_TRYLOCK -GST_LIVE_UNLOCK -GST_LIVE_WAIT - GstBaseSinkClass GST_BASE_SINK @@ -2269,6 +2262,15 @@ GST_IS_BASE_SINK_CLASS GST_BASE_SINK_GET_CLASS gst_base_sink_get_type +GST_LIVE_BROADCAST +GST_LIVE_GET_COND +GST_LIVE_GET_LOCK +GST_LIVE_LOCK +GST_LIVE_SIGNAL +GST_LIVE_TIMED_WAIT +GST_LIVE_TRYLOCK +GST_LIVE_UNLOCK +GST_LIVE_WAIT diff --git a/gst/gstminiobject.c b/gst/gstminiobject.c index 2af3568413..70c2584485 100644 --- a/gst/gstminiobject.c +++ b/gst/gstminiobject.c @@ -18,7 +18,15 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - +/** + * SECTION:gstminiobject + * @short_description: Lightweight base class for the GStreamer object hierarchy + * + * #GstMiniObject is a baseclass like #GObject, but has been stripped down of + * features to be fast and small. + * It offers sub-classing and ref-counting in the same way as #GObject does. + * It has no properties and no signal-support though. + */ #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/gst/gstminiobject.h b/gst/gstminiobject.h index 9d6e09f0c3..b72a715391 100644 --- a/gst/gstminiobject.h +++ b/gst/gstminiobject.h @@ -40,8 +40,23 @@ G_BEGIN_DECLS typedef struct _GstMiniObject GstMiniObject; typedef struct _GstMiniObjectClass GstMiniObjectClass; -typedef GstMiniObject * (*GstMiniObjectCopyFunction) (const GstMiniObject *); -typedef void (*GstMiniObjectFinalizeFunction) (GstMiniObject *); +/** + * GstMiniObjectCopyFunction: + * @obj: MiniObject to copy + * + * Virtual function prototype for methods to create copies of instances. + * + * Returns: reference to cloned instance. + */ +typedef GstMiniObject * (*GstMiniObjectCopyFunction) (const GstMiniObject *obj); +/** + * GstMiniObjectFinalizeFunction: + * @obj: MiniObject to finalize + * + * Virtual function prototype for methods to free ressources used by + * mini-objects. + */ +typedef void (*GstMiniObjectFinalizeFunction) (GstMiniObject *obj); /** * GST_MINI_OBJECT_FLAGS: @@ -98,7 +113,19 @@ typedef enum GST_MINI_OBJECT_FLAG_LAST = (1<<4) } GstMiniObjectFlags; +/** + * GST_MINI_OBJECT_REFCOUNT: + * @obj: MiniObject get the refcount for. + * + * Get access to the reference count field of the mini-object. + */ #define GST_MINI_OBJECT_REFCOUNT(obj) ((GST_MINI_OBJECT_CAST(obj))->refcount) +/** + * GST_MINI_OBJECT_REFCOUNT_VALUE: + * @obj: MiniObject get the refcount value for. + * + * Get the reference count value of the mini-object. + */ #define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get (&(GST_MINI_OBJECT_CAST(obj))->refcount)) struct _GstMiniObject { diff --git a/gst/gstpad.h b/gst/gstpad.h index aef9b66b5f..00d99b32e5 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -40,12 +40,14 @@ G_BEGIN_DECLS */ #define GST_TYPE_PAD (gst_pad_get_type ()) #define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD)) -#define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_PAD) /* necessary? */ #define GST_IS_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD)) #define GST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad)) #define GST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD, GstPadClass)) #define GST_PAD_CAST(obj) ((GstPad*)(obj)) +/* FIXME: remove - its unused */ +#define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_PAD) + typedef struct _GstPad GstPad; typedef struct _GstPadClass GstPadClass;