diff --git a/ChangeLog b/ChangeLog index d40235ae48..2c7681388a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,55 @@ +2005-11-24 Wim Taymans + + * docs/gst/gstreamer-sections.txt: + * gst/base/gstadapter.h: + * gst/base/gstbasesink.h: + * gst/base/gstbasesrc.h: + * gst/base/gstbasetransform.h: + * gst/base/gstpushsrc.h: + * gst/elements/gstfakesink.h: + * gst/elements/gstfakesrc.c: (gst_fake_src_data_get_type): + * gst/elements/gstfakesrc.h: + * gst/elements/gstfilesink.h: + * gst/elements/gstfilesrc.h: + * gst/gst.c: + * gst/gstbin.c: + * gst/gstbuffer.c: (_gst_buffer_copy): + * gst/gstbus.h: + * gst/gstcaps.c: + * gst/gstchildproxy.c: + * gst/gstclock.c: + * gst/gstelement.c: + * gst/gstelementfactory.c: + * gst/gstelementfactory.h: + * gst/gstevent.c: + * gst/gstghostpad.h: + * gst/gstindex.h: + * gst/gstinterface.h: + * gst/gstminiobject.c: + * gst/gstminiobject.h: + * gst/gstpad.c: + * gst/gstpad.h: + * gst/gstpadtemplate.h: + * gst/gstpipeline.h: + * gst/gstpluginfeature.h: + * gst/gstquery.h: + * gst/gstqueue.h: + * gst/gsttaglist.c: + * gst/gsttaglist.h: + * gst/gsttagsetter.c: + * gst/gsttagsetter.h: + * gst/gsttrace.c: + * gst/gsttrace.h: + * gst/gsttypefind.h: + * gst/gsturi.h: + * gst/gstvalue.c: + * gst/net/gstnetclientclock.c: + * gst/net/gstnetclientclock.h: + * gst/net/gstnettimepacket.c: + * gst/net/gstnettimeprovider.c: + * gst/net/gstnettimeprovider.h: + Doc fixes. + 2005-11-23 Thomas Vander Stichele * configure.ac: back to HEAD diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 4fe3ebd9ef..1bdc28783d 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -1294,6 +1294,7 @@ GST_PAD_STREAM_LOCK_FULL GST_PAD_STREAM_TRYLOCK GST_PAD_STREAM_UNLOCK GST_PAD_STREAM_UNLOCK_FULL + GST_FLOW_IS_FATAL @@ -1932,7 +1933,6 @@ gst_task_state_get_type gsttrace GstTrace GstTrace -GstTraceEntry gst_trace_new gst_trace_destroy gst_trace_flush @@ -1959,8 +1959,9 @@ gst_alloc_trace_new gst_alloc_trace_free GST_TYPE_ALLOC_TRACE_FLAGS - gst_alloc_trace_flags_get_type + +GstTraceEntry diff --git a/gst/base/gstadapter.h b/gst/base/gstadapter.h index d6e5d595d5..62565d7a15 100644 --- a/gst/base/gstadapter.h +++ b/gst/base/gstadapter.h @@ -42,6 +42,11 @@ G_BEGIN_DECLS typedef struct _GstAdapter GstAdapter; typedef struct _GstAdapterClass GstAdapterClass; +/** + * GstAdapter: + * + * The opaque #GstAdapter data structure. + */ struct _GstAdapter { GObject object; diff --git a/gst/base/gstbasesink.h b/gst/base/gstbasesink.h index d436708141..fdb24af9d9 100644 --- a/gst/base/gstbasesink.h +++ b/gst/base/gstbasesink.h @@ -47,6 +47,11 @@ G_BEGIN_DECLS typedef struct _GstBaseSink GstBaseSink; typedef struct _GstBaseSinkClass GstBaseSinkClass; +/** + * GstBaseSink: + * + * The opaque #GstBaseSink data structure. + */ struct _GstBaseSink { GstElement element; diff --git a/gst/base/gstbasesrc.h b/gst/base/gstbasesrc.h index 1d788a5a90..908c7c3c61 100644 --- a/gst/base/gstbasesrc.h +++ b/gst/base/gstbasesrc.h @@ -61,11 +61,17 @@ typedef struct _GstBaseSrcClass GstBaseSrcClass; #define GST_BASE_SRC_PAD(obj) (GST_BASE_SRC_CAST (obj)->srcpad) +/** + * GstBaseSrc: + * + * The opaque #GstBaseSrc data structure. + */ struct _GstBaseSrc { GstElement element; + + /*< protected >*/ GstPad *srcpad; - /*< public >*/ /* available to subclass implementations */ /* MT-protected (with LIVE_LOCK) */ GMutex *live_lock; diff --git a/gst/base/gstbasetransform.h b/gst/base/gstbasetransform.h index fdd4ac1ef5..3b92cc8c73 100644 --- a/gst/base/gstbasetransform.h +++ b/gst/base/gstbasetransform.h @@ -49,14 +49,19 @@ G_BEGIN_DECLS typedef struct _GstBaseTransform GstBaseTransform; typedef struct _GstBaseTransformClass GstBaseTransformClass; +/** + * GstBaseTransform: + * + * The opaque #GstBaseTransform data structure. + */ struct _GstBaseTransform { GstElement element; + /*< protected >*/ /* source and sink pads */ GstPad *sinkpad; GstPad *srcpad; - /*< public >*/ /* Set by sub-class */ gboolean passthrough; gboolean always_in_place; diff --git a/gst/base/gstpushsrc.h b/gst/base/gstpushsrc.h index 54c5fe38b9..a7480b4c69 100644 --- a/gst/base/gstpushsrc.h +++ b/gst/base/gstpushsrc.h @@ -39,6 +39,11 @@ G_BEGIN_DECLS typedef struct _GstPushSrc GstPushSrc; typedef struct _GstPushSrcClass GstPushSrcClass; +/** + * GstPushSrc: + * + * The opaque #GstPushSrc data structure. + */ struct _GstPushSrc { GstBaseSrc parent; diff --git a/gst/elements/gstfakesink.h b/gst/elements/gstfakesink.h index cfebdcf175..53c2229b0d 100644 --- a/gst/elements/gstfakesink.h +++ b/gst/elements/gstfakesink.h @@ -41,6 +41,18 @@ G_BEGIN_DECLS #define GST_IS_FAKE_SINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKE_SINK)) +/** + * GstFakeSinkStateError: + * @FAKE_SINK_STATE_ERROR_NONE: no error + * @FAKE_SINK_STATE_ERROR_NULL_READY: cause the NULL to READY state change to fail + * @FAKE_SINK_STATE_ERROR_READY_PAUSED: cause the READY to PAUSED state change to fail: + * @FAKE_SINK_STATE_ERROR_PAUSED_PLAYING: cause the PAUSED to PLAYING state change to fail: + * @FAKE_SINK_STATE_ERROR_PLAYING_PAUSED: cause the PLAYING to PAUSED state change to fail: + * @FAKE_SINK_STATE_ERROR_PAUSED_READY: cause the PAUSED to READY state change to fail: + * @FAKE_SINK_STATE_ERROR_READY_NULL: cause the READY to NULL state change to fail: + * + * Possible state change errors for the state-error property. + */ typedef enum { FAKE_SINK_STATE_ERROR_NONE = 0, FAKE_SINK_STATE_ERROR_NULL_READY, @@ -54,6 +66,11 @@ typedef enum { typedef struct _GstFakeSink GstFakeSink; typedef struct _GstFakeSinkClass GstFakeSinkClass; +/** + * GstFakeSink: + * + * The opaque #GstFakeSink data structure. + */ struct _GstFakeSink { GstBaseSink element; diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index c4fde28de7..36bb47f296 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -139,7 +139,8 @@ gst_fake_src_data_get_type (void) }; if (!fakesrc_data_type) { - fakesrc_data_type = g_enum_register_static ("GstFakeSrcData", fakesrc_data); + fakesrc_data_type = + g_enum_register_static ("GstFakeSrcDataType", fakesrc_data); } return fakesrc_data_type; } @@ -174,10 +175,10 @@ gst_fake_src_filltype_get_type (void) {FAKE_SRC_FILLTYPE_ZERO, "Fill buffers with zeros", "zero"}, {FAKE_SRC_FILLTYPE_RANDOM, "Fill buffers with random crap", "random"}, {FAKE_SRC_FILLTYPE_PATTERN, "Fill buffers with pattern 0x00 -> 0xff", - "pattern"}, + "pattern"}, {FAKE_SRC_FILLTYPE_PATTERN_CONT, - "Fill buffers with pattern 0x00 -> 0xff that spans buffers", - "pattern-span"}, + "Fill buffers with pattern 0x00 -> 0xff that spans buffers", + "pattern-span"}, {0, NULL, NULL}, }; diff --git a/gst/elements/gstfakesrc.h b/gst/elements/gstfakesrc.h index c8901cf8aa..6601c12482 100644 --- a/gst/elements/gstfakesrc.h +++ b/gst/elements/gstfakesrc.h @@ -29,6 +29,19 @@ G_BEGIN_DECLS +/** + * GstFakeSrcOutputType: + * @FAKE_SRC_FIRST_LAST_LOOP: first pad then last pad + * @FAKE_SRC_LAST_FIRST_LOOP: last pad then first pad + * @FAKE_SRC_PING_PONG: ping pong between pads + * @FAKE_SRC_ORDERED_RANDOM: ordered random pad + * @FAKE_SRC_RANDOM: random pad + * @FAKE_SRC_PATTERN_LOOP: loop between pads in a particular pattern + * @FAKE_SRC_PING_PONG_PATTERN: ping pong based on a pattern + * @FAKE_SRC_GET_ALWAYS_SUCEEDS: a get always succeeds on a pad + * + * The different output types. Unused currently. + */ typedef enum { FAKE_SRC_FIRST_LAST_LOOP = 1, FAKE_SRC_LAST_FIRST_LOOP, @@ -40,17 +53,42 @@ typedef enum { FAKE_SRC_GET_ALWAYS_SUCEEDS } GstFakeSrcOutputType; +/** + * GstFakeSrcDataType: + * @FAKE_SRC_DATA_ALLOCATE: allocate buffers + * @FAKE_SRC_DATA_SUBBUFFER: subbuffer each buffer + * + * The different ways buffers are allocated. + */ typedef enum { FAKE_SRC_DATA_ALLOCATE = 1, FAKE_SRC_DATA_SUBBUFFER } GstFakeSrcDataType; +/** + * GstFakeSrcSizeType: + * @FAKE_SRC_SIZETYPE_EMPTY: create empty buffers + * @FAKE_SRC_SIZETYPE_FIXED: fixed buffer size + * @FAKE_SRC_SIZETYPE_RANDOM: random buffer size + * + * The different size of the allocated buffers. + */ typedef enum { FAKE_SRC_SIZETYPE_EMPTY = 1, FAKE_SRC_SIZETYPE_FIXED, FAKE_SRC_SIZETYPE_RANDOM } GstFakeSrcSizeType; +/** + * GstFakeSrcFillType: + * @FAKE_SRC_FILLTYPE_NOTHING: do not fill buffers + * @FAKE_SRC_FILLTYPE_ZERO: fill buffers with 0 + * @FAKE_SRC_FILLTYPE_RANDOM: fill buffers with random bytes + * @FAKE_SRC_FILLTYPE_PATTERN: fill buffers with a pattern + * @FAKE_SRC_FILLTYPE_PATTERN_CONT: fill buffers with a continuous pattern + * + * The different ways of filling the buffers. + */ typedef enum { FAKE_SRC_FILLTYPE_NOTHING = 1, FAKE_SRC_FILLTYPE_ZERO, @@ -73,6 +111,11 @@ typedef enum { typedef struct _GstFakeSrc GstFakeSrc; typedef struct _GstFakeSrcClass GstFakeSrcClass; +/** + * GstFakeSrc: + * + * Opaque #GstFakeSrc data structure. + */ struct _GstFakeSrc { GstBaseSrc element; diff --git a/gst/elements/gstfilesink.h b/gst/elements/gstfilesink.h index 89a31d4c10..17c0efa560 100644 --- a/gst/elements/gstfilesink.h +++ b/gst/elements/gstfilesink.h @@ -43,9 +43,15 @@ G_BEGIN_DECLS typedef struct _GstFileSink GstFileSink; typedef struct _GstFileSinkClass GstFileSinkClass; +/** + * GstFileSink: + * + * Opaque #GstFileSink structure. + */ struct _GstFileSink { GstBaseSink parent; + /*< private >*/ gchar *filename; gchar *uri; FILE *file; diff --git a/gst/elements/gstfilesrc.h b/gst/elements/gstfilesrc.h index 307f3c1261..d17a765a7b 100644 --- a/gst/elements/gstfilesrc.h +++ b/gst/elements/gstfilesrc.h @@ -45,9 +45,15 @@ G_BEGIN_DECLS typedef struct _GstFileSrc GstFileSrc; typedef struct _GstFileSrcClass GstFileSrcClass; +/** + * GstFileSrc: + * + * Opaque #GstFileSrc structure. + */ struct _GstFileSrc { GstBaseSrc element; + /*< private >*/ guint pagesize; /* system page size */ gchar *filename; /* filename */ diff --git a/gst/gst.c b/gst/gst.c index 3e52476a01..fcb285a8e4 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -91,11 +91,14 @@ * * * Use gst_version() to query the library version at runtime or use the - * GST_VERSION_* macros to find the version at compile time. + * GST_VERSION_* macros to find the version at compile time. Optionally + * gst_version_string() returns a printable string. * - * The functions gst_main() and gst_main_quit() enter and exit the main loop. - * GStreamer doesn't currently require you to use a mainloop but can intergrate - * with it without problems. + * The gst_deinit() call is used to clean up all internal resources used + * by GStreamer. It is mostly used in unit tests + * to check for leaks. + * + * Last reviewed on 2005-11-23 (0.9.5) */ #include diff --git a/gst/gstbin.c b/gst/gstbin.c index 79d84f3cc2..ca665c86a0 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -27,13 +27,13 @@ * SECTION:gstbin * @short_description: Base class and element that can contain other elements * - * GstBin is an element that can contain other elements, allowing them to be + * #GstBin is an element that can contain other #GstElement, allowing them to be * managed as a group. - * Pads from the child elements can be ghosted to the bin. + * Pads from the child elements can be ghosted to the bin, see #GstGhostPad. * This makes the bin look like any other elements and enables creation of * higher-level abstraction elements. * - * A new GstBin is created with gst_bin_new(). Use a #GstPipeline instead if you + * A new #GstBin is created with gst_bin_new(). Use a #GstPipeline instead if you * want to create a toplevel bin because a normal bin doesn't have a bus or * handle clock distribution of its own. * @@ -58,7 +58,7 @@ * * Notes * - * A GstBin internally intercepts every #GstMessage posted by its children and + * A #GstBin internally intercepts every #GstMessage posted by its children and * implements the following default behaviour for each of them: * * @@ -75,7 +75,7 @@ * * * GST_MESSAGE_SEGMENT_DONE - * Is posted by GstBin when all elements that posted + * Is posted by #GstBin when all elements that posted * a SEGMENT_START have posted a SEGMENT_DONE. * * @@ -84,7 +84,7 @@ * * * - * A GstBin implements the following default behaviour for answering to a + * A #GstBin implements the following default behaviour for answering to a * #GstQuery: * * @@ -105,7 +105,7 @@ * * * - * Last reviewed on 2005-10-28 (0.9.4) + * Last reviewed on 2005-11-23 (0.9.5) */ #include "gst_private.h" diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index e746c13e07..b4cf5ee88a 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -102,7 +102,7 @@ * the refcount drops to 0, any data pointed to by GST_BUFFER_MALLOCDATA() will * also be freed. * - * Last reviewed on October 28th, 2005 (0.9.4) + * Last reviewed on November 23th, 2005 (0.9.5) */ #include "gst_private.h" diff --git a/gst/gstbus.h b/gst/gstbus.h index 8dcd1dbb14..76252cef21 100644 --- a/gst/gstbus.h +++ b/gst/gstbus.h @@ -101,6 +101,11 @@ typedef GstBusSyncReply (*GstBusSyncHandler) (GstBus * bus, GstMessage * messag */ typedef gboolean (*GstBusFunc) (GstBus * bus, GstMessage * message, gpointer data); +/** + * GstBus: + * + * The opaque #GstBus data structure. + */ struct _GstBus { GstObject object; diff --git a/gst/gstcaps.c b/gst/gstcaps.c index fa84549d63..5300e580a1 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -60,7 +60,7 @@ * Various methods exist to work with the media types such as subtracting * or intersecting. * - * Last reviewed on 2005-11-09 (0.9.4) + * Last reviewed on 2005-11-23 (0.9.5) */ #ifdef HAVE_CONFIG_H diff --git a/gst/gstchildproxy.c b/gst/gstchildproxy.c index c61aa4deac..5fb07bad1a 100644 --- a/gst/gstchildproxy.c +++ b/gst/gstchildproxy.c @@ -26,7 +26,7 @@ * * This interface abstracts handling of property sets for child elements. * Imagine elements such as mixers or polyphonic generators. They all have - * multiple #GstPads or some kind of voice objects. The element acts as a + * multiple #GstPad or some kind of voice objects. The element acts as a * parent for those child objects. Each child has the same properties. * * By implementing this interface the child properties can be accessed from the diff --git a/gst/gstclock.c b/gst/gstclock.c index 46bf9f9f86..48a1561dc2 100644 --- a/gst/gstclock.c +++ b/gst/gstclock.c @@ -81,6 +81,15 @@ * running. Some clocks however do not progress when the element that provided * the clock is not PLAYING. * + * When a clock has the GST_CLOCK_FLAG_CAN_SET_MASTER flag set, it can be slaved to + * another #GstClock with the gst_clock_set_master(). The clock will then + * automatically be synchronized to this master clock by repeadedly sampling the + * master clock and the slave clock and recalibrating the slave clock with + * gst_clock_set_calibration(). This feature is mostly usefull for plugins that have + * an internal clock but must operate with another clock selected by the #GstPipeline. + * They can track the offset and rate difference of their internal clock relative to + * the master clock by using the gst_clock_get_calibration() function. + * * Last reviewed on 2005-10-28 (0.9.4) */ diff --git a/gst/gstelement.c b/gst/gstelement.c index f0fa15c254..19e5f2fad1 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -71,6 +71,8 @@ * Note that clock slection and distribution is normally handled by the * toplevel #GstPipeline so the clock functions are only to be used in very * specific situations. + * + * Last reviewed on 2005-11-23 (0.9.5) */ #include "gst_private.h" diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index fa85bc1679..56bb5c23d3 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -26,17 +26,10 @@ * @short_description: Create GstElements from a factory * @see_also: #GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate. * - * GstElementFactory is used to create instances of elements. A + * #GstElementFactory is used to create instances of elements. A * GstElementfactory can be added to a #GstPlugin as it is also a * #GstPluginFeature. * - * Use gst_element_factory_new() to create a new factory which can be added to - * a plugin with gst_plugin_add_feature(). - * - * gst_element_factory_add_pad_template() is used to add a padtemplate to the - * factory. This function will enable the application to query for - * elementfactories that handle a specific media type. - * * Use the gst_element_factory_find() and gst_element_factory_create() * functions to create element instances or use gst_element_factory_make() as a * convenient shortcut. @@ -58,8 +51,7 @@ * * * - * An elementfactory can be assigned a rank with gst_element_factory_set_rank() - * so that the autopluggers can select a plugin more appropriatly + * Last reviewed on 2005-11-23 (0.9.5) */ #include "gst_private.h" diff --git a/gst/gstelementfactory.h b/gst/gstelementfactory.h index 0d64ed1c31..b66396ad4b 100644 --- a/gst/gstelementfactory.h +++ b/gst/gstelementfactory.h @@ -92,6 +92,11 @@ struct _GstElementDetails #define GST_IS_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ELEMENT_FACTORY)) #define GST_IS_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT_FACTORY)) +/** + * GstElementFactory: + * + * The opaque #GstElementFactory data structure. + */ struct _GstElementFactory { GstPluginFeature parent; diff --git a/gst/gstevent.c b/gst/gstevent.c index d8f38e8f89..da4c5342d2 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -67,7 +67,10 @@ * ... * * + * + * Last reviewed on 2005-11-23 (0.9.5) */ + #include /* memcpy */ #include "gst_private.h" diff --git a/gst/gstghostpad.h b/gst/gstghostpad.h index 6f83bd0552..3e19f3a944 100644 --- a/gst/gstghostpad.h +++ b/gst/gstghostpad.h @@ -37,6 +37,11 @@ G_BEGIN_DECLS #define GST_GHOST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GHOST_PAD, GstGhostPad)) #define GST_GHOST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GHOST_PAD, GstGhostPadClass)) +/** + * GstGhostPad: + * + * Opaque #GstGhostPad structure. + */ typedef struct _GstGhostPad GstGhostPad; typedef struct _GstGhostPadClass GstGhostPadClass; diff --git a/gst/gstindex.h b/gst/gstindex.h index 894330fa18..2447861f52 100644 --- a/gst/gstindex.h +++ b/gst/gstindex.h @@ -316,9 +316,15 @@ typedef enum { */ #define GST_INDEX_IS_WRITABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_WRITABLE)) +/** + * GstIndex: + * + * Opaque #GstIndex structure. + */ struct _GstIndex { GstObject object; + /*< private >*/ GList *groups; GstIndexGroup *curgroup; gint maxgroup; @@ -334,12 +340,14 @@ struct _GstIndex { GHashTable *writers; gint last_id; + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; struct _GstIndexClass { GstObjectClass parent_class; + /*< protected >*/ gboolean (*get_writer_id) (GstIndex *index, gint *writer_id, gchar *writer_string); void (*commit) (GstIndex *index, gint id); @@ -355,6 +363,7 @@ struct _GstIndexClass { /* signals */ void (*entry_added) (GstIndex *index, GstIndexEntry *entry); + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; diff --git a/gst/gstinterface.h b/gst/gstinterface.h index 391a31236e..78dc076a4e 100644 --- a/gst/gstinterface.h +++ b/gst/gstinterface.h @@ -43,6 +43,11 @@ G_BEGIN_DECLS (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_IMPLEMENTS_INTERFACE, \ GstImplementsInterfaceClass)) +/** + * GstImplementsInterface: + * + * Opaque #GstImplementsInterface structure. + */ typedef struct _GstImplementsInterface GstImplementsInterface; typedef struct _GstImplementsInterfaceClass GstImplementsInterfaceClass; diff --git a/gst/gstminiobject.c b/gst/gstminiobject.c index 5954dc916e..eb94e71047 100644 --- a/gst/gstminiobject.c +++ b/gst/gstminiobject.c @@ -26,6 +26,8 @@ * 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. + * + * Last reviewed on 2005-11-23 (0.9.5) */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gst/gstminiobject.h b/gst/gstminiobject.h index d2d572166f..887dc2cec1 100644 --- a/gst/gstminiobject.h +++ b/gst/gstminiobject.h @@ -54,7 +54,10 @@ typedef GstMiniObject * (*GstMiniObjectCopyFunction) (const GstMiniObject *obj); * @obj: MiniObject to finalize * * Virtual function prototype for methods to free ressources used by - * mini-objects. + * mini-objects. Subclasses of the mini object are allowed to revive the + * passed object by doing a gst_mini_object_ref(). If the object is not + * revived after the finalize function, the memory associated with the + * object is freed. */ typedef void (*GstMiniObjectFinalizeFunction) (GstMiniObject *obj); diff --git a/gst/gstpad.c b/gst/gstpad.c index 6b507d9677..47a298ca25 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -36,7 +36,7 @@ * gst_pad_new_from_template(). * * Pads have #GstCaps attached to it to describe the media type they are - * capable of dealing with. gst_pad_get_caps() and gst_pad_try_set_caps() are + * capable of dealing with. gst_pad_get_caps() and gst_pad_set_caps() are * used to manipulate the caps of the pads. * Pads created from a pad template cannot set capabilities that are * incompatible with the pad template capabilities. @@ -51,14 +51,13 @@ * gst_pad_set_*_function() calls to register callbacks for various events * on the pads. * - * GstElements will use gst_pad_push() and gst_pad_pull() to push out + * GstElements will use gst_pad_push() and gst_pad_pull_range() to push out * or pull in a buffer. - * gst_pad_select() and gst_pad_selectv() are used by plugins to wait for the - * first incoming buffer or event on any of the given set of pads. * * To send a #GstEvent on a pad, use gst_pad_send_event(). * - * Last reviewed on December 13th, 2002 (0.5.0.1) + * Last reviewed on 2005-11-23 (0.9.5) + * */ #include "gst_private.h" @@ -3678,6 +3677,7 @@ dropping: * * Set the given private data gpointer on the pad. * This function can only be used by the element that owns the pad. + * No locking is performed in this function. */ void gst_pad_set_element_private (GstPad * pad, gpointer priv) @@ -3690,6 +3690,7 @@ gst_pad_set_element_private (GstPad * pad, gpointer priv) * @pad: the #GstPad to get the private data of. * * Gets the private data of a pad. + * No locking is performed in this function. * * Returns: a #gpointer to the private data. */ diff --git a/gst/gstpad.h b/gst/gstpad.h index fbe52aa6cd..376bb0e7ea 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -58,6 +58,8 @@ typedef struct _GstPadClass GstPadClass; * @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 + * + * Result values from gst_pad_link and friends. */ typedef enum { GST_PAD_LINK_OK = 0, @@ -152,7 +154,27 @@ typedef enum { #define GST_PAD_MODE_ACTIVATE(mode) ((mode) != GST_ACTIVATE_NONE) /* pad states */ +/** + * GstPadActivateFunction: + * @pad: a #GstPad + * + * This function is called when the pad is activated during the element + * READY to PAUSED state change. By default this function will call the + * activate function that puts the pad in push mode but elements can + * override this function to activate the pad in pull mode if they wish. + * + * Returns: TRUE if the pad could be activated. + */ typedef gboolean (*GstPadActivateFunction) (GstPad *pad); +/** + * GstPadActivateModeFunction: + * @pad: a #GstPad + * @active: activate or deactivate the pad. + * + * The prototype of the push and pull activate functions. + * + * Returns: TRUE if the pad could be activated or deactivated. + */ typedef gboolean (*GstPadActivateModeFunction) (GstPad *pad, gboolean active); @@ -197,9 +219,19 @@ typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event); /* deprecate me, check range should use seeking query */ +/** + * GstPadCheckGetRangeFunction: + * @pad: a #GstPad + * + * Check if @pad can be activated in pull mode. + * + * Returns: TRUE if the pad can operate in pull mode. + * + * Deprecated: use the seeking query to check if a pad can support + * random access. + */ typedef gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad); - /* internal links */ /** * GstPadIntLinkFunction: @@ -264,14 +296,74 @@ typedef void (*GstPadUnlinkFunction) (GstPad *pad); * * Returns a copy of the capabilities of the specified pad. By default this * function will return the pad template capabilities, but can optionally - * be overridden. + * be overridden by elements. * * Returns: a newly allocated copy #GstCaps of the pad. */ typedef GstCaps* (*GstPadGetCapsFunction) (GstPad *pad); + +/** + * GstPadSetCapsFunction: + * @pad: the #GstPad to set the capabilities of. + * @caps: the #GstCaps to set + * + * Set @caps on @pad. By default this function updates the caps of the + * pad but the function can be overriden by elements to perform extra + * actions or verifications. + * + * Returns: TRUE if the caps could be set on the pad. + */ typedef gboolean (*GstPadSetCapsFunction) (GstPad *pad, GstCaps *caps); +/** + * GstPadAcceptCapsFunction: + * @pad: the #GstPad to check + * @caps: the #GstCaps to check + * + * Check if @pad can accept @caps. By default this function will see if @caps + * intersect with the result from gst_pad_get_caps() by can be overridden to + * perform extra checks. + * + * Returns: TRUE if the caps can be accepted by the pad. + */ typedef gboolean (*GstPadAcceptCapsFunction) (GstPad *pad, GstCaps *caps); +/** + * GstPadFixateCapsFunction: + * @pad: a #GstPad + * @caps: the #GstCaps to fixate + * + * Given possibly unfixed caps @caps, let @pad use its default prefered + * format to make a fixed caps. @caps should be writable. By default this + * function will pick the first value of any ranges or lists in the caps but + * elements can override this function to perform other behaviour. + */ typedef void (*GstPadFixateCapsFunction) (GstPad *pad, GstCaps *caps); +/** + * GstPadBufferAllocFunction: + * @pad: a sink #GstPad + * @offset: the desired offset of the buffer + * @size: the desired size of the buffer + * @caps: the desired caps of the buffer + * @buf: pointer to hold the allocated buffer. + * + * Ask the sinkpad @pad to allocate a buffer with @offset, @size and @caps. + * The result will be stored in @buf. + * + * The purpose of this function is to allocate a buffer that is optimal to + * be processed by @pad. The function is mostly overridden by elements that can + * provide a hardware buffer in order to avoid additional memcpy operations. + * + * The function can return a buffer that does not have @caps, in which case the + * upstream element requests a format change. + * + * When this function returns anything else than GST_FLOW_OK, the buffer allocation + * failed and @buf does not contain valid data. + * + * By default this function returns a new buffer of @size and with @caps containing + * purely malloced data. + * + * Returns: GST_FLOW_OK if @buf contains a valid buffer, any other return + * value means @buf does not hold a valid buffer. + */ typedef GstFlowReturn (*GstPadBufferAllocFunction) (GstPad *pad, guint64 offset, guint size, GstCaps *caps, GstBuffer **buf); @@ -335,14 +427,54 @@ typedef enum { /* FIXME: this awful circular dependency need to be resolved properly (see padtemplate.h) */ typedef struct _GstPadTemplate GstPadTemplate; +/** + * GstPad: + * @element_private: private data owned by the parent element + * @padtemplate: padtemplate for this pad + * @direction: the direction of the pad, cannot change after creating + * the pad. + * @stream_rec_lock: recursive stream lock of the pad, used to protect + * the data used in streaming. + * @task: task for this pad if the pad is actively driving dataflow. + * @preroll_lock: lock used when prerolling + * @preroll_cond: conf to signal preroll + * @block_cond: conditional to signal pad block + * @block_callback: callback for the pad block if any + * @block_data: user data for @block_callback + * @caps: the current caps of the pad + * @getcapsfunc: function to get caps of the pad + * @setcapsfunc: function to set caps on the pad + * @acceptcapsfunc: function to check if pad can accept caps + * @fixatecapsfunc: function to fixate caps + * @activatefunc: pad activation function + * @activatepushfunc: function to activate/deactivate pad in push mode + * @activatepullfunc: function to activate/deactivate pad in pull mode + * @linkfunc: function called when pad is linked + * @unlinkfunc: function called when pad is unlinked + * @peer: the pad this pad is linked to + * @sched_private: private storage for the scheduler + * @chainfunc: function to chain data to pad + * @checkgetrangefunc: function to check if pad can operate in pull mode + * @getrangefunc: function to get a range of data from a pad + * @eventfunc: function to send an event to a pad + * @mode: current activation mode of the pad + * @querytypefunc: get list of supported queries + * @queryfunc: perform a query on the pad + * @intlinkfunc: get the internal links of this pad + * @bufferallocfunc: function to allocate a buffer for this pad + * @do_buffer_signals: counter counting installed buffer signals + * @do_event_signals: counter counting installed event signals + * + * The #GstPad structure. Use the functions to update the variables. + */ struct _GstPad { GstObject object; + /*< public >*/ gpointer element_private; GstPadTemplate *padtemplate; - /* direction cannot change after creating the pad */ GstPadDirection direction; /*< public >*/ /* with STREAM_LOCK */ @@ -464,12 +596,52 @@ struct _GstPadClass { #define GST_PAD_SET_FLUSHING(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLUSHING)) #define GST_PAD_UNSET_FLUSHING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLUSHING)) +/** + * GST_PAD_GET_STREAM_LOCK: + * @pad: a #GstPad + * + * Get the stream lock of @pad. The stream lock is protecting the + * resources used in the data processing functions of @pad. + */ #define GST_PAD_GET_STREAM_LOCK(pad) (GST_PAD_CAST(pad)->stream_rec_lock) +/** + * GST_PAD_STREAM_LOCK: + * @pad: a #GstPad + * + * Lock the stream lock of @pad. + */ #define GST_PAD_STREAM_LOCK(pad) (g_static_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad))) -#define GST_PAD_STREAM_TRYLOCK(pad) (g_static_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad))) -#define GST_PAD_STREAM_UNLOCK(pad) (g_static_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad))) -#define GST_PAD_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_PAD_GET_STREAM_LOCK(pad))) +/** + * GST_PAD_STREAM_LOCK_FULL: + * @pad: a #GstPad + * @t: the number of times to recursively lock + * + * Lock the stream lock of @pad @t times. + */ #define GST_PAD_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_PAD_GET_STREAM_LOCK(pad), t)) +/** + * GST_PAD_STREAM_TRYLOCK: + * @pad: a #GstPad + * + * Try to Lock the stream lock of the pad, return TRUE if the lock could be + * taken. + */ +#define GST_PAD_STREAM_TRYLOCK(pad) (g_static_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad))) +/** + * GST_PAD_STREAM_UNLOCK: + * @pad: a #GstPad + * + * Unlock the stream lock of @pad. + */ +#define GST_PAD_STREAM_UNLOCK(pad) (g_static_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad))) +/** + * GST_PAD_STREAM_UNLOCK_FULL: + * @pad: a #GstPad + * + * Fully unlock the recursive stream lock of @pad, return the number of times + * @pad was locked. + */ +#define GST_PAD_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_PAD_GET_STREAM_LOCK(pad))) #define GST_PAD_GET_PREROLL_LOCK(pad) (GST_PAD_CAST(pad)->preroll_lock) #define GST_PAD_PREROLL_LOCK(pad) (g_mutex_lock(GST_PAD_GET_PREROLL_LOCK(pad))) diff --git a/gst/gstpadtemplate.h b/gst/gstpadtemplate.h index d4c9d49ec3..2868dd9188 100644 --- a/gst/gstpadtemplate.h +++ b/gst/gstpadtemplate.h @@ -139,6 +139,15 @@ struct _GstPadTemplateClass { gpointer _gst_reserved[GST_PADDING]; }; +/** + * GstStaticPadTemplate: + * @name_template: the name of the template + * @direction: the direction of the template + * @presence: the presence of the template + * @static_caps: the caps of the template. + * + * Structure describing the #GstStaticPadTemplate. + */ struct _GstStaticPadTemplate { gchar *name_template; GstPadDirection direction; diff --git a/gst/gstpipeline.h b/gst/gstpipeline.h index 1a1af3d82e..263d2023f2 100644 --- a/gst/gstpipeline.h +++ b/gst/gstpipeline.h @@ -51,6 +51,16 @@ typedef enum { GST_PIPELINE_FLAG_LAST = (GST_BIN_FLAG_LAST << 4) } GstPipelineFlags; +/** + * GstPipeline: + * @fixed_clock: The fixed clock of the pipeline, used when + * GST_PIPELINE_FLAG_FIXED_CLOCK is set. + * @stream_time: The stream time of the pipeline. + * @delay: Extra delay added to base time to compensate for delay + * when setting elements to PLAYING. + * + * The #GstPipeline structure. + */ struct _GstPipeline { GstBin bin; diff --git a/gst/gstpluginfeature.h b/gst/gstpluginfeature.h index dfc6143ed2..4f7a641066 100644 --- a/gst/gstpluginfeature.h +++ b/gst/gstpluginfeature.h @@ -69,6 +69,11 @@ typedef enum { GST_RANK_PRIMARY = 256 } GstRank; +/** + * GstPluginFeature: + * + * Opaque #GstPluginFeature structure. + */ struct _GstPluginFeature { GstObject object; @@ -91,6 +96,13 @@ struct _GstPluginFeatureClass { gpointer _gst_reserved[GST_PADDING]; }; +/** + * GstTypeNameData: + * @name: a name + * @type: a GType + * + * Structure used for filtering based on @name and @type. + */ typedef struct { const gchar *name; GType type; diff --git a/gst/gstquery.h b/gst/gstquery.h index bea1a0446d..7032e7416a 100644 --- a/gst/gstquery.h +++ b/gst/gstquery.h @@ -101,11 +101,19 @@ struct _GstQueryTypeDefinition #define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type) +/** + * GstQuery: + * @mini_object: The parent #GstMiniObject type + * @type: the #GstQueryType + * @structure: the #GstStructure containing the query details. + * + * The #GstQuery structure. + */ struct _GstQuery { GstMiniObject mini_object; - /*< public > */ + /*< public > *//* with COW */ GstQueryType type; GstStructure *structure; diff --git a/gst/gstqueue.h b/gst/gstqueue.h index dc728e7a10..22315b0379 100644 --- a/gst/gstqueue.h +++ b/gst/gstqueue.h @@ -50,15 +50,29 @@ typedef struct _GstQueue GstQueue; typedef struct _GstQueueSize GstQueueSize; typedef struct _GstQueueClass GstQueueClass; +/** + * GstQueueSize: + * @buffers: number of buffers + * @bytes: number of bytes + * @time: amount of time + * + * Structure describing the size of a queue. + */ struct _GstQueueSize { - guint buffers; /* no. of buffers */ - guint bytes; /* no. of bytes */ - guint64 time; /* amount of time */ + guint buffers; + guint bytes; + guint64 time; }; +/** + * GstQueue: + * + * Opaque #GstQueue structure. + */ struct _GstQueue { GstElement element; + /*< private >*/ GstPad *sinkpad; GstPad *srcpad; diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index c41eebc82a..e57ed31507 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -23,6 +23,9 @@ * SECTION:gsttaglist * @short_description: List of tags and values used to describe media metadata * + * List of tags and values used to describe media metadata. + * + * Last reviewed on 2005-11-23 (0.9.5) */ #ifdef HAVE_CONFIG_H diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index 99fe2a55c7..67148c7329 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -28,6 +28,19 @@ G_BEGIN_DECLS +/** + * GstTagMergeMode: + * @GST_TAG_MERGE_UNDEFINED: undefined merge mode + * @GST_TAG_MERGE_REPLACE_ALL: replace all tags + * @GST_TAG_MERGE_REPLACE: replace tags + * @GST_TAG_MERGE_APPEND: append tags + * @GST_TAG_MERGE_PREPEND: prepend tags + * @GST_TAG_MERGE_KEEP: keep existing tags + * @GST_TAG_MERGE_KEEP_ALL: keep all existing tags + * @GST_TAG_MERGE_COUNT: the number of merge modes + * + * The different tag merging modes. + */ typedef enum { GST_TAG_MERGE_UNDEFINED, GST_TAG_MERGE_REPLACE_ALL, @@ -42,6 +55,16 @@ typedef enum { #define GST_TAG_MODE_IS_VALID(mode) (((mode) > GST_TAG_MERGE_UNDEFINED) && ((mode) < GST_TAG_MERGE_COUNT)) +/** + * GstTagFlag: + * @GST_TAG_FLAG_UNDEFINED: undefined flag + * @GST_TAG_FLAG_META: tag is meta data + * @GST_TAG_FLAG_ENCODED: tag is encoded + * @GST_TAG_FLAG_DECODED: tag is decoded + * @GST_TAG_FLAG_COUNT: number of tag flags + * + * Extra tag flags used when registering tags. + */ typedef enum { GST_TAG_FLAG_UNDEFINED, GST_TAG_FLAG_META, @@ -52,6 +75,11 @@ typedef enum { #define GST_TAG_FLAG_IS_VALID(flag) (((flag) > GST_TAG_FLAG_UNDEFINED) && ((flag) < GST_TAG_FLAG_COUNT)) +/** + * GstTagList: + * + * Opaque #GstTagList data structure. + */ typedef GstStructure GstTagList; #define GST_TAG_LIST(x) ((GstTagList *) (x)) #define GST_IS_TAG_LIST(x) (gst_is_tag_list (GST_TAG_LIST (x))) @@ -70,6 +98,14 @@ typedef void (*GstTagForeachFunc) (const GstTagList *list, const gchar * tag, gpointer user_data); +/** + * GstTagMergeFunc: + * @dest: the destination #GValue + * @src: the source #GValue + * + * A function for merging multiple values of a tag used when registering + * tags. + */ typedef void (* GstTagMergeFunc) (GValue *dest, const GValue *src); /* initialize tagging system */ diff --git a/gst/gsttagsetter.c b/gst/gsttagsetter.c index 2e8d563eb5..dbcb975294 100644 --- a/gst/gsttagsetter.c +++ b/gst/gsttagsetter.c @@ -24,9 +24,11 @@ * @short_description: Element interface that allows setting and retrieval * of media metadata * + * Element interface that allows setting and retrieval of media metadata. + * + * Last reviewed on 2005-11-23 (0.9.5) */ - #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/gst/gsttagsetter.h b/gst/gsttagsetter.h index 5536ab1b13..c6322eec60 100644 --- a/gst/gsttagsetter.h +++ b/gst/gsttagsetter.h @@ -32,9 +32,20 @@ G_BEGIN_DECLS #define GST_IS_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TAG_SETTER)) #define GST_TAG_SETTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_TAG_SETTER, GstTagSetterIFace)) +/** + * GstTagSetter: + * + * Opaque #GstTagSetter data structure. + */ typedef struct _GstTagSetter GstTagSetter; /* Dummy typedef */ typedef struct _GstTagSetterIFace GstTagSetterIFace; +/** + * GstTagSetterIFace: + * @g_iface: parent interface type. + * + * #GstTagSetterIFace interface. + */ /* use an empty interface here to allow detection of elements using user-set tags */ struct _GstTagSetterIFace diff --git a/gst/gsttrace.c b/gst/gsttrace.c index 82a8be6a96..627fec6895 100644 --- a/gst/gsttrace.c +++ b/gst/gsttrace.c @@ -78,6 +78,13 @@ read_tsc (gint64 * dst) #endif } +/** + * gst_trace_read_tsc: + * @dst: pointer to hold the result. + * + * Read a platform independent timer value that can be used in + * benchmarks. + */ void gst_trace_read_tsc (gint64 * dst) { @@ -87,6 +94,16 @@ gst_trace_read_tsc (gint64 * dst) GstTrace *_gst_trace_default = NULL; gint _gst_trace_on = 1; +/** + * gst_trace_new: + * @filename: a filename + * @size: the max size of the file + * + * Create a ringbuffer of @size in the file with @filename to + * store trace results in. + * + * Returns: a new #GstTrace. + */ GstTrace * gst_trace_new (gchar * filename, gint size) { @@ -113,6 +130,12 @@ gst_trace_new (gchar * filename, gint size) return trace; } +/** + * gst_trace_destroy: + * @trace: the #GstTrace to destroy + * + * Flush an close the previously allocated @trace. + */ void gst_trace_destroy (GstTrace * trace) { @@ -126,6 +149,14 @@ gst_trace_destroy (GstTrace * trace) g_free (trace); } +/** + * gst_trace_flush: + * @trace: the #GstTrace to flush. + * + * Flush any pending trace entries in @trace to the trace file. + * @trace can be NULL in which case the default #GstTrace will be + * flushed. + */ void gst_trace_flush (GstTrace * trace) { @@ -140,6 +171,15 @@ gst_trace_flush (GstTrace * trace) trace->bufoffset = 0; } +/** + * gst_trace_text_flush: + * @trace: the #GstTrace to flush. + * + * Flush any pending trace entries in @trace to the trace file, + * formatted as a text line with timestamp and sequence numbers. + * @trace can be NULL in which case the default #GstTrace will be + * flushed. + */ void gst_trace_text_flush (GstTrace * trace) { @@ -164,6 +204,12 @@ gst_trace_text_flush (GstTrace * trace) #undef STRSIZE } +/** + * gst_trace_set_default: + * @trace: the #GstTrace to set as the default. + * + * Set the default #GstTrace to @trace. + */ void gst_trace_set_default (GstTrace * trace) { diff --git a/gst/gsttrace.h b/gst/gsttrace.h index ecaa415dec..91dab2f0d7 100644 --- a/gst/gsttrace.h +++ b/gst/gsttrace.h @@ -33,7 +33,13 @@ G_BEGIN_DECLS typedef struct _GstTrace GstTrace; typedef struct _GstTraceEntry GstTraceEntry; +/** + * GstTrace: + * + * Opaque #GstTrace structure. + */ struct _GstTrace { + /*< private >*/ /* where this trace is going */ gchar *filename; int fd; @@ -58,8 +64,26 @@ GstTrace* gst_trace_new (gchar *filename, gint size); void gst_trace_destroy (GstTrace *trace); void gst_trace_flush (GstTrace *trace); void gst_trace_text_flush (GstTrace *trace); +/** + * gst_trace_get_size: + * @trace: a #GstTrace + * + * Retrieve the buffer size of @trace. + */ #define gst_trace_get_size(trace) ((trace)->bufsize) +/** + * gst_trace_get_offset: + * @trace: a #GstTrace + * + * Retrieve the current buffer offset of @trace. + */ #define gst_trace_get_offset(trace) ((trace)->bufoffset) +/** + * gst_trace_get_remaining: + * @trace: a #GstTrace + * + * Retrieve the remaining size in the @trace buffer. + */ #define gst_trace_get_remaining(trace) ((trace)->bufsize - (trace)->bufoffset) void gst_trace_set_default (GstTrace *trace); @@ -163,6 +187,16 @@ G_STMT_START { \ extern gint _gst_trace_on; +/** + * gst_trace_add_entry: + * @trace: a #GstTrace + * @seq: a sequence number + * @data: the data to trace + * @msg: the trace message + * + * Add an entry to @trace with sequence number @seq, @data and @msg. + * If @trace is NULL, the entry will be added to the default #GstTrace. + */ #define gst_trace_add_entry(trace,seq,data,msg) \ if (_gst_trace_on) { \ _gst_trace_add_entry(trace,(guint32)seq,(guint32)data,msg); \ diff --git a/gst/gsttypefind.h b/gst/gsttypefind.h index 1c23d87539..a8e061f21f 100644 --- a/gst/gsttypefind.h +++ b/gst/gsttypefind.h @@ -40,6 +40,17 @@ typedef struct _GstTypeFind GstTypeFind; */ typedef void (* GstTypeFindFunction) (GstTypeFind *find, gpointer data); +/** + * GstTypeFindProbability: + * @GST_TYPE_FIND_MINIMUM: unlikely typefind + * @GST_TYPE_FIND_POSSIBLE: possible type detected + * @GST_TYPE_FIND_LIKELY: likely a type was detected + * @GST_TYPE_FIND_NEARLY_CERTAIN: nearly certain that a type was detected + * @GST_TYPE_FIND_MAXIMUM: very certain a type was detected. + * + * The probability of the typefind function. Higher values have more certainty + * in doing a reliable typefind. + */ typedef enum { GST_TYPE_FIND_MINIMUM = 1, GST_TYPE_FIND_POSSIBLE = 50, diff --git a/gst/gsturi.h b/gst/gsturi.h index f50c9439f4..f76f56dc54 100644 --- a/gst/gsturi.h +++ b/gst/gsturi.h @@ -60,6 +60,11 @@ typedef enum { #define GST_URI_HANDLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_URI_HANDLER, GstURIHandlerInterface)) #define GST_URI_HANDLER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GST_TYPE_URI_HANDLER, GstURIHandler)) +/** + * GstURIHandler: + * + * Opaque #GstURIHandler structure. + */ typedef struct _GstURIHandler GstURIHandler; typedef struct _GstURIHandlerInterface GstURIHandlerInterface; diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 3799ab23ad..9f631a48b1 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -21,6 +21,9 @@ * SECTION:gstvalue * @short_description: GValue implementations specific to GStreamer * + * GValue implementations specific to GStreamer. + * + * Last reviewed on 2005-11-23 (0.9.5) */ #ifdef HAVE_CONFIG_H diff --git a/gst/net/gstnetclientclock.c b/gst/net/gstnetclientclock.c index 20e883ea2e..4f24f9abd4 100644 --- a/gst/net/gstnetclientclock.c +++ b/gst/net/gstnetclientclock.c @@ -21,6 +21,30 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +/** + * SECTION:gstnetclientclock + * @short_description: Special clock that synchronizes to a remote time + * provider. + * @see_also: #GstClock, #GstNetTimeProvider, #GstPipeline + * + * This object implements a custom #GstClock that synchronizes its time + * to a remote time provider such as #GstNetTimeProvider. + * + * A new clock is created with gst_net_client_clock_new() which takes the + * address and port of the remote time provider along with a name and + * an initial time. + * + * This clock will poll the time provider and will update its calibration + * parameters based on the local and remote observations. + * + * Various parameters of the clock can be configured with the parent #GstClock + * "timeout", "window-size" and "window-threshold" object properties. + * + * A #GstNetClientClock is typically set on a #GstPipeline with + * gst_pipeline_use_clock(). + * + * Last reviewed on 2005-11-23 (0.9.5) + */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gst/net/gstnetclientclock.h b/gst/net/gstnetclientclock.h index c4af8c2aa2..1b7412ed98 100644 --- a/gst/net/gstnetclientclock.h +++ b/gst/net/gstnetclientclock.h @@ -55,6 +55,11 @@ G_BEGIN_DECLS typedef struct _GstNetClientClock GstNetClientClock; typedef struct _GstNetClientClockClass GstNetClientClockClass; +/** + * GstNetClientClock: + * + * Opaque #GstNetClientClock structure. + */ struct _GstNetClientClock { GstSystemClock clock; diff --git a/gst/net/gstnettimepacket.c b/gst/net/gstnettimepacket.c index b5aeea0c99..16c311af13 100644 --- a/gst/net/gstnettimepacket.c +++ b/gst/net/gstnettimepacket.c @@ -16,7 +16,17 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - +/** + * SECTION:gstnettimepacket + * @short_description: Helper structure to construct clock packets used + * by network clocks. + * @see_also: #GstClock, #GstNetClientClock, #GstNetTimeProvider + * + * Various functions for receiving, sending an serializing #GstNetTimePacket + * structures. + * + * Last reviewed on 2005-11-23 (0.9.5) + */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gst/net/gstnettimeprovider.c b/gst/net/gstnettimeprovider.c index 0258dd7e0d..00e8094dfd 100644 --- a/gst/net/gstnettimeprovider.c +++ b/gst/net/gstnettimeprovider.c @@ -16,7 +16,24 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - +/** + * SECTION:gstnettimeprovider + * @short_description: Special object that exposed the time of a clock + * on the network. + * @see_also: #GstClock, #GstNetClientClock, #GstPipeline + * + * This object exposes the time of a #GstClock on the network. + * + * A #GstNetTimeProvider is created with gst_net_time_provider_new() which + * takes a #GstClock, an address and a port numner as arguments. + * + * After creating the object, a client clock such as #GstNetClientClock can + * query the exposed clock for its values. + * + * The #GstNetTimeProvider typically wraps the clock used by a #GstPipeline. + * + * Last reviewed on 2005-11-23 (0.9.5) + */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gst/net/gstnettimeprovider.h b/gst/net/gstnettimeprovider.h index 9c8e3b6862..e05bad1a16 100644 --- a/gst/net/gstnettimeprovider.h +++ b/gst/net/gstnettimeprovider.h @@ -49,9 +49,15 @@ G_BEGIN_DECLS typedef struct _GstNetTimeProvider GstNetTimeProvider; typedef struct _GstNetTimeProviderClass GstNetTimeProviderClass; +/** + * GstNetTimeProvider: + * + * Opaque #GstNetTimeProvider structure. + */ struct _GstNetTimeProvider { GstObject parent; + /*< private >*/ gchar *address; int port; @@ -61,6 +67,9 @@ struct _GstNetTimeProvider { GThread *thread; GstClock *clock; + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; }; struct _GstNetTimeProviderClass { diff --git a/libs/gst/base/gstadapter.h b/libs/gst/base/gstadapter.h index d6e5d595d5..62565d7a15 100644 --- a/libs/gst/base/gstadapter.h +++ b/libs/gst/base/gstadapter.h @@ -42,6 +42,11 @@ G_BEGIN_DECLS typedef struct _GstAdapter GstAdapter; typedef struct _GstAdapterClass GstAdapterClass; +/** + * GstAdapter: + * + * The opaque #GstAdapter data structure. + */ struct _GstAdapter { GObject object; diff --git a/libs/gst/base/gstbasesink.h b/libs/gst/base/gstbasesink.h index d436708141..fdb24af9d9 100644 --- a/libs/gst/base/gstbasesink.h +++ b/libs/gst/base/gstbasesink.h @@ -47,6 +47,11 @@ G_BEGIN_DECLS typedef struct _GstBaseSink GstBaseSink; typedef struct _GstBaseSinkClass GstBaseSinkClass; +/** + * GstBaseSink: + * + * The opaque #GstBaseSink data structure. + */ struct _GstBaseSink { GstElement element; diff --git a/libs/gst/base/gstbasesrc.h b/libs/gst/base/gstbasesrc.h index 1d788a5a90..908c7c3c61 100644 --- a/libs/gst/base/gstbasesrc.h +++ b/libs/gst/base/gstbasesrc.h @@ -61,11 +61,17 @@ typedef struct _GstBaseSrcClass GstBaseSrcClass; #define GST_BASE_SRC_PAD(obj) (GST_BASE_SRC_CAST (obj)->srcpad) +/** + * GstBaseSrc: + * + * The opaque #GstBaseSrc data structure. + */ struct _GstBaseSrc { GstElement element; + + /*< protected >*/ GstPad *srcpad; - /*< public >*/ /* available to subclass implementations */ /* MT-protected (with LIVE_LOCK) */ GMutex *live_lock; diff --git a/libs/gst/base/gstbasetransform.h b/libs/gst/base/gstbasetransform.h index fdd4ac1ef5..3b92cc8c73 100644 --- a/libs/gst/base/gstbasetransform.h +++ b/libs/gst/base/gstbasetransform.h @@ -49,14 +49,19 @@ G_BEGIN_DECLS typedef struct _GstBaseTransform GstBaseTransform; typedef struct _GstBaseTransformClass GstBaseTransformClass; +/** + * GstBaseTransform: + * + * The opaque #GstBaseTransform data structure. + */ struct _GstBaseTransform { GstElement element; + /*< protected >*/ /* source and sink pads */ GstPad *sinkpad; GstPad *srcpad; - /*< public >*/ /* Set by sub-class */ gboolean passthrough; gboolean always_in_place; diff --git a/libs/gst/base/gstpushsrc.h b/libs/gst/base/gstpushsrc.h index 54c5fe38b9..a7480b4c69 100644 --- a/libs/gst/base/gstpushsrc.h +++ b/libs/gst/base/gstpushsrc.h @@ -39,6 +39,11 @@ G_BEGIN_DECLS typedef struct _GstPushSrc GstPushSrc; typedef struct _GstPushSrcClass GstPushSrcClass; +/** + * GstPushSrc: + * + * The opaque #GstPushSrc data structure. + */ struct _GstPushSrc { GstBaseSrc parent; diff --git a/libs/gst/net/gstnetclientclock.c b/libs/gst/net/gstnetclientclock.c index 20e883ea2e..4f24f9abd4 100644 --- a/libs/gst/net/gstnetclientclock.c +++ b/libs/gst/net/gstnetclientclock.c @@ -21,6 +21,30 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +/** + * SECTION:gstnetclientclock + * @short_description: Special clock that synchronizes to a remote time + * provider. + * @see_also: #GstClock, #GstNetTimeProvider, #GstPipeline + * + * This object implements a custom #GstClock that synchronizes its time + * to a remote time provider such as #GstNetTimeProvider. + * + * A new clock is created with gst_net_client_clock_new() which takes the + * address and port of the remote time provider along with a name and + * an initial time. + * + * This clock will poll the time provider and will update its calibration + * parameters based on the local and remote observations. + * + * Various parameters of the clock can be configured with the parent #GstClock + * "timeout", "window-size" and "window-threshold" object properties. + * + * A #GstNetClientClock is typically set on a #GstPipeline with + * gst_pipeline_use_clock(). + * + * Last reviewed on 2005-11-23 (0.9.5) + */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/libs/gst/net/gstnetclientclock.h b/libs/gst/net/gstnetclientclock.h index c4af8c2aa2..1b7412ed98 100644 --- a/libs/gst/net/gstnetclientclock.h +++ b/libs/gst/net/gstnetclientclock.h @@ -55,6 +55,11 @@ G_BEGIN_DECLS typedef struct _GstNetClientClock GstNetClientClock; typedef struct _GstNetClientClockClass GstNetClientClockClass; +/** + * GstNetClientClock: + * + * Opaque #GstNetClientClock structure. + */ struct _GstNetClientClock { GstSystemClock clock; diff --git a/libs/gst/net/gstnettimepacket.c b/libs/gst/net/gstnettimepacket.c index b5aeea0c99..16c311af13 100644 --- a/libs/gst/net/gstnettimepacket.c +++ b/libs/gst/net/gstnettimepacket.c @@ -16,7 +16,17 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - +/** + * SECTION:gstnettimepacket + * @short_description: Helper structure to construct clock packets used + * by network clocks. + * @see_also: #GstClock, #GstNetClientClock, #GstNetTimeProvider + * + * Various functions for receiving, sending an serializing #GstNetTimePacket + * structures. + * + * Last reviewed on 2005-11-23 (0.9.5) + */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/libs/gst/net/gstnettimeprovider.c b/libs/gst/net/gstnettimeprovider.c index 0258dd7e0d..00e8094dfd 100644 --- a/libs/gst/net/gstnettimeprovider.c +++ b/libs/gst/net/gstnettimeprovider.c @@ -16,7 +16,24 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - +/** + * SECTION:gstnettimeprovider + * @short_description: Special object that exposed the time of a clock + * on the network. + * @see_also: #GstClock, #GstNetClientClock, #GstPipeline + * + * This object exposes the time of a #GstClock on the network. + * + * A #GstNetTimeProvider is created with gst_net_time_provider_new() which + * takes a #GstClock, an address and a port numner as arguments. + * + * After creating the object, a client clock such as #GstNetClientClock can + * query the exposed clock for its values. + * + * The #GstNetTimeProvider typically wraps the clock used by a #GstPipeline. + * + * Last reviewed on 2005-11-23 (0.9.5) + */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/libs/gst/net/gstnettimeprovider.h b/libs/gst/net/gstnettimeprovider.h index 9c8e3b6862..e05bad1a16 100644 --- a/libs/gst/net/gstnettimeprovider.h +++ b/libs/gst/net/gstnettimeprovider.h @@ -49,9 +49,15 @@ G_BEGIN_DECLS typedef struct _GstNetTimeProvider GstNetTimeProvider; typedef struct _GstNetTimeProviderClass GstNetTimeProviderClass; +/** + * GstNetTimeProvider: + * + * Opaque #GstNetTimeProvider structure. + */ struct _GstNetTimeProvider { GstObject parent; + /*< private >*/ gchar *address; int port; @@ -61,6 +67,9 @@ struct _GstNetTimeProvider { GThread *thread; GstClock *clock; + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; }; struct _GstNetTimeProviderClass { diff --git a/plugins/elements/gstfakesink.h b/plugins/elements/gstfakesink.h index cfebdcf175..53c2229b0d 100644 --- a/plugins/elements/gstfakesink.h +++ b/plugins/elements/gstfakesink.h @@ -41,6 +41,18 @@ G_BEGIN_DECLS #define GST_IS_FAKE_SINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKE_SINK)) +/** + * GstFakeSinkStateError: + * @FAKE_SINK_STATE_ERROR_NONE: no error + * @FAKE_SINK_STATE_ERROR_NULL_READY: cause the NULL to READY state change to fail + * @FAKE_SINK_STATE_ERROR_READY_PAUSED: cause the READY to PAUSED state change to fail: + * @FAKE_SINK_STATE_ERROR_PAUSED_PLAYING: cause the PAUSED to PLAYING state change to fail: + * @FAKE_SINK_STATE_ERROR_PLAYING_PAUSED: cause the PLAYING to PAUSED state change to fail: + * @FAKE_SINK_STATE_ERROR_PAUSED_READY: cause the PAUSED to READY state change to fail: + * @FAKE_SINK_STATE_ERROR_READY_NULL: cause the READY to NULL state change to fail: + * + * Possible state change errors for the state-error property. + */ typedef enum { FAKE_SINK_STATE_ERROR_NONE = 0, FAKE_SINK_STATE_ERROR_NULL_READY, @@ -54,6 +66,11 @@ typedef enum { typedef struct _GstFakeSink GstFakeSink; typedef struct _GstFakeSinkClass GstFakeSinkClass; +/** + * GstFakeSink: + * + * The opaque #GstFakeSink data structure. + */ struct _GstFakeSink { GstBaseSink element; diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index c4fde28de7..36bb47f296 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -139,7 +139,8 @@ gst_fake_src_data_get_type (void) }; if (!fakesrc_data_type) { - fakesrc_data_type = g_enum_register_static ("GstFakeSrcData", fakesrc_data); + fakesrc_data_type = + g_enum_register_static ("GstFakeSrcDataType", fakesrc_data); } return fakesrc_data_type; } @@ -174,10 +175,10 @@ gst_fake_src_filltype_get_type (void) {FAKE_SRC_FILLTYPE_ZERO, "Fill buffers with zeros", "zero"}, {FAKE_SRC_FILLTYPE_RANDOM, "Fill buffers with random crap", "random"}, {FAKE_SRC_FILLTYPE_PATTERN, "Fill buffers with pattern 0x00 -> 0xff", - "pattern"}, + "pattern"}, {FAKE_SRC_FILLTYPE_PATTERN_CONT, - "Fill buffers with pattern 0x00 -> 0xff that spans buffers", - "pattern-span"}, + "Fill buffers with pattern 0x00 -> 0xff that spans buffers", + "pattern-span"}, {0, NULL, NULL}, }; diff --git a/plugins/elements/gstfakesrc.h b/plugins/elements/gstfakesrc.h index c8901cf8aa..6601c12482 100644 --- a/plugins/elements/gstfakesrc.h +++ b/plugins/elements/gstfakesrc.h @@ -29,6 +29,19 @@ G_BEGIN_DECLS +/** + * GstFakeSrcOutputType: + * @FAKE_SRC_FIRST_LAST_LOOP: first pad then last pad + * @FAKE_SRC_LAST_FIRST_LOOP: last pad then first pad + * @FAKE_SRC_PING_PONG: ping pong between pads + * @FAKE_SRC_ORDERED_RANDOM: ordered random pad + * @FAKE_SRC_RANDOM: random pad + * @FAKE_SRC_PATTERN_LOOP: loop between pads in a particular pattern + * @FAKE_SRC_PING_PONG_PATTERN: ping pong based on a pattern + * @FAKE_SRC_GET_ALWAYS_SUCEEDS: a get always succeeds on a pad + * + * The different output types. Unused currently. + */ typedef enum { FAKE_SRC_FIRST_LAST_LOOP = 1, FAKE_SRC_LAST_FIRST_LOOP, @@ -40,17 +53,42 @@ typedef enum { FAKE_SRC_GET_ALWAYS_SUCEEDS } GstFakeSrcOutputType; +/** + * GstFakeSrcDataType: + * @FAKE_SRC_DATA_ALLOCATE: allocate buffers + * @FAKE_SRC_DATA_SUBBUFFER: subbuffer each buffer + * + * The different ways buffers are allocated. + */ typedef enum { FAKE_SRC_DATA_ALLOCATE = 1, FAKE_SRC_DATA_SUBBUFFER } GstFakeSrcDataType; +/** + * GstFakeSrcSizeType: + * @FAKE_SRC_SIZETYPE_EMPTY: create empty buffers + * @FAKE_SRC_SIZETYPE_FIXED: fixed buffer size + * @FAKE_SRC_SIZETYPE_RANDOM: random buffer size + * + * The different size of the allocated buffers. + */ typedef enum { FAKE_SRC_SIZETYPE_EMPTY = 1, FAKE_SRC_SIZETYPE_FIXED, FAKE_SRC_SIZETYPE_RANDOM } GstFakeSrcSizeType; +/** + * GstFakeSrcFillType: + * @FAKE_SRC_FILLTYPE_NOTHING: do not fill buffers + * @FAKE_SRC_FILLTYPE_ZERO: fill buffers with 0 + * @FAKE_SRC_FILLTYPE_RANDOM: fill buffers with random bytes + * @FAKE_SRC_FILLTYPE_PATTERN: fill buffers with a pattern + * @FAKE_SRC_FILLTYPE_PATTERN_CONT: fill buffers with a continuous pattern + * + * The different ways of filling the buffers. + */ typedef enum { FAKE_SRC_FILLTYPE_NOTHING = 1, FAKE_SRC_FILLTYPE_ZERO, @@ -73,6 +111,11 @@ typedef enum { typedef struct _GstFakeSrc GstFakeSrc; typedef struct _GstFakeSrcClass GstFakeSrcClass; +/** + * GstFakeSrc: + * + * Opaque #GstFakeSrc data structure. + */ struct _GstFakeSrc { GstBaseSrc element; diff --git a/plugins/elements/gstfilesink.h b/plugins/elements/gstfilesink.h index 89a31d4c10..17c0efa560 100644 --- a/plugins/elements/gstfilesink.h +++ b/plugins/elements/gstfilesink.h @@ -43,9 +43,15 @@ G_BEGIN_DECLS typedef struct _GstFileSink GstFileSink; typedef struct _GstFileSinkClass GstFileSinkClass; +/** + * GstFileSink: + * + * Opaque #GstFileSink structure. + */ struct _GstFileSink { GstBaseSink parent; + /*< private >*/ gchar *filename; gchar *uri; FILE *file; diff --git a/plugins/elements/gstfilesrc.h b/plugins/elements/gstfilesrc.h index 307f3c1261..d17a765a7b 100644 --- a/plugins/elements/gstfilesrc.h +++ b/plugins/elements/gstfilesrc.h @@ -45,9 +45,15 @@ G_BEGIN_DECLS typedef struct _GstFileSrc GstFileSrc; typedef struct _GstFileSrcClass GstFileSrcClass; +/** + * GstFileSrc: + * + * Opaque #GstFileSrc structure. + */ struct _GstFileSrc { GstBaseSrc element; + /*< private >*/ guint pagesize; /* system page size */ gchar *filename; /* filename */ diff --git a/plugins/elements/gstqueue.h b/plugins/elements/gstqueue.h index dc728e7a10..22315b0379 100644 --- a/plugins/elements/gstqueue.h +++ b/plugins/elements/gstqueue.h @@ -50,15 +50,29 @@ typedef struct _GstQueue GstQueue; typedef struct _GstQueueSize GstQueueSize; typedef struct _GstQueueClass GstQueueClass; +/** + * GstQueueSize: + * @buffers: number of buffers + * @bytes: number of bytes + * @time: amount of time + * + * Structure describing the size of a queue. + */ struct _GstQueueSize { - guint buffers; /* no. of buffers */ - guint bytes; /* no. of bytes */ - guint64 time; /* amount of time */ + guint buffers; + guint bytes; + guint64 time; }; +/** + * GstQueue: + * + * Opaque #GstQueue structure. + */ struct _GstQueue { GstElement element; + /*< private >*/ GstPad *sinkpad; GstPad *srcpad;