more doc and whitespace fixes

Original commit message from CVS:
more doc and whitespace fixes
parent 2d63826a
......@@ -30,6 +30,7 @@ gst_init_get_popt_table
<FILE>gstbin</FILE>
<TITLE>GstBin</TITLE>
GstBin
GstBinClass
GstBinFlags
gst_bin_new
......@@ -296,6 +297,7 @@ GST_PLUGIN_EXPORT
<FILE>gstelement</FILE>
<TITLE>GstElement</TITLE>
GstElement
GstElementClass
GST_NUM_STATES
GST_STATE
GST_STATE_PENDING
......@@ -405,7 +407,6 @@ gst_element_get_factory
gst_element_get_managing_bin
gst_element_no_more_pads
<SUBSECTION Standard>
GstElementClass
GST_ELEMENT
GST_IS_ELEMENT
GST_ELEMENT_CLASS
......@@ -1889,8 +1890,8 @@ gst_fakesink_get_type
<FILE>gstbasesrc</FILE>
<TITLE>GstBaseSrc</TITLE>
GstBaseSrc
<SUBSECTION Standard>
GstBaseSrcClass
<SUBSECTION Standard>
GST_BASESRC
GST_IS_BASESRC
GST_TYPE_BASESRC
......
......@@ -35,3 +35,20 @@ GstBaseSrc
</para>
<!-- ##### STRUCT GstBaseSrcClass ##### -->
<para>
</para>
@parent_class:
@get_caps:
@set_caps:
@start:
@stop:
@get_times:
@get_size:
@is_seekable:
@unlock:
@event:
@create:
......@@ -80,6 +80,15 @@ Will be emitted if an element was removed from this bin.
@gstbin: the object which received the signal.
@arg1: the element that was removed from the bin.
<!-- ##### STRUCT GstBinClass ##### -->
<para>
</para>
@parent_class:
@add_element:
@remove_element:
<!-- ##### ENUM GstBinFlags ##### -->
<para>
......
......@@ -75,6 +75,7 @@ and gst_element_set_clock(). You can wait for the clock to reach a given
@current_state:
@pending_state:
@state_error:
@no_preroll:
@manager:
@bus:
@scheduler:
......
......@@ -35,6 +35,7 @@ against the GstElementStateReturn value.
@GST_STATE_FAILURE: the state of the element could not be changed
@GST_STATE_SUCCESS: the state of the element has already be changed
@GST_STATE_ASYNC: the state of the element will change in the near future
@GST_STATE_NO_PREROLL:
<!-- ##### ENUM GstRank ##### -->
<para>
......
......@@ -3,7 +3,7 @@
* 2000 Wim Taymans <wtay@chello.be>
* 2005 Wim Taymans <wim@fluendo.com>
*
* gstbasesrc.h:
* gstbasesrc.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -68,33 +68,39 @@ typedef struct _GstBaseSrcClass GstBaseSrcClass;
struct _GstBaseSrc {
GstElement element;
GstPad *srcpad;
GstPad *srcpad;
/*< protected >*/ /* with LIVE_LOCK */
/* only for subclass implementations */
/* MT-protected (with LIVE_LOCK) */
GMutex *live_lock;
GCond *live_cond;
gboolean is_live;
gboolean live_running;
/*< protected >*/ /* with LOCK */
gint blocksize; /* size of buffers when operating push based */
gboolean has_loop; /* some scheduling properties */
/* MT-protected (with LOCK) */
gint blocksize; /* size of buffers when operating push based */
gboolean has_loop; /* some scheduling properties */
gboolean has_getrange;
gboolean seekable;
gboolean random_access;
GstClockID clock_id; /* for syncing */
GstClockID clock_id; /* for syncing */
GstClockTime end_time;
/* with STREAM_LOCK */
gint64 segment_start; /* start and end positions for seeking */
/* MT-protected (with STREAM_LOCK) */
gint64 segment_start; /* start and end positions for seeking */
gint64 segment_end;
gboolean segment_loop;
guint64 offset; /* current offset in the resource */
guint64 size; /* total size of the resource */
guint64 offset; /* current offset in the resource */
guint64 size; /* total size of the resource */
};
/**
* _GstBaseSrcClass:
* @create: ask the subclass to create a buffer with offset and size
* @start: start processing
*/
struct _GstBaseSrcClass {
GstElementClass parent_class;
......@@ -126,7 +132,7 @@ struct _GstBaseSrcClass {
gboolean (*event) (GstBaseSrc *src, GstEvent *event);
/* ask the subclass to create a buffer with offset and size */
GstFlowReturn (*create) (GstBaseSrc *src, guint64 offset, guint size,
GstFlowReturn (*create) (GstBaseSrc *src, guint64 offset, guint size,
GstBuffer **buf);
};
......
/* GStreamer
*
*
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2004 Wim Taymans <wim@fluendo.com>
*
......@@ -213,7 +213,7 @@ gst_bin_new (const gchar * name)
/* set the index on all elements in this bin
*
* MT safe
* MT safe
*/
#ifndef GST_DISABLE_INDEX
static void
......@@ -236,7 +236,7 @@ gst_bin_set_index_func (GstElement * element, GstIndex * index)
/* set the clock on all elements in this bin
*
* MT safe
* MT safe
*/
static void
gst_bin_set_clock_func (GstElement * element, GstClock * clock)
......@@ -257,7 +257,7 @@ gst_bin_set_clock_func (GstElement * element, GstClock * clock)
/* get the clock for this bin by asking all of the children in this bin
*
* MT safe
* MT safe
*/
static GstClock *
gst_bin_get_clock_func (GstElement * element)
......@@ -283,7 +283,7 @@ gst_bin_get_clock_func (GstElement * element)
/* set the bus on all of the children in this bin
*
* MT safe
* MT safe
*/
static void
gst_bin_set_bus (GstElement * element, GstBus * bus)
......@@ -306,7 +306,7 @@ gst_bin_set_bus (GstElement * element, GstBus * bus)
/* set the scheduler on all of the children in this bin
*
* MT safe
* MT safe
*/
static void
gst_bin_set_scheduler (GstElement * element, GstScheduler * sched)
......@@ -329,7 +329,7 @@ gst_bin_set_scheduler (GstElement * element, GstScheduler * sched)
/* set the manager on all of the children in this bin
*
* MT safe
* MT safe
*/
static void
gst_bin_set_manager (GstElement * element, GstPipeline * manager)
......@@ -350,7 +350,7 @@ gst_bin_set_manager (GstElement * element, GstPipeline * manager)
/* add an element to this bin
*
* MT safe
* MT safe
*/
static gboolean
gst_bin_add_func (GstBin * bin, GstElement * element)
......@@ -436,10 +436,10 @@ had_parent:
* Adds the given element to the bin. Sets the element's parent, and thus
* takes ownership of the element. An element can only be added to one bin.
*
* MT safe.
*
* Returns: TRUE if the element could be added, FALSE on wrong parameters or
* the bin does not want to accept the element.
*
* MT safe.
*/
gboolean
gst_bin_add (GstBin * bin, GstElement * element)
......@@ -560,10 +560,10 @@ not_in_bin:
* want the element to still exist after removing, you need to call
* #gst_object_ref before removing it from the bin.
*
* MT safe.
*
* Returns: TRUE if the element could be removed, FALSE on wrong parameters or
* the bin does not want to remove the element.
*
* MT safe.
*/
gboolean
gst_bin_remove (GstBin * bin, GstElement * element)
......@@ -606,14 +606,14 @@ iterate_child (GstIterator * it, GstElement * child)
* gst_bin_iterate_elements:
* @bin: #Gstbin to iterate the elements of
*
* Get an iterator for the elements in this bin.
* Each element will have its refcount increased, so unref
* after usage.
* Get an iterator for the elements in this bin.
* Each element will have its refcount increased, so unref
* after use.
*
* MT safe.
*
* Returns: a #GstIterator of #GstElements. gst_iterator_free after
* use. returns NULL when passing bad parameters.
*
* MT safe.
*/
GstIterator *
gst_bin_iterate_elements (GstBin * bin)
......@@ -624,7 +624,7 @@ gst_bin_iterate_elements (GstBin * bin)
GST_LOCK (bin);
/* add ref because the iterator refs the bin. When the iterator
* is freed it will unref the bin again using the provided dispose
* is freed it will unref the bin again using the provided dispose
* function. */
gst_object_ref (GST_OBJECT (bin));
result = gst_iterator_new_list (GST_GET_LOCK (bin),
......@@ -654,14 +654,14 @@ iterate_child_recurse (GstIterator * it, GstElement * child)
* gst_bin_iterate_recurse:
* @bin: #Gstbin to iterate the elements of
*
* Get an iterator for the elements in this bin.
* Each element will have its refcount increased, so unref
* after usage. This iterator recurses into GstBin children.
* Get an iterator for the elements in this bin.
* Each element will have its refcount increased, so unref
* after use. This iterator recurses into GstBin children.
*
* MT safe.
*
* Returns: a #GstIterator of #GstElements. gst_iterator_free after
* use. returns NULL when passing bad parameters.
*
* MT safe.
*/
GstIterator *
gst_bin_iterate_recurse (GstBin * bin)
......@@ -672,7 +672,7 @@ gst_bin_iterate_recurse (GstBin * bin)
GST_LOCK (bin);
/* add ref because the iterator refs the bin. When the iterator
* is freed it will unref the bin again using the provided dispose
* is freed it will unref the bin again using the provided dispose
* function. */
gst_object_ref (GST_OBJECT (bin));
result = gst_iterator_new_list (GST_GET_LOCK (bin),
......@@ -798,14 +798,14 @@ sink_iterator_filter (GstElement * child, GstBin * bin)
* @bin: #Gstbin to iterate on
*
* Get an iterator for the sink elements in this bin.
* Each element will have its refcount increased, so unref
* after usage.
* Each element will have its refcount increased, so unref
* after use.
*
* The sink elements are those without any linked srcpads.
*
* Returns: a #GstIterator of #GstElements. gst_iterator_free after use.
*
* MT safe.
*
* Returns: a #GstIterator of #GstElements. gst_iterator_free after use.
*/
GstIterator *
gst_bin_iterate_sinks (GstBin * bin)
......@@ -826,7 +826,7 @@ gst_bin_iterate_sinks (GstBin * bin)
* 1) check state of all children with 0 timeout to find ERROR and
* NO_PREROLL elements. return if found.
* 2) perform full blocking wait with requested timeout.
*
*
* 2) cannot be performed when 1) returns results as the sinks might
* not be able to complete the state change making 2) block forever.
*
......@@ -1147,7 +1147,7 @@ restart:
gst_object_unref (GST_OBJECT (peer_elem));
g_queue_delete_link (elem_queue, oldelem);
}
/* was reffed before pushing on the queue by the
/* was reffed before pushing on the queue by the
* gst_object_get_parent() call we used to get the element. */
g_queue_push_tail (elem_queue, peer_elem);
} else {
......@@ -1369,11 +1369,11 @@ compare_name (GstElement * element, const gchar * name)
* Get the element with the given name from this bin. This
* function recurses into subbins.
*
* MT safe.
*
* Returns: the element with the given name. Returns NULL if the
* element is not found or when bad parameters were given. Unref after
* usage.
*
* MT safe.
* use.
*/
GstElement *
gst_bin_get_by_name (GstBin * bin, const gchar * name)
......@@ -1399,13 +1399,13 @@ gst_bin_get_by_name (GstBin * bin, const gchar * name)
* @bin: #Gstbin to search
* @name: the element name to search for
*
* MT safe.
*
* Get the element with the given name from this bin. If the
* element is not found, a recursion is performed on the parent bin.
*
* Returns: the element with the given name or NULL when the element
* was not found or bad parameters were given. Unref after usage.
*
* MT safe.
* was not found or bad parameters were given. Unref after use.
*/
GstElement *
gst_bin_get_by_name_recurse_up (GstBin * bin, const gchar * name)
......@@ -1457,12 +1457,12 @@ compare_interface (GstElement * element, gpointer interface)
* interface. If such an element is found, it returns the element. You can
* cast this element to the given interface afterwards.
* If you want all elements that implement the interface, use
* gst_bin_iterate_all_by_interface(). The function recurses bins inside bins.
*
* Returns: An element inside the bin implementing the interface. Unref after
* usage.
* gst_bin_iterate_all_by_interface(). The function recurses inside bins.
*
* MT safe.
*
* Returns: An #GstElement inside the bin implementing the interface.
* Unref after use.
*/
GstElement *
gst_bin_get_by_interface (GstBin * bin, GType interface)
......@@ -1488,11 +1488,12 @@ gst_bin_get_by_interface (GstBin * bin, GType interface)
* Looks for all elements inside the bin that implements the given
* interface. You can safely cast all returned elements to the given interface.
* The function recurses bins inside bins. The iterator will return a series
* of #GstElement that should be unreffed after usage.
*
* Returns: An iterator for the elements inside the bin implementing the interface.
* of #GstElement that should be unreffed after use.
*
* MT safe.
*
* Returns: A #GstIterator for the elements inside the bin implementing the
* given interface.
*/
GstIterator *
gst_bin_iterate_all_by_interface (GstBin * bin, GType interface)
......
......@@ -41,19 +41,8 @@ GST_EXPORT GType _gst_bin_type;
/**
* GstBinFlags:
* @GST_BIN_FLAG_MANAGER: this bin is a manager of child elements, i.e.
* a pipeline or thread.
* @GST_BIN_SELF_SCHEDULABLE: the bin iterates itself.
* @GST_BIN_FLAG_PREFER_COTHREADS: we prefer to have cothreads when its
* an option, over chain-based.
* @GST_BIN_FLAG_FIXED_CLOCK: bin has one clock that cannot be changed.
* @GST_BIN_STATE_LOCKED: indicator that we are in a non-recursive
* state-change on the bin, or that kids should not change parent state.
* Both are internally used to prevent infinitely recursive loops of
* state changes. Since they are mutually exclusive and serve the same
* purpose, we use the same flag for them.
* @GST_BIN_FLAG_LAST: the last enum in the series of flags in a bin,
* derived classes can use this as first value in a list of flags.
* @GST_BIN_FLAG_LAST: the last enum in the series of flags for bins.
* Derived classes can use this as first value in a list of flags.
*
* GstBinFlags are a set of flags specific to bins. Most are set/used
* internally. They can be checked using the GST_FLAG_IS_SET () macro,
......@@ -88,13 +77,13 @@ struct _GstBin {
struct _GstBinClass {
GstElementClass parent_class;
/*< public >*/
/*< private >*/
/* signals */
void (*element_added) (GstBin *bin, GstElement *child);
void (*element_removed) (GstBin *bin, GstElement *child);
/*< protected >*/
/* vtable */
/*< public >*/
/* virtual methods for subclasses */
gboolean (*add_element) (GstBin *bin, GstElement *element);
gboolean (*remove_element) (GstBin *bin, GstElement *element);
......
......@@ -50,7 +50,7 @@ GST_EXPORT GType _gst_element_type;
#define GST_ELEMENT_CAST(obj) ((GstElement*)(obj))
#define GST_NUM_STATES 4
/* NOTE: this probably should be done with an #ifdef to decide
/* NOTE: this probably should be done with an #ifdef to decide
* whether to safe-cast or to just do the non-checking cast.
*/
#define GST_STATE(obj) (GST_ELEMENT(obj)->current_state)
......@@ -116,8 +116,10 @@ typedef enum
* @el: the element that throws the error
* @domain: like CORE, LIBRARY, RESOURCE or STREAM (see #GstError)
* @code: error code defined for that domain (see #GstError)
* @message: the message to display (format string and args enclosed in round brackets)
* @debug: debugging information for the message (format string and args enclosed in round brackets)
* @message: the message to display (format string and args enclosed in
parentheses)
* @debug: debugging information for the message (format string and args
enclosed in parentheses)
*
* Utility function that elements can use in case they encountered a fatal
* data processing error. The pipeline will throw an error signal and the
......@@ -164,7 +166,7 @@ G_STMT_START { \
struct _GstElement
{
GstObject object;
GstObject object;
/*< public >*/ /* with STATE_LOCK */
/* element state */
......@@ -178,13 +180,13 @@ struct _GstElement
gboolean no_preroll; /* flag is set when the element cannot preroll */
/*< public >*/ /* with LOCK */
/* element manager */
GstPipeline *manager;
GstBus *bus;
GstScheduler *scheduler;
GstPipeline *manager;
GstBus *bus;
GstScheduler *scheduler;
/* allocated clock */
GstClock *clock;
GstClockTimeDiff base_time; /* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock */
GstClockTimeDiff base_time; /* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock */
/* element pads, these lists can only be iterated while holding
* the LOCK or checking the cookie after each LOCK. */
......@@ -206,7 +208,7 @@ struct _GstElementClass
/*< public >*/
/* the element details */
GstElementDetails details;
GstElementDetails details;
/* factory that the element was created from */
GstElementFactory *elementfactory;
......@@ -216,27 +218,28 @@ struct _GstElementClass
gint numpadtemplates;
guint32 pad_templ_cookie;
/*< private >*/
/* signal callbacks */
void (*state_change) (GstElement *element, GstElementState old, GstElementState state);
void (*new_pad) (GstElement *element, GstPad *pad);
void (*pad_removed) (GstElement *element, GstPad *pad);
void (*no_more_pads) (GstElement *element);
/*< protected >*/
/* vtable */
/*< public >*/
/* virtual methods for subclasses */
/* request/release pads */
GstPad* (*request_new_pad) (GstElement *element, GstPadTemplate *templ, const gchar* name);
void (*release_pad) (GstElement *element, GstPad *pad);
/* state changes */
GstElementStateReturn (*get_state) (GstElement * element, GstElementState * state,
GstElementState * pending, GTimeVal * timeout);
GstElementStateReturn (*get_state) (GstElement * element, GstElementState * state,
GstElementState * pending, GTimeVal * timeout);
GstElementStateReturn (*change_state) (GstElement *element);
/* manager */
void (*set_manager) (GstElement * element, GstPipeline * pipeline);
void (*set_bus) (GstElement * element, GstBus * bus);
void (*set_manager) (GstElement * element, GstPipeline * pipeline);
void (*set_bus) (GstElement * element, GstBus * bus);
void (*set_scheduler) (GstElement *element, GstScheduler *scheduler);
/* set/get clocks */
......@@ -250,7 +253,7 @@ struct _GstElementClass
/* query functions */
gboolean (*send_event) (GstElement *element, GstEvent *event);
const GstQueryType* (*get_query_types) (GstElement *element);
const GstQueryType* (*get_query_types) (GstElement *element);
gboolean (*query) (GstElement *element, GstQuery *query);
/*< private >*/
......@@ -276,8 +279,8 @@ GType gst_element_get_type (void);
/* clocking */
gboolean gst_element_requires_clock (GstElement *element);
gboolean gst_element_provides_clock (GstElement *element);
GstClock* gst_element_get_clock (GstElement *element);
void gst_element_set_clock (GstElement *element, GstClock *clock);
GstClock* gst_element_get_clock (GstElement *element);
void gst_element_set_clock (GstElement *element, GstClock *clock);
/* indexes */
gboolean gst_element_is_indexable (GstElement *element);
......@@ -285,10 +288,10 @@ void gst_element_set_index (GstElement *element, GstIndex *index);
GstIndex* gst_element_get_index (GstElement *element);
/* manager and tasks */
void gst_element_set_manager (GstElement * element, GstPipeline * pipeline);
GstPipeline * gst_element_get_manager (GstElement * element);
void gst_element_set_bus (GstElement * element, GstBus * bus);
GstBus * gst_element_get_bus (GstElement * element);
void gst_element_set_manager (GstElement * element, GstPipeline * pipeline);
GstPipeline * gst_element_get_manager (GstElement * element);
void gst_element_set_bus (GstElement * element, GstBus * bus);
GstBus * gst_element_get_bus (GstElement * element);
void gst_element_set_scheduler (GstElement *element, GstScheduler *sched);
GstScheduler* gst_element_get_scheduler (GstElement *element);
......@@ -302,7 +305,7 @@ GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name);
GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name);
void gst_element_release_request_pad (GstElement *element, GstPad *pad);
GstIterator * gst_element_iterate_pads (GstElement * element);
GstIterator * gst_element_iterate_pads (GstElement * element);
/* event/query/format stuff */
gboolean gst_element_send_event (GstElement *element, GstEvent *event);
......@@ -313,29 +316,29 @@ G_CONST_RETURN GstQueryType*
gboolean gst_element_query (GstElement *element, GstQuery *query);
/* messages */
gboolean gst_element_post_message (GstElement * element, GstMessage * message);
gboolean gst_element_post_message (GstElement * element, GstMessage * message);
/* error handling */
gchar * _gst_element_error_printf (const gchar *format, ...);
void gst_element_message_full (GstElement * element, GstMessageType type,
GQuark domain, gint code, gchar * text,
void gst_element_message_full (GstElement * element, GstMessageType type,
GQuark domain, gint code, gchar * text,
gchar * debug, const gchar * file,
const gchar * function, gint line);
const gchar * function, gint line);
/* state management */
gboolean gst_element_is_locked_state (GstElement *element);
gboolean gst_element_set_locked_state (GstElement *element, gboolean locked_state);
gboolean gst_element_sync_state_with_parent (GstElement *element);
GstElementStateReturn gst_element_get_state (GstElement * element,
GstElementStateReturn gst_element_get_state (GstElement * element,
GstElementState * state,
GstElementState * pending,
GstElementState * pending,
GTimeVal * timeout);
GstElementStateReturn gst_element_set_state (GstElement *element, GstElementState state);
void gst_element_abort_state (GstElement * element);
void gst_element_commit_state (GstElement * element);
void gst_element_lost_state (GstElement * element);
void gst_element_abort_state (GstElement * element);
void gst_element_commit_state (GstElement * element);
void gst_element_lost_state (GstElement * element);
/* factory management */
GstElementFactory* gst_element_get_factory (GstElement *element);
......
......@@ -3,7 +3,7 @@
* 2000 Wim Taymans <wtay@chello.be>
* 2005 Wim Taymans <wim@fluendo.com>
*
* gstbasesrc.h:
* gstbasesrc.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -68,33 +68,39 @@ typedef struct _GstBaseSrcClass GstBaseSrcClass;
struct _GstBaseSrc {
GstElement element;
GstPad *srcpad;
GstPad *srcpad;
/*< protected >*/ /* with LIVE_LOCK */
/* only for subclass implementations */
/* MT-protected (with LIVE_LOCK) */
GMutex *live_lock;
GCond *live_cond;
gboolean is_live;
gboolean live_running;
/*< protected >*/ /* with LOCK */
gint blocksize; /* size of buffers when operating push based */
gboolean has_loop; /* some scheduling properties */
/* MT-protected (with LOCK) */
gint blocksize; /* size of buffers when operating push based */
gboolean has_loop; /* some scheduling properties */
gboolean has_getrange;
gboolean seekable;
gboolean random_access;
GstClockID clock_id; /* for syncing */
GstClockID clock_id; /* for syncing */
GstClockTime end_time;
/* with STREAM_LOCK */
gint64 segment_start; /* start and end positions for seeking */
/* MT-protected (with STREAM_LOCK) */
gint64 segment_start; /* start and end positions for seeking */
gint64 segment_end;
gboolean segment_loop;
guint64 offset; /* current offset in the resource */
guint64 size; /* total size of the resource */
guint64 offset; /* current offset in the resource */
guint64 size; /* total size of the resource */
};
/**
* _GstBaseSrcClass:
* @create: ask the subclass to create a buffer with offset and size
* @start: start processing
*/
struct _GstBaseSrcClass {
GstElementClass parent_class;
......@@ -126,7 +132,7 @@ struct _GstBaseSrcClass {
gboolean (*event) (GstBaseSrc *src, GstEvent *event);
/* ask the subclass to create a buffer with offset and size */
GstFlowReturn (*create) (GstBaseSrc *src, guint64 offset, guint size,
GstFlowReturn (*create) (GstBaseSrc *src, guint64 offset, guint size,
GstBuffer **buf);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment