From 9b3e3a2613c7c62e7fbf6a3147051ff70f229782 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 11 Sep 2005 12:57:36 +0000 Subject: [PATCH] various doc fixes Original commit message from CVS: various doc fixes --- ChangeLog | 22 +++++++ docs/gst/gstreamer-sections.txt | 14 ++-- docs/gst/gstreamer.types | 2 +- docs/gst/tmpl/gstpad.sgml | 8 +-- docs/gst/tmpl/gsttypes.sgml | 12 ++++ gst/base/gstadapter.h | 11 ++-- gst/base/gstbasesink.h | 4 +- gst/base/gstbasesrc.h | 2 +- gst/gstbin.h | 12 +--- gst/gstbuffer.h | 38 +---------- gst/gstbus.h | 6 +- gst/gstcaps.h | 28 +++----- gst/gstclock.h | 127 +++++++++++++++++-------------------- gst/gstelement.h | 16 +++++ gst/gstevent.h | 16 ++--- gst/gstmessage.h | 2 - gst/gstpad.h | 14 ++-- gst/gststructure.c | 2 - gst/registries/gstlibxmlregistry.h | 4 +- libs/gst/base/gstadapter.h | 11 ++-- libs/gst/base/gstbasesink.h | 4 +- libs/gst/base/gstbasesrc.h | 2 +- 22 files changed, 172 insertions(+), 185 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8d388a..8f508a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,28 @@ 2005-09-11 Thomas Vander Stichele * docs/gst/gstreamer-sections.txt: + * docs/gst/gstreamer.types: + * docs/gst/tmpl/gstpad.sgml: + * docs/gst/tmpl/gsttypes.sgml: + * gst/base/gstadapter.h: + * gst/base/gstbasesink.h: + * gst/base/gstbasesrc.h: + * gst/gstbin.h: + * gst/gstbuffer.h: + * gst/gstbus.h: + * gst/gstcaps.h: + * gst/gstclock.h: + * gst/gstelement.h: + * gst/gstevent.h: + * gst/gstmessage.h: + * gst/gstpad.h: + * gst/gststructure.c: + * gst/registries/gstlibxmlregistry.h: + various documentation fixes + +2005-09-11 Thomas Vander Stichele + + * docs/gst/gstreamer-sections.txt: * docs/gst/tmpl/gstvalue.sgml: rearrange gstvalue section * gst/gstutils.c: (gst_element_state_get_name): diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 45a9443..4ff7e47 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -412,10 +412,8 @@ GST_PLUGIN_EXPORT GstElement GstElementClass GstElementFlags -GST_NUM_STATES GST_STATE GST_STATE_PENDING -GST_STATE_TRANSITION GST_STATE_CHANGE_NULL_TO_READY GST_STATE_CHANGE_READY_TO_PAUSED GST_STATE_CHANGE_PAUSED_TO_PLAYING @@ -1958,17 +1956,20 @@ gst_type_find_factory_get_type gsttypes GstTypes GstState +GstStateChange GstStateChangeReturn GstRank -GST_TYPE_ELEMENT_STATE -GST_TYPE_ELEMENT_STATE_RETURN +GST_TYPE_STATE +GST_TYPE_STATE_CHANGE +GST_TYPE_STATE_CHANGE_RETURN GST_TYPE_RANK GST_PADDING GST_PADDING_INIT -gst_element_state_get_type -gst_element_state_return_get_type +gst_state_get_type +gst_state_change_get_type +gst_state_change_return_get_type gst_rank_get_type @@ -2212,7 +2213,6 @@ GST_TYPE_XML_REGISTRY gst_xml_registry_get_type -
gstenumtypes GstEnumTypes diff --git a/docs/gst/gstreamer.types b/docs/gst/gstreamer.types index 9f40bb8..f2f224f 100644 --- a/docs/gst/gstreamer.types +++ b/docs/gst/gstreamer.types @@ -36,7 +36,7 @@ gst_xml_get_type %registries -#include +#include gst_xml_registry_get_type diff --git a/docs/gst/tmpl/gstpad.sgml b/docs/gst/tmpl/gstpad.sgml index 67cb8c5..3c0d226 100644 --- a/docs/gst/tmpl/gstpad.sgml +++ b/docs/gst/tmpl/gstpad.sgml @@ -375,17 +375,15 @@ The direction of a pad. @GST_PAD_FLAG_LAST: - -The result of a pad link. - -@GST_PAD_LINK_OK: the link succeeded. + +@GST_PAD_LINK_OK: @GST_PAD_LINK_WRONG_HIERARCHY: @GST_PAD_LINK_WAS_LINKED: @GST_PAD_LINK_WRONG_DIRECTION: @GST_PAD_LINK_NOFORMAT: @GST_PAD_LINK_NOSCHED: -@GST_PAD_LINK_REFUSED: the link was refused. +@GST_PAD_LINK_REFUSED: diff --git a/docs/gst/tmpl/gsttypes.sgml b/docs/gst/tmpl/gsttypes.sgml index ddcb8a3..136d62e 100644 --- a/docs/gst/tmpl/gsttypes.sgml +++ b/docs/gst/tmpl/gsttypes.sgml @@ -28,6 +28,18 @@ various global enums and constants @GST_STATE_PAUSED: @GST_STATE_PLAYING: + + + + + +@GST_STATE_CHANGE_NULL_TO_READY: +@GST_STATE_CHANGE_READY_TO_PAUSED: +@GST_STATE_CHANGE_PAUSED_TO_PLAYING: +@GST_STATE_CHANGE_PLAYING_TO_PAUSED: +@GST_STATE_CHANGE_PAUSED_TO_READY: +@GST_STATE_CHANGE_READY_TO_NULL: + diff --git a/gst/base/gstadapter.h b/gst/base/gstadapter.h index c12eec9..cf92a8d 100644 --- a/gst/base/gstadapter.h +++ b/gst/base/gstadapter.h @@ -28,13 +28,16 @@ G_BEGIN_DECLS #define GST_TYPE_ADAPTER \ (gst_adapter_get_type()) #define GST_ADAPTER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ADAPTER,GstAdapter)) + (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_ADAPTER, GstAdapter)) #define GST_ADAPTER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ADAPTER,GstAdapterClass)) + (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_ADAPTER, GstAdapterClass)) +#define GST_ADAPTER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_ADAPTER, GstAdapterClass)) + #define GST_IS_ADAPTER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ADAPTER)) + (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_ADAPTER)) #define GST_IS_ADAPTER_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ADAPTER)) + (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_ADAPTER)) typedef struct _GstAdapter GstAdapter; typedef struct _GstAdapterClass GstAdapterClass; diff --git a/gst/base/gstbasesink.h b/gst/base/gstbasesink.h index 8e51c59..053ab80 100644 --- a/gst/base/gstbasesink.h +++ b/gst/base/gstbasesink.h @@ -39,14 +39,14 @@ G_BEGIN_DECLS * GST_BASE_SINK_CLOCK: * @obj: base sink instance * - * Returns the pointer to the #GstClock object of the element. + * Gives the pointer to the #GstClock object of the element. */ #define GST_BASE_SINK_CLOCK(obj) (GST_BASE_SINK (obj)->clock) /** * GST_BASE_SINK_PAD: * @obj: base sink instance * - * Returns the pointer to the #GstPad object of the element. + * Gives the pointer to the #GstPad object of the element. */ #define GST_BASE_SINK_PAD(obj) (GST_BASE_SINK (obj)->sinkpad) diff --git a/gst/base/gstbasesrc.h b/gst/base/gstbasesrc.h index b26e345..9824fc0 100644 --- a/gst/base/gstbasesrc.h +++ b/gst/base/gstbasesrc.h @@ -48,7 +48,7 @@ typedef struct _GstBaseSrcClass GstBaseSrcClass; * GST_BASE_SRC_PAD: * @obj: base source instance * - * Returns the pointer to the #GstPad object of the element. + * Gives the pointer to the #GstPad object of the element. */ #define GST_BASE_SRC_PAD(obj) (GST_BASE_SRC (obj)->srcpad) diff --git a/gst/gstbin.h b/gst/gstbin.h index 7786b08..588993a 100644 --- a/gst/gstbin.h +++ b/gst/gstbin.h @@ -54,16 +54,14 @@ typedef enum { GST_BIN_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 5 } GstBinFlags; -typedef struct _GstBin GstBin; -typedef struct _GstBinClass GstBinClass; +typedef struct _GstBin GstBin; +typedef struct _GstBinClass GstBinClass; /** * GST_BIN_NUMCHILDREN: * @bin: the bin to get the number of children from * * Gets the number of children a bin manages. - * - * Returns: the number of child objects */ #define GST_BIN_NUMCHILDREN(bin) (GST_BIN_CAST(bin)->numchildren) /** @@ -71,17 +69,13 @@ typedef struct _GstBinClass GstBinClass; * @bin: the bin to get the list with children from * * Gets the list with children a bin manages. - * - * Returns: the children list */ #define GST_BIN_CHILDREN(bin) (GST_BIN_CAST(bin)->children) /** * GST_BIN_CHILDREN_COOKIE: - * @bin: the bin to get the children cookie from + * @bin: the bin to get the children cookie from * * Gets the children cookie that watches the children list. - * - * Returns: the children cookie */ #define GST_BIN_CHILDREN_COOKIE(bin) (GST_BIN_CAST(bin)->children_cookie) diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index 43d0a7a..4dba10d 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -52,9 +52,7 @@ typedef struct _GstBufferClass GstBufferClass; * GST_BUFFER_FLAGS: * @buf: a #GstBuffer to retrieve the flags from. * - * Gets the flags from this buffer. - * - * Returns: the set of #GstBufferFlag items + * Gets the #GstBufferFlag flags from this buffer. */ #define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf) /** @@ -63,8 +61,6 @@ typedef struct _GstBufferClass GstBufferClass; * @flag: the #GstBufferFlag to check. * * Gives the status of a given flag of a buffer. - * - * Returns: %TRUE if flag is set. */ #define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag) /** @@ -89,8 +85,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buf: a #GstBuffer to get data pointer of. * * Retrieves a pointer to the data element of this buffer. - * - * Returns: the pointer to the actual data contents of the buffer. */ #define GST_BUFFER_DATA(buf) (GST_BUFFER_CAST(buf)->data) /** @@ -98,8 +92,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buf: a #GstBuffer to get data size of. * * Gets the size of the data in this buffer. - * - * Returns: the buffer size in bytes */ #define GST_BUFFER_SIZE(buf) (GST_BUFFER_CAST(buf)->size) /** @@ -107,8 +99,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buf: a #GstBuffer to get the timestamp of.: * * Gets the timestamp for this buffer. - * - * Returns: the timestamp for this buffer */ #define GST_BUFFER_TIMESTAMP(buf) (GST_BUFFER_CAST(buf)->timestamp) /** @@ -117,8 +107,6 @@ typedef struct _GstBufferClass GstBufferClass; * * Gets the duration in nanoseconds of the data in the buffer. * Value will be %GST_CLOCK_TIME_NONE if the duration is unknown. - * - * Returns: the duration of the buffer */ #define GST_BUFFER_DURATION(buf) (GST_BUFFER_CAST(buf)->duration) /** @@ -126,8 +114,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buf: a #GstBuffer to get the caps of. * * Gets the caps for this buffer. - * - * Returns: the #GstCaps for this buffer */ #define GST_BUFFER_CAPS(buf) (GST_BUFFER_CAST(buf)->caps) /** @@ -135,8 +121,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buf: a #GstBuffer to get the offset of. * * Gets the offset in the source file of the beginning of this buffer. - * - * Returns: the start offset for this buffer */ #define GST_BUFFER_OFFSET(buf) (GST_BUFFER_CAST(buf)->offset) /** @@ -144,8 +128,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buf: a #GstBuffer to get the offset of. * * Gets the offset in the source file of the end of this buffer. - * - * Returns: the end offset for this buffer */ #define GST_BUFFER_OFFSET_END(buf) (GST_BUFFER_CAST(buf)->offset_end) /** @@ -167,10 +149,8 @@ typedef struct _GstBufferClass GstBufferClass; /** * GST_BUFFER_DURATION_IS_VALID: * @buffer: the #GstBuffer to check for the duration - * - * Tests if the duration is known. * - * Returns: %TRUE for success + * Tests if the duration is known. */ #define GST_BUFFER_DURATION_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer))) /** @@ -178,8 +158,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buffer: the #GstBuffer to check for the timestamp * * Tests if the timestamp is known. - * - * Returns: %TRUE for success */ #define GST_BUFFER_TIMESTAMP_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buffer))) /** @@ -187,8 +165,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buffer: the #GstBuffer to check for the start offset * * Tests if the start offset is known. - * - * Returns: %TRUE for success */ #define GST_BUFFER_OFFSET_IS_VALID(buffer) (GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE) /** @@ -196,8 +172,6 @@ typedef struct _GstBufferClass GstBufferClass; * @buffer: the #GstBuffer to check for the end offset * * Tests if the end offset is known. - * - * Returns: %TRUE for success */ #define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE) @@ -306,8 +280,6 @@ G_STMT_START { \ * * Copies the given buffer using the copy function of the parent #GstData * structure. - * - * Returns: a new #GstBuffer copy of the buffer. */ #define gst_buffer_copy(buf) GST_BUFFER_CAST (gst_mini_object_copy (GST_MINI_OBJECT (buf))) /** @@ -315,17 +287,13 @@ G_STMT_START { \ * @buf: a #GstBuffer to check * * Tests if you can safely write data into a buffer's data array. - * - * Returns: %TRUE if buffer is writable */ #define gst_buffer_is_writable(buf) gst_mini_object_is_writable (GST_MINI_OBJECT (buf)) /** * gst_buffer_make_writable: * @buf: a #GstBuffer to make writable * - * Makes a buffer writable. - * - * Returns: a #GstBuffer that is writable + * Makes a writable buffer from the given buffer. */ #define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT (buf))) diff --git a/gst/gstbus.h b/gst/gstbus.h index 54eb2c6..50c6877 100644 --- a/gst/gstbus.h +++ b/gst/gstbus.h @@ -55,7 +55,7 @@ typedef enum /** * GstBusSyncHandler: * @bus: the #GstBus that sent the message - * @messages: the #GstMessage + * @message: the #GstMessage * @data: user data that has been given, when registering the handler * * Handler will be invoked synchronously, when a new message has been injected @@ -63,11 +63,11 @@ typedef enum * * Returns: #GstBusSyncReply stating what to do with the message */ -typedef GstBusSyncReply (*GstBusSyncHandler) (GstBus * bus, GstMessage * message, gpointer data); +typedef GstBusSyncReply (*GstBusSyncHandler) (GstBus * bus, GstMessage * message, gpointer data); /** * GstBusHandler: * @bus: the #GstBus that sent the message - * @messages: the #GstMessage + * @message: the #GstMessage * @data: user data that has been given, when registering the handler * * Handler will be invoked asynchronously, after a new message has been injected diff --git a/gst/gstcaps.h b/gst/gstcaps.h index e687a36..b397e8a 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -54,19 +54,15 @@ G_BEGIN_DECLS /** * GST_STATIC_CAPS_ANY: * - * Creates a static caps that matches anything. This can be used in pad - * templates. - * - * Returns: a new #GstCaps instance + * Creates a new #GstCaps static caps that matches anything. + * This can be used in pad templates. */ #define GST_STATIC_CAPS_ANY GST_STATIC_CAPS("ANY") /** * GST_STATIC_CAPS_NONE: * - * Creates a static caps that matches nothing. This can be used in pad - * templates. - * - * Returns: a new #GstCaps instance + * Creates a new #GstCaps static caps that matches nothing. + * This can be used in pad templates. */ #define GST_STATIC_CAPS_NONE GST_STATIC_CAPS("NONE") @@ -74,20 +70,18 @@ G_BEGIN_DECLS * GST_CAPS_IS_SIMPLE: * @caps: the #GstCaps instance to check * - * Convinience macro that checks if the number of structures in the gives caps + * Convenience macro that checks if the number of structures in the given caps * is exactly one. - * - * Returns: %TRUE if caps has exactly one structure */ #define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1) #ifndef GST_DISABLE_DEPRECATED /** * GST_DEBUG_CAPS: - * @string: a string the should be prepend to the caps data. + * @string: a string that should be prepended to the caps data. * @caps: the #GstCaps instance to print * - * Convinience macro for prining out the contents of caps with GST_DEBUG(). + * Convenience macro for printing out the contents of caps with GST_DEBUG(). * * Deprecated: do not use anymore */ @@ -97,12 +91,10 @@ G_BEGIN_DECLS /** * GST_STATIC_CAPS: - * @caps: the string describing the caps. - * - * Creates a static caps from an input string. This can be used in pad - * templates. + * @string: the string describing the caps * - * Returns: a new #GstCaps instance + * Creates a new #GstCaps static caps from an input string. + * This can be used in pad templates. */ #define GST_STATIC_CAPS(string) \ { \ diff --git a/gst/gstclock.h b/gst/gstclock.h index 7f209a4..6ac1a03 100644 --- a/gst/gstclock.h +++ b/gst/gstclock.h @@ -28,46 +28,44 @@ G_BEGIN_DECLS /* --- standard type macros --- */ -#define GST_TYPE_CLOCK (gst_clock_get_type ()) -#define GST_CLOCK(clock) (G_TYPE_CHECK_INSTANCE_CAST ((clock), GST_TYPE_CLOCK, GstClock)) -#define GST_IS_CLOCK(clock) (G_TYPE_CHECK_INSTANCE_TYPE ((clock), GST_TYPE_CLOCK)) -#define GST_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_CAST ((cclass), GST_TYPE_CLOCK, GstClockClass)) -#define GST_IS_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_TYPE ((cclass), GST_TYPE_CLOCK)) -#define GST_CLOCK_GET_CLASS(clock) (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass)) -#define GST_CLOCK_CAST(clock) ((GstClock*)(clock)) +#define GST_TYPE_CLOCK (gst_clock_get_type ()) +#define GST_CLOCK(clock) (G_TYPE_CHECK_INSTANCE_CAST ((clock), GST_TYPE_CLOCK, GstClock)) +#define GST_IS_CLOCK(clock) (G_TYPE_CHECK_INSTANCE_TYPE ((clock), GST_TYPE_CLOCK)) +#define GST_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_CAST ((cclass), GST_TYPE_CLOCK, GstClockClass)) +#define GST_IS_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_TYPE ((cclass), GST_TYPE_CLOCK)) +#define GST_CLOCK_GET_CLASS(clock) (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass)) +#define GST_CLOCK_CAST(clock) ((GstClock*)(clock)) /** * GstClockTime: * * A datatype to hold a time, measured in nanoseconds. */ -typedef guint64 GstClockTime; +typedef guint64 GstClockTime; /** * GstClockTimeDiff: * * A datatype to hold a timedifference, measured in nanoseconds. */ -typedef gint64 GstClockTimeDiff; +typedef gint64 GstClockTimeDiff; /** * GstClockID: * * A detatype to hold the handle to an outstanding async clock callback */ -typedef gpointer GstClockID; +typedef gpointer GstClockID; /** * GST_CLOCK_TIME_NONE: * * Constant to define an undefined clock time */ -#define GST_CLOCK_TIME_NONE ((GstClockTime)-1) +#define GST_CLOCK_TIME_NONE ((GstClockTime) -1) /** * GST_CLOCK_TIME_IS_VALID: * @time: clock time to validate * - * Tests if a clock-time is defined. - * - * Returns: %TRUE if clocktime is safe to use. + * Tests if a given #GstClockTime represents a valid defined time. */ #define GST_CLOCK_TIME_IS_VALID(time) ((time) != GST_CLOCK_TIME_NONE) @@ -101,19 +99,15 @@ typedef gpointer GstClockID; * @s: the first time * @e: the second time * - * Calculate a difference between two clock times. - * - * Returns: the difference as #GstClockTimeDiff + * Calculate a difference between two clock times as a #GstClockTimeDiff. */ -#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s) - (e)) +#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s) - (e)) /** * GST_TIMEVAL_TO_TIME: * @tv: the timeval to convert * - * Convert a GTimeVal to a GstClockTime - * - * Returns: the result as #GstClockTime + * Convert a GTimeVal to a #GstClockTime. */ #define GST_TIMEVAL_TO_TIME(tv) ((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND) /** @@ -124,7 +118,7 @@ typedef gpointer GstClockID; * Convert a GstClockTime to a GTimeVal */ #define GST_TIME_TO_TIMEVAL(t,tv) \ -G_STMT_START { \ +G_STMT_START { \ (tv).tv_sec = (t) / GST_SECOND; \ (tv).tv_usec = ((t) - (tv).tv_sec * GST_SECOND) / GST_USECOND; \ } G_STMT_END @@ -133,9 +127,7 @@ G_STMT_START { \ * GST_TIMESPEC_TO_TIME: * @ts: the timespec to convert * - * Convert a struct timespec (see man pselect) to a GstClockTime - * - * Returns: the result as #GstClockTime + * Convert a struct timespec (see man pselect) to a #GstClockTime. */ #define GST_TIMESPEC_TO_TIME(ts) ((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND) /** @@ -143,10 +135,10 @@ G_STMT_START { \ * @t: The GstClockTime to convert * @ts: The target timespec * - * Convert a GstClockTime to a struct timespec (see man pselect) + * Convert a #GstClockTime to a struct timespec (see man pselect) */ #define GST_TIME_TO_TIMESPEC(t,ts) \ -G_STMT_START { \ +G_STMT_START { \ (ts).tv_sec = (t) / GST_SECOND; \ (ts).tv_nsec = ((t) - (ts).tv_sec * GST_SECOND) / GST_NSECOND; \ } G_STMT_END @@ -166,9 +158,9 @@ G_STMT_START { \ */ #define GST_CLOCK_ENTRY_TRACE_NAME "GstClockEntry" -typedef struct _GstClockEntry GstClockEntry; -typedef struct _GstClock GstClock; -typedef struct _GstClockClass GstClockClass; +typedef struct _GstClockEntry GstClockEntry; +typedef struct _GstClock GstClock; +typedef struct _GstClockClass GstClockClass; /* --- prototype for async callbacks --- */ /** @@ -182,7 +174,7 @@ typedef struct _GstClockClass GstClockClass; * * Returns: %TRUE or %FALSE (currently unused) */ -typedef gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, +typedef gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, GstClockID id, gpointer user_data); /** * GstClockReturn: @@ -199,11 +191,11 @@ typedef gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, typedef enum { GST_CLOCK_OK = 0, - GST_CLOCK_EARLY = 1, + GST_CLOCK_EARLY = 1, GST_CLOCK_UNSCHEDULED = 2, GST_CLOCK_BUSY = 3, - GST_CLOCK_BADTIME = 4, - GST_CLOCK_ERROR = 5, + GST_CLOCK_BADTIME = 4, + GST_CLOCK_ERROR = 5, GST_CLOCK_UNSUPPORTED = 6, } GstClockReturn; @@ -270,24 +262,24 @@ typedef enum { * an entry. */ struct _GstClockEntry { - gint refcount; + gint refcount; /*< protected >*/ - GstClock *clock; - GstClockEntryType type; - GstClockTime time; - GstClockTime interval; - GstClockReturn status; - GstClockCallback func; + GstClock *clock; + GstClockEntryType type; + GstClockTime time; + GstClockTime interval; + GstClockReturn status; + GstClockCallback func; gpointer user_data; }; /** * GstClockFlags: - * @GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC: This clock can do a single sync timeut request - * @GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC: This clock can do a single async timeout request - * @GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC: This clock can do sync periodic timeout requests - * @GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC: This clock can do async periodic timeout callbacks - * @GST_CLOCK_FLAG_CAN_SET_RESOLUTION: The resolution of this clock can be changed + * @GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC: clock can do a single sync timeout request + * @GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC: clock can do a single async timeout request + * @GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC: clock can do sync periodic timeout requests + * @GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC: clock can do async periodic timeout callbacks + * @GST_CLOCK_FLAG_CAN_SET_RESOLUTION: clock's resolution can be changed * * The capabilities of this clock */ @@ -301,9 +293,9 @@ typedef enum { /** * GST_CLOCK_FLAGS: - * @entry: the entry to query + * @clock: the clock to query * - * Get the clock flags + * Gets the #GstClockFlags clock flags. */ #define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags) @@ -312,13 +304,8 @@ typedef enum { #define GST_CLOCK_TIMED_WAIT(clock,tv) g_cond_timed_wait(GST_CLOCK_COND(clock),GST_GET_LOCK(clock),tv) #define GST_CLOCK_BROADCAST(clock) g_cond_broadcast(GST_CLOCK_COND(clock)) -/** - * GstClock: - * @stats: Boolean property to activate stat generation on the clock. - * - */ struct _GstClock { - GstObject object; + GstObject object; /*< public >*/ GstClockFlags flags; @@ -327,7 +314,7 @@ struct _GstClock { GstClockTime adjust; GstClockTime last_time; GList *entries; - GCond *entries_changed; + GCond *entries_changed; /*< private >*/ guint64 resolution; @@ -342,21 +329,21 @@ struct _GstClockClass { /*< protected >*/ /* vtable */ guint64 (*change_resolution) (GstClock *clock, guint64 old_resolution, - guint64 new_resolution); + guint64 new_resolution); guint64 (*get_resolution) (GstClock *clock); - GstClockTime (*get_internal_time) (GstClock *clock); + GstClockTime (*get_internal_time) (GstClock *clock); /* waiting on an ID */ - GstClockReturn (*wait) (GstClock *clock, GstClockEntry *entry); + GstClockReturn (*wait) (GstClock *clock, GstClockEntry *entry); GstClockReturn (*wait_async) (GstClock *clock, GstClockEntry *entry); - void (*unschedule) (GstClock *clock, GstClockEntry *entry); - + void (*unschedule) (GstClock *clock, GstClockEntry *entry); + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; -GType gst_clock_get_type (void); +GType gst_clock_get_type (void); guint64 gst_clock_set_resolution (GstClock *clock, guint64 resolution); guint64 gst_clock_get_resolution (GstClock *clock); @@ -368,26 +355,26 @@ GstClockTime gst_clock_adjust_unlocked (GstClock *clock, GstClockTime internal) /* creating IDs that can be used to get notifications */ -GstClockID gst_clock_new_single_shot_id (GstClock *clock, - GstClockTime time); -GstClockID gst_clock_new_periodic_id (GstClock *clock, +GstClockID gst_clock_new_single_shot_id (GstClock *clock, + GstClockTime time); +GstClockID gst_clock_new_periodic_id (GstClock *clock, GstClockTime start_time, - GstClockTime interval); + GstClockTime interval); /* reference counting */ GstClockID gst_clock_id_ref (GstClockID id); void gst_clock_id_unref (GstClockID id); /* operations on IDs */ -gint gst_clock_id_compare_func (gconstpointer id1, gconstpointer id2); +gint gst_clock_id_compare_func (gconstpointer id1, gconstpointer id2); GstClockTime gst_clock_id_get_time (GstClockID id); -GstClockReturn gst_clock_id_wait (GstClockID id, +GstClockReturn gst_clock_id_wait (GstClockID id, GstClockTimeDiff *jitter); -GstClockReturn gst_clock_id_wait_async (GstClockID id, - GstClockCallback func, +GstClockReturn gst_clock_id_wait_async (GstClockID id, + GstClockCallback func, gpointer user_data); -void gst_clock_id_unschedule (GstClockID id); +void gst_clock_id_unschedule (GstClockID id); G_END_DECLS diff --git a/gst/gstelement.h b/gst/gstelement.h index 22f9794..1f4c9f8 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -64,6 +64,13 @@ GST_EXPORT GType _gst_element_type; #define GST_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_ELEMENT, GstElementClass)) #define GST_ELEMENT_CAST(obj) ((GstElement*)(obj)) +/** + * GstStateChangeReturn: + * @GST_STATE_CHANGE_FAILURE : the state change failed + * @GST_STATE_CHANGE_SUCCESS : the state change succeeded + * @GST_STATE_CHANGE_ASYNC : the state change will happen asynchronously + * @GST_STATE_CHANGE_NO_PREROLL: the state change cannot be prerolled + */ typedef enum { GST_STATE_CHANGE_FAILURE = 0, GST_STATE_CHANGE_SUCCESS = 1, @@ -98,6 +105,15 @@ _gst_element_get_state_change (GstElement *e) #endif /* FIXME: How to deal with lost_state ? */ +/** + * GstStateChange: + * @GST_STATE_CHANGE_NULL_TO_READY : state change from NULL to READY + * @GST_STATE_CHANGE_READY_TO_PAUSED : state change from READY to PAUSED + * @GST_STATE_CHANGE_PAUSED_TO_PLAYING: state change from PAUSED to PLAYING + * @GST_STATE_CHANGE_PLAYING_TO_PAUSED: state change from PLAYING to PAUSED + * @GST_STATE_CHANGE_PAUSED_TO_READY : state change from PAUSED to READY + * @GST_STATE_CHANGE_READY_TO_NULL : state change from READY to NULL + */ typedef enum /*< flags=0 >*/ { GST_STATE_CHANGE_NULL_TO_READY = 1<<(GST_STATE_NULL+8) | 1<type) + /** * GST_EVENT_TIMESTAMP: * @event: the event to query * - * Get the timestamp of the event. - * - * Returns: the timestamp of the given event + * Get the #GstClockTime timestamp of the event. */ #define GST_EVENT_TIMESTAMP(event) (GST_EVENT(event)->timestamp) + /** * GST_EVENT_SRC: * @event: the event to query * - * The source object that generated this event. - * - * Returns: the source #GstObject for the given event + * The source #GstObject that generated this event. */ #define GST_EVENT_SRC(event) (GST_EVENT(event)->src) @@ -232,8 +228,6 @@ GType gst_event_get_type (void); * @ev: The event to copy * * Copy the event using the event specific copy function. - * - * Returns: A new event that is a copy of the given input event */ #define gst_event_copy(ev) GST_EVENT (gst_mini_object_copy (GST_MINI_OBJECT (ev))) diff --git a/gst/gstmessage.h b/gst/gstmessage.h index 6325a5e..90c8b1e 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -156,8 +156,6 @@ GstMessage * gst_message_new_custom (GstMessageType type, * handled by other message-specific functions to pass a message to the * app. The structure field can be NULL. * - * Returns: The new message. - * * MT safe. */ #define gst_message_new_application(src, str) \ diff --git a/gst/gstpad.h b/gst/gstpad.h index 793610d..aa87e05 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -58,13 +58,13 @@ typedef struct _GstStaticPadTemplate GstStaticPadTemplate; /** * GstPadLinkReturn: - * @GST_PAD_LINK_OK : link ok - * @GST_PAD_LINK_WRONG_HIERARCHY: pads have no common grandparent - * @GST_PAD_LINK_WAS_LINKED : pad was already linked - * @GST_PAD_LINK_WRONG_DIRECTION: pads have wrong direction - * @GST_PAD_LINK_NOFORMAT : pads do not have common format - * @GST_PAD_LINK_NOSCHED : pads cannot cooperate in scheduling - * @GST_PAD_LINK_REFUSED : refused for some reason + * @GST_PAD_LINK_OK : link succeeded + * @GST_PAD_LINK_WRONG_HIERARCHY: pads have no common grandparent + * @GST_PAD_LINK_WAS_LINKED : pad was already linked + * @GST_PAD_LINK_WRONG_DIRECTION: pads have wrong direction + * @GST_PAD_LINK_NOFORMAT : pads do not have common format + * @GST_PAD_LINK_NOSCHED : pads cannot cooperate in scheduling + * @GST_PAD_LINK_REFUSED : refused for some reason */ typedef enum { GST_PAD_LINK_OK = 0, diff --git a/gst/gststructure.c b/gst/gststructure.c index d1699ae..26e3a80 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -191,8 +191,6 @@ gst_structure_new_valist (const gchar * name, * determine whether a structure is mutable or not. This function should only be * called by code implementing parent objects of GstStructure, as described in * the MT Refcounting section of the design documents. - * - * Returns: a new #GstStructure. */ void gst_structure_set_parent_refcount (GstStructure * structure, int *refcount) diff --git a/gst/registries/gstlibxmlregistry.h b/gst/registries/gstlibxmlregistry.h index 20d1f14..72661e8 100644 --- a/gst/registries/gstlibxmlregistry.h +++ b/gst/registries/gstlibxmlregistry.h @@ -34,6 +34,8 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_XML_REGISTRY,GstXMLRegistry)) #define GST_XML_REGISTRY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_XML_REGISTRY,GstXMLRegistryClass)) +#define GST_XML_REGISTRY_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_XML_REGISTRY, GstXMLRegistryClass)) #define GST_IS_XML_REGISTRY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XML_REGISTRY)) #define GST_IS_XML_REGISTRY_CLASS(obj) \ @@ -102,7 +104,7 @@ struct _GstXMLRegistryClass { /* normal GObject stuff */ GType gst_xml_registry_get_type (void); -GstRegistry* gst_xml_registry_new (const gchar *name, const gchar *location); +GstRegistry* gst_xml_registry_new (const gchar *name, const gchar *location); G_END_DECLS diff --git a/libs/gst/base/gstadapter.h b/libs/gst/base/gstadapter.h index c12eec9..cf92a8d 100644 --- a/libs/gst/base/gstadapter.h +++ b/libs/gst/base/gstadapter.h @@ -28,13 +28,16 @@ G_BEGIN_DECLS #define GST_TYPE_ADAPTER \ (gst_adapter_get_type()) #define GST_ADAPTER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ADAPTER,GstAdapter)) + (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_ADAPTER, GstAdapter)) #define GST_ADAPTER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ADAPTER,GstAdapterClass)) + (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_ADAPTER, GstAdapterClass)) +#define GST_ADAPTER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_ADAPTER, GstAdapterClass)) + #define GST_IS_ADAPTER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ADAPTER)) + (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_ADAPTER)) #define GST_IS_ADAPTER_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ADAPTER)) + (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_ADAPTER)) typedef struct _GstAdapter GstAdapter; typedef struct _GstAdapterClass GstAdapterClass; diff --git a/libs/gst/base/gstbasesink.h b/libs/gst/base/gstbasesink.h index 8e51c59..053ab80 100644 --- a/libs/gst/base/gstbasesink.h +++ b/libs/gst/base/gstbasesink.h @@ -39,14 +39,14 @@ G_BEGIN_DECLS * GST_BASE_SINK_CLOCK: * @obj: base sink instance * - * Returns the pointer to the #GstClock object of the element. + * Gives the pointer to the #GstClock object of the element. */ #define GST_BASE_SINK_CLOCK(obj) (GST_BASE_SINK (obj)->clock) /** * GST_BASE_SINK_PAD: * @obj: base sink instance * - * Returns the pointer to the #GstPad object of the element. + * Gives the pointer to the #GstPad object of the element. */ #define GST_BASE_SINK_PAD(obj) (GST_BASE_SINK (obj)->sinkpad) diff --git a/libs/gst/base/gstbasesrc.h b/libs/gst/base/gstbasesrc.h index b26e345..9824fc0 100644 --- a/libs/gst/base/gstbasesrc.h +++ b/libs/gst/base/gstbasesrc.h @@ -48,7 +48,7 @@ typedef struct _GstBaseSrcClass GstBaseSrcClass; * GST_BASE_SRC_PAD: * @obj: base source instance * - * Returns the pointer to the #GstPad object of the element. + * Gives the pointer to the #GstPad object of the element. */ #define GST_BASE_SRC_PAD(obj) (GST_BASE_SRC (obj)->srcpad) -- 2.7.4