From c73b03243ac5c823f2769e54f610cdee4454d5e4 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Sat, 27 Aug 2005 10:57:00 +0000 Subject: [PATCH] docs/design/part-messages.txt: update info Original commit message from CVS: * docs/design/part-messages.txt: update info * docs/gst/tmpl/.cvsignore: * docs/gst/tmpl/gstcaps.sgml: * docs/gst/tmpl/gstclock.sgml: * gst/gstbus.c: * gst/gstcaps.c: * gst/gstcaps.h: * gst/gstclock.c: * gst/gstclock.h: * gst/gstmessage.c: added descriptions for bus and message inline caps and clock docs --- ChangeLog | 16 ++ docs/design/part-messages.txt | 2 +- docs/gst/tmpl/.gitignore | 2 + docs/gst/tmpl/gstcaps.sgml | 464 ------------------------------------------ docs/gst/tmpl/gstclock.sgml | 432 --------------------------------------- gst/gstbus.c | 32 +++ gst/gstcaps.c | 6 + gst/gstcaps.h | 60 ++++++ gst/gstclock.c | 15 +- gst/gstclock.h | 193 +++++++++++++++++- gst/gstmessage.c | 13 ++ 11 files changed, 333 insertions(+), 902 deletions(-) delete mode 100644 docs/gst/tmpl/gstcaps.sgml delete mode 100644 docs/gst/tmpl/gstclock.sgml diff --git a/ChangeLog b/ChangeLog index 216b2bd..b89e791 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,21 @@ 2005-08-27 Stefan Kost + * docs/design/part-messages.txt: + update info + * docs/gst/tmpl/.cvsignore: + * docs/gst/tmpl/gstcaps.sgml: + * docs/gst/tmpl/gstclock.sgml: + * gst/gstbus.c: + * gst/gstcaps.c: + * gst/gstcaps.h: + * gst/gstclock.c: + * gst/gstclock.h: + * gst/gstmessage.c: + added descriptions for bus and message + inline caps and clock docs + +2005-08-27 Stefan Kost + * gst/gstmessage.c: * gst/gstmessage.h: doc fixes diff --git a/docs/design/part-messages.txt b/docs/design/part-messages.txt index baa962e..f3de69c 100644 --- a/docs/design/part-messages.txt +++ b/docs/design/part-messages.txt @@ -4,7 +4,7 @@ Messages Messages are refcounted lightweight objects to signal the application of pipeline events. -Messages are implemented as a subclass of GstData with a generic +Messages are implemented as a subclass of GstMiniObject with a generic GstStructure as the content. This allows for writing custom messages without requiring an API change while allowing a wide range of different types of messages. diff --git a/docs/gst/tmpl/.gitignore b/docs/gst/tmpl/.gitignore index f66142e..7aaa1e5 100644 --- a/docs/gst/tmpl/.gitignore +++ b/docs/gst/tmpl/.gitignore @@ -8,7 +8,9 @@ gstbasetransform.sgml gstbin.sgml gstbuffer.sgml gstbus.sgml +gstcaps.sgml gstcheck.sgml +gstclock.sgml gstcollectpads.sgml gstevent.sgml gstfakesrc.sgml diff --git a/docs/gst/tmpl/gstcaps.sgml b/docs/gst/tmpl/gstcaps.sgml deleted file mode 100644 index 529cb15..0000000 --- a/docs/gst/tmpl/gstcaps.sgml +++ /dev/null @@ -1,464 +0,0 @@ - -GstCaps - - -Structure describing sets of media formats - - - - - - - - - - - - - - - - - - - -@type: -@refcount: -@flags: -@structs: - - - - - - -@caps: -@string: - - - -Flags that this caps has no specific content, but can contain anything. - - - - - - -Means that the element/pad can output 'anything'. Useful for elements -that output unknown media, such as filesrc. - - - - - - -The opposite of GST_CAPS_ANY: it means that the pad/element outputs an -undefined media type that can not be detected. - - - - - - - - - -@caps: - - - - - - - -@caps: - - - - -Creates a static caps that matches anything. This can be used in pad -templates. - - -@Returns: a new #GstCaps instance - - - - -Creates a static caps that matches nothing. This can be used in pad -templates. - - -@Returns: a new #GstCaps instance - - - - -Convinience macro that checks if the number of structures in the gives caps is -exactly one. - - -@caps: the #GstCaps instance to check - - - - -Convinience macro for prining out the contents of caps with GST_DEBUG(). - - -@string: a string the should be prepend to the caps data. -@caps: the caps to print - - - - -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 - - - - - - - -@Returns: - - - - - - - -@Returns: - - - - - - - -@media_type: -@fieldname: -@Varargs: -@Returns: - - - - - - - -@struct1: -@Varargs: -@Returns: - - - - - - - -@structure: -@var_args: -@Returns: - - - - - - - -@caps: -@Returns: - - - - - - - -@caps: -@nth: -@Returns: - - - - - - - -@static_caps: -@Returns: - -@caps: - - - - - - - -@caps1: -@caps2: - - - - - - - -@caps: -@structure: - -@caps1: - - - - - - - -@caps: -@Returns: - - - - - - - -@caps: -@index: -@Returns: - - - - - - - -@caps: -@field: -@Varargs: - - - - - - - -@caps: -@field: -@varargs: - - - - - - - -@caps: -@Returns: - - - - - - - -@caps: -@Returns: - - - - - - - -@caps: -@Returns: - - - - - - - -@caps1: -@caps2: -@Returns: - - - - - - - -@caps1: -@caps2: -@Returns: - - - - - - - -@caps1: -@caps2: -@Returns: - - - - - - - -@subset: -@superset: -@Returns: - - - - - - - -@caps1: -@caps2: -@Returns: - - - - - - - -@caps1: -@caps2: -@Returns: - - - - - - - -@caps: -@Returns: - - - - - - - -@caps: -@Returns: - - - - - - - -@caps: -@parent: -@Returns: - - - - - - - -@parent: -@Returns: - - - - - - - -@caps: -@newcaps: - - - - - - - -@caps: -@Returns: - - - - - - - -@string: -@Returns: - - - - - - - -@minuend: -@subtrahend: -@Returns: - - - - - - - -@caps: -@Returns: - - - - - - - -@caps: -@Returns: - - - - - - - -@structure: -@field_name: -@target: -@Returns: - - - - - - - -@caps: - - - - - - - -@caps: - - diff --git a/docs/gst/tmpl/gstclock.sgml b/docs/gst/tmpl/gstclock.sgml deleted file mode 100644 index bb9e367..0000000 --- a/docs/gst/tmpl/gstclock.sgml +++ /dev/null @@ -1,432 +0,0 @@ - -GstClock - - -Abstract class for global clocks - - - -GStreamer uses a global clock to synchronise the plugins in a pipeline. -Different clock implementations are possible by implementing this abstract -base class. - - -The clock time is always measured in nanoseconds and always increases. The -pipeline uses the clock to calculate the stream time. -Usually all renderers sync to the global clock so that the clock is always -a good measure of the current playback time in the pipeline. - - - - -#GstSystemClock - - - - - - - - - - -@flags: - - - -Boolean property to activate stat generation on the clock. - - - - -A datatype to hold a time, measured in nanoseconds. - - - - - -A datatype to hold a timedifference, measured in nanoseconds. - - - - - -A detatype to hold the handle to an outstanding async clock callback - - - - - -Constant to define an undefined clock time - - - - - - - - - -@time: - - - - -Constant that defines one GStreamer second - - - - - - -Constant that defines one GStreamer millisecond - - - - - - -Constant that defines one GStreamer microsecond - - - - - - -Constant that defines one GStreamer nanosecond - - - - - - -Calculate a difference between to clock times. - - -@s: the first time -@e: the second time - - - - -Convert a GTimeVal to a GstClockTime - - -@tv: the timeval to convert - - - - -Convert a GstClockTime to a GTimeVal - - -@t: The GstClockTime to convert -@tv: The target timeval - - - - - - - -@ts: - - - - - - - -@t: -@ts: - - - - -The name used for tracing clock entry allocations. - - - - - - -All pending timeouts or periodic notifies are converted into -an entry. - - -@refcount: - - - -The function prototype of the callback. - - -@clock: The clock that triggered the callback -@time: The time it was triggered -@id: The id that expired -@user_data: user data passed in the async_wait call -@Returns: %TRUE or %FALSE (currently unused) - - - - -The type of the clock entry - - -@GST_CLOCK_ENTRY_SINGLE: a single shot timeout -@GST_CLOCK_ENTRY_PERIODIC: a periodic timeout request - - - -Cast to a clock entry - - -@entry: the entry to cast - - - - -Get the owner clock of the entry - - -@entry: the entry to query - - - - -Get the type of the clock entry - - -@entry: the entry to query - - - - -Get the requested time of this entry - - -@entry: the entry to query - - - - -Get the interval of this periodic entry - - -@entry: the entry to query - - - - -The status of the entry - - -@entry: the entry to query - - - - -The return value of a clock operation. - - -@GST_CLOCK_OK: The operation succeded. -@GST_CLOCK_EARLY: The operation was scheduled too late. -@GST_CLOCK_UNSCHEDULED: The clockID was unscheduled -@GST_CLOCK_BUSY: The ClockID is busy -@GST_CLOCK_BADTIME: A bad time was provided to a function. -@GST_CLOCK_ERROR: An error occured -@GST_CLOCK_UNSUPPORTED: Operation is not supported - - - -The capabilities of this clock - - -@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 - - - -Get the clock flags - - -@clock: the clock to query - - - - - - - -@clock: - - - - - - - -@clock: - - - - - - - -@clock: - - - - - - - -@clock: -@tv: - - - - - - - -@clock: - - - - - - - -@clock: -@resolution: -@Returns: - - - - - - - -@clock: -@Returns: - - - - - - - -@clock: -@Returns: - - - - - - - -@clock: -@time: -@Returns: - - - - - - - -@clock: -@start_time: -@interval: -@Returns: - - - - - - - -@clock: -@internal: -@Returns: - - - - - - - -@clock: -@adjust: - - - - - - - -@id: -@Returns: - - - - - - - -@id: -@jitter: -@Returns: - - - - - - - -@id: -@func: -@user_data: -@Returns: - - - - - - - -@id: - - - - - - - -@id1: -@id2: -@Returns: - - - - - - - -@id: -@Returns: - - - - - - - -@id: - - diff --git a/gst/gstbus.c b/gst/gstbus.c index e261cf4..b3e5337 100644 --- a/gst/gstbus.c +++ b/gst/gstbus.c @@ -21,6 +21,38 @@ /** * SECTION:gstbus * @short_description: Asynchronous message bus subsystem + * @see_also: #GstMessage, #GstElement + * + * The #GstBus is an object responsible for delivering #GstMessages in + * a first-in first-out way from the streaming threads to the application. + * + * Since the application typically only wants to deal with delivery of these + * messages from one thread, the GstBus will marshall the messages between + * different threads. This is important since the actual streaming of media + * is done in another thread than the application. + * + * The GstBus provides support for #GSource based notifications. This makes it + * possible to handle the delivery in the glib mainloop. + * + * A message is posted on the bus with the gst_bus_post() method. With the + * gst_bus_peek() and _pop() methods one can look at or retrieve a previously + * posted message. + * + * The bus can be polled with the gst_bus_poll() method. This methods blocks + * up to the specified timeout value until one of the specified messages types + * is posted on the bus. The application can then _pop() the messages from the + * bus to handle them. + * Alternatively the application can register an asynchronous bus handler using + * gst_bus_add_watch_full() orgst_bus_add_watch(). This handler will receive + * messages a short while after they have been posted. + * + * It is also possible to get messages from the bus without any thread + * marshalling with the gst_bus_set_sync_handler() method. This makes it + * possible to react to a message in the same thread that posted the + * message on the bus. This should only be used if the application is able + * to deal with messages from different threads. + * + * Every #GstElement has its own bus. */ #include diff --git a/gst/gstcaps.c b/gst/gstcaps.c index e9f16d5..ec4f65e 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -16,6 +16,12 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +/** + * SECTION:gstcaps + * @short_description: Structure describing sets of media formats + * @see_also: #GstStructure + * + */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gst/gstcaps.h b/gst/gstcaps.h index dcd2616..e687a36 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -29,21 +29,81 @@ G_BEGIN_DECLS #define GST_CAPS(object) ((GstCaps*)object) #define GST_IS_CAPS(object) ((object) && (GST_CAPS(object)->type == GST_TYPE_CAPS)) +/** + * GST_CAPS_FLAGS_ANY: + * + * Flags that this caps has no specific content, but can contain anything. + */ #define GST_CAPS_FLAGS_ANY (1 << 0) +/** + * GST_CAPS_ANY: + * + * Means that the element/pad can output 'anything'. Useful for elements + * that output unknown media, such as filesrc. + */ #define GST_CAPS_ANY gst_caps_new_any() +/** + * GST_CAPS_NONE: + * + * The opposite of %GST_CAPS_ANY: it means that the pad/element outputs an + * undefined media type that can not be detected. + */ #define GST_CAPS_NONE gst_caps_new_empty() +/** + * GST_STATIC_CAPS_ANY: + * + * Creates a static caps that matches anything. This can be used in pad + * templates. + * + * Returns: a new #GstCaps instance + */ #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 + */ #define GST_STATIC_CAPS_NONE GST_STATIC_CAPS("NONE") +/** + * GST_CAPS_IS_SIMPLE: + * @caps: the #GstCaps instance to check + * + * Convinience macro that checks if the number of structures in the gives 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. + * @caps: the #GstCaps instance to print + * + * Convinience macro for prining out the contents of caps with GST_DEBUG(). + * + * Deprecated: do not use anymore + */ #define GST_DEBUG_CAPS(string, caps) \ GST_DEBUG ( string "%s: " GST_PTR_FORMAT, caps) #endif +/** + * GST_STATIC_CAPS: + * @caps: the string describing the caps. + * + * Creates a static caps from an input string. This can be used in pad + * templates. + * + * Returns: a new #GstCaps instance + */ #define GST_STATIC_CAPS(string) \ { \ /* caps */ { 0 }, \ diff --git a/gst/gstclock.c b/gst/gstclock.c index ea04698..04d950d 100644 --- a/gst/gstclock.c +++ b/gst/gstclock.c @@ -20,7 +20,20 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - +/** + * SECTION:gstclock + * @short_description: Abstract class for global clocks + * @see_also: #GstSystemClock + * + * GStreamer uses a global clock to synchronise the plugins in a pipeline. + * Different clock implementations are possible by implementing this abstract + * base class. + * + * The clock time is always measured in nanoseconds and always increases. The + * pipeline uses the clock to calculate the stream time. + * Usually all renderers sync to the global clock so that the clock is always + * a good measure of the current playback time in the pipeline. + */ #include #include "gst_private.h" diff --git a/gst/gstclock.h b/gst/gstclock.h index 6aa6b31..f244275 100644 --- a/gst/gstclock.h +++ b/gst/gstclock.h @@ -35,28 +35,116 @@ G_BEGIN_DECLS #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; +/** + * GstClockTimeDiff: + * + * A datatype to hold a timedifference, measured in nanoseconds. + */ typedef gint64 GstClockTimeDiff; +/** + * GstClockID: + * + * A detatype to hold the handle to an outstanding async clock callback + */ typedef gpointer GstClockID; +/** + * GST_CLOCK_TIME_NONE: + * + * Constant to define an undefined clock time + */ #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. + */ #define GST_CLOCK_TIME_IS_VALID(time) ((time) != GST_CLOCK_TIME_NONE) +/** + * GST_SECOND: + * + * Constant that defines one GStreamer second + */ #define GST_SECOND (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000)) +/** + * GST_MSECOND: + * + * Constant that defines one GStreamer millisecond + */ #define GST_MSECOND (GST_SECOND / G_GINT64_CONSTANT (1000)) +/** + * GST_USECOND: + * + * Constant that defines one GStreamer microsecond + */ #define GST_USECOND (GST_SECOND / G_GINT64_CONSTANT (1000000)) +/** + * GST_NSECOND: + * + * Constant that defines one GStreamer nanosecond + */ #define GST_NSECOND (GST_SECOND / G_GINT64_CONSTANT (1000000000)) +/** + * GST_CLOCK_DIFF: + * @s: the first time + * @e: the second time + * + * Calculate a difference between two clock times. + * + * Returns: the difference as #GstClockTimeDiff + */ #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 + */ #define GST_TIMEVAL_TO_TIME(tv) ((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND) +/** + * GST_TIME_TO_TIMEVAL: + * @t: The GstClockTime to convert + * @tv: The target timeval + * + * Convert a GstClockTime to a GTimeVal + */ #define GST_TIME_TO_TIMEVAL(t,tv) \ G_STMT_START { \ (tv).tv_sec = (t) / GST_SECOND; \ (tv).tv_usec = ((t) - (tv).tv_sec * GST_SECOND) / GST_USECOND; \ } G_STMT_END +/** + * GST_TIMESPEC_TO_TIME: + * @ts: the timespec to convert + * + * Convert a GstTimeSpec to a GstClockTime + * + * Returns: the result as #GstClockTime + */ #define GST_TIMESPEC_TO_TIME(ts) ((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND) +/** + * GST_TIME_TO_TIMESPEC: + * @t: The GstClockTime to convert + * @ts: The target timespec + * + * Convert a GstClockTime to a GstTimeSpec + */ #define GST_TIME_TO_TIMESPEC(t,ts) \ G_STMT_START { \ (ts).tv_sec = (t) / GST_SECOND; \ @@ -71,6 +159,11 @@ G_STMT_START { \ (guint) ((((GstClockTime)(t)) / GST_SECOND) % 60), \ (guint) (((GstClockTime)(t)) % GST_SECOND) +/** + * GST_CLOCK_ENTRY_TRACE_NAME: + * + * The name used for tracing clock entry allocations. + */ #define GST_CLOCK_ENTRY_TRACE_NAME "GstClockEntry" typedef struct _GstClockEntry GstClockEntry; @@ -78,9 +171,31 @@ typedef struct _GstClock GstClock; typedef struct _GstClockClass GstClockClass; /* --- prototype for async callbacks --- */ +/** + * GstClockCallback: + * @clock: The clock that triggered the callback + * @time: The time it was triggered + * @id: The #GstClockID that expired + * @user_data: user data passed in the async_wait call + * + * The function prototype of the callback. + * + * Returns: %TRUE or %FALSE (currently unused) + */ typedef gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, GstClockID id, gpointer user_data); - +/** + * GstClockReturn: + * @GST_CLOCK_OK: The operation succeded. + * @GST_CLOCK_EARLY: The operation was scheduled too late. + * @GST_CLOCK_UNSCHEDULED: The clockID was unscheduled + * @GST_CLOCK_BUSY: The ClockID is busy + * @GST_CLOCK_BADTIME: A bad time was provided to a function. + * @GST_CLOCK_ERROR: An error occured + * @GST_CLOCK_UNSUPPORTED: Operation is not supported + * + * The return value of a clock operation. + */ typedef enum { GST_CLOCK_OK = 0, @@ -92,18 +207,68 @@ typedef enum GST_CLOCK_UNSUPPORTED = 6, } GstClockReturn; +/** + * GstClockEntryType: + * @GST_CLOCK_ENTRY_SINGLE: a single shot timeout + * @GST_CLOCK_ENTRY_PERIODIC: a periodic timeout request + * + * The type of the clock entry + */ typedef enum { GST_CLOCK_ENTRY_SINGLE, GST_CLOCK_ENTRY_PERIODIC } GstClockEntryType; +/** + * GST_CLOCK_ENTRY: + * @entry: the entry to cast + * + * Cast to a clock entry + */ #define GST_CLOCK_ENTRY(entry) ((GstClockEntry *)(entry)) +/** + * GST_CLOCK_ENTRY_CLOCK: + * @entry: the entry to query + * + * Get the owner clock of the entry + */ #define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)->clock) +/** + * GST_CLOCK_ENTRY_TYPE: + * @entry: the entry to query + * + * Get the type of the clock entry + */ #define GST_CLOCK_ENTRY_TYPE(entry) ((entry)->type) +/** + * GST_CLOCK_ENTRY_TIME: + * @entry: the entry to query + * + * Get the requested time of this entry + */ #define GST_CLOCK_ENTRY_TIME(entry) ((entry)->time) +/** + * GST_CLOCK_ENTRY_INTERVAL: + * @entry: the entry to query + * + * Get the interval of this periodic entry + */ #define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval) +/** + * GST_CLOCK_ENTRY_STATUS: + * @entry: the entry to query + * + * The status of the entry + */ #define GST_CLOCK_ENTRY_STATUS(entry) ((entry)->status) +/** + * GstClockEntry: + * @refcount: reference counter (read-only) + * + * All pending timeouts or periodic notifies are converted into + * an entry. + */ struct _GstClockEntry { gint refcount; /*< protected >*/ @@ -116,8 +281,17 @@ struct _GstClockEntry { gpointer user_data; }; -typedef enum -{ +/** + * 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 + * + * The capabilities of this clock + */ +typedef enum { GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC = (1 << 1), GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC = (1 << 2), GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC = (1 << 3), @@ -125,6 +299,12 @@ typedef enum GST_CLOCK_FLAG_CAN_SET_RESOLUTION = (1 << 5), } GstClockFlags; +/** + * GST_CLOCK_FLAGS: + * @entry: the entry to query + * + * Get the clock flags + */ #define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags) #define GST_CLOCK_COND(clock) (GST_CLOCK_CAST(clock)->entries_changed) @@ -132,6 +312,11 @@ 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; diff --git a/gst/gstmessage.c b/gst/gstmessage.c index bc9a561..997e78f 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -18,6 +18,19 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +/** + * SECTION:gstmessage + * @short_description: Lightweight objects to signal the application of pipeline events + * @see_also: #GstBus,#GstMiniObject + * + * Messages are implemented as a subclass of #GstMiniObject with a generic + * #GstStructure as the content. This allows for writing custom messages without + * requiring an API change while allowing a wide range of different types + * of messages. + * + * Messages are posted by objects in the pipeline and are passed to the + * application using the #GstBus. + */ #include /* memcpy */ -- 2.7.4