+2005-11-24 Wim Taymans <wim@fluendo.com>
+
+ * 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 <thomas at apestaart dot org>
* configure.ac: back to HEAD
GST_PAD_STREAM_TRYLOCK
GST_PAD_STREAM_UNLOCK
GST_PAD_STREAM_UNLOCK_FULL
+
GST_FLOW_IS_FATAL
<SUBSECTION Standard>
<FILE>gsttrace</FILE>
<TITLE>GstTrace</TITLE>
GstTrace
-GstTraceEntry
gst_trace_new
gst_trace_destroy
gst_trace_flush
gst_alloc_trace_free
<SUBSECTION Standard>
GST_TYPE_ALLOC_TRACE_FLAGS
-<SUBSECTION Private>
gst_alloc_trace_flags_get_type
+<SUBSECTION Private>
+GstTraceEntry
</SECTION>
typedef struct _GstAdapter GstAdapter;
typedef struct _GstAdapterClass GstAdapterClass;
+/**
+ * GstAdapter:
+ *
+ * The opaque #GstAdapter data structure.
+ */
struct _GstAdapter {
GObject object;
typedef struct _GstBaseSink GstBaseSink;
typedef struct _GstBaseSinkClass GstBaseSinkClass;
+/**
+ * GstBaseSink:
+ *
+ * The opaque #GstBaseSink data structure.
+ */
struct _GstBaseSink {
GstElement element;
#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;
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;
typedef struct _GstPushSrc GstPushSrc;
typedef struct _GstPushSrcClass GstPushSrcClass;
+/**
+ * GstPushSrc:
+ *
+ * The opaque #GstPushSrc data structure.
+ */
struct _GstPushSrc {
GstBaseSrc parent;
#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,
typedef struct _GstFakeSink GstFakeSink;
typedef struct _GstFakeSinkClass GstFakeSinkClass;
+/**
+ * GstFakeSink:
+ *
+ * The opaque #GstFakeSink data structure.
+ */
struct _GstFakeSink {
GstBaseSink element;
};
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;
}
{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},
};
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,
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,
typedef struct _GstFakeSrc GstFakeSrc;
typedef struct _GstFakeSrcClass GstFakeSrcClass;
+/**
+ * GstFakeSrc:
+ *
+ * Opaque #GstFakeSrc data structure.
+ */
struct _GstFakeSrc {
GstBaseSrc element;
typedef struct _GstFileSink GstFileSink;
typedef struct _GstFileSinkClass GstFileSinkClass;
+/**
+ * GstFileSink:
+ *
+ * Opaque #GstFileSink structure.
+ */
struct _GstFileSink {
GstBaseSink parent;
+ /*< private >*/
gchar *filename;
gchar *uri;
FILE *file;
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 */
* </example>
*
* 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 <application>GStreamer</application>. It is mostly used in unit tests
+ * to check for leaks.
+ *
+ * Last reviewed on 2005-11-23 (0.9.5)
*/
#include <stdlib.h>
* 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.
*
*
* <refsect2><title>Notes</title>
* <para>
- * 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:
* <variablelist>
* <varlistentry>
* </varlistentry>
* <varlistentry>
* <term>GST_MESSAGE_SEGMENT_DONE</term>
- * <listitem><para> Is posted by GstBin when all elements that posted
+ * <listitem><para> Is posted by #GstBin when all elements that posted
* a SEGMENT_START have posted a SEGMENT_DONE.</para></listitem>
* </varlistentry>
* <varlistentry>
* </varlistentry>
* </variablelist>
*
- * A GstBin implements the following default behaviour for answering to a
+ * A #GstBin implements the following default behaviour for answering to a
* #GstQuery:
* <variablelist>
* <varlistentry>
* </para>
* </refsect2>
*
- * Last reviewed on 2005-10-28 (0.9.4)
+ * Last reviewed on 2005-11-23 (0.9.5)
*/
#include "gst_private.h"
* 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"
*/
typedef gboolean (*GstBusFunc) (GstBus * bus, GstMessage * message, gpointer data);
+/**
+ * GstBus:
+ *
+ * The opaque #GstBus data structure.
+ */
struct _GstBus
{
GstObject object;
* 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
*
* 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
* 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)
*/
* 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"
* @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.
* </programlisting>
* </example>
*
- * 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"
#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;
* ...
* </programlisting>
* </example>
+ *
+ * Last reviewed on 2005-11-23 (0.9.5)
*/
+
#include <string.h> /* memcpy */
#include "gst_private.h"
#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;
*/
#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;
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);
/* signals */
void (*entry_added) (GstIndex *index, GstIndexEntry *entry);
+ /*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_IMPLEMENTS_INTERFACE, \
GstImplementsInterfaceClass))
+/**
+ * GstImplementsInterface:
+ *
+ * Opaque #GstImplementsInterface structure.
+ */
typedef struct _GstImplementsInterface GstImplementsInterface;
typedef struct _GstImplementsInterfaceClass GstImplementsInterfaceClass;
* 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"
* @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);
* 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.
* 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"
*
* 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)
* @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.
*/
* @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,
#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);
/* 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:
*
* 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);
/* 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 */
#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)))
+/**
+ * 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_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_PAD_GET_STREAM_LOCK(pad), t))
#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)))
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;
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;
GST_RANK_PRIMARY = 256
} GstRank;
+/**
+ * GstPluginFeature:
+ *
+ * Opaque #GstPluginFeature structure.
+ */
struct _GstPluginFeature {
GstObject object;
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;
#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;
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;
* 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
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,
#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,
#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)))
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 */
* @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
#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
#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)
{
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)
{
return trace;
}
+/**
+ * gst_trace_destroy:
+ * @trace: the #GstTrace to destroy
+ *
+ * Flush an close the previously allocated @trace.
+ */
void
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)
{
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)
{
#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)
{
typedef struct _GstTrace GstTrace;
typedef struct _GstTraceEntry GstTraceEntry;
+/**
+ * GstTrace:
+ *
+ * Opaque #GstTrace structure.
+ */
struct _GstTrace {
+ /*< private >*/
/* where this trace is going */
gchar *filename;
int fd;
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);
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); \
*/
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,
#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;
* 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
* 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"
typedef struct _GstNetClientClock GstNetClientClock;
typedef struct _GstNetClientClockClass GstNetClientClockClass;
+/**
+ * GstNetClientClock:
+ *
+ * Opaque #GstNetClientClock structure.
+ */
struct _GstNetClientClock {
GstSystemClock clock;
* 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"
* 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"
typedef struct _GstNetTimeProvider GstNetTimeProvider;
typedef struct _GstNetTimeProviderClass GstNetTimeProviderClass;
+/**
+ * GstNetTimeProvider:
+ *
+ * Opaque #GstNetTimeProvider structure.
+ */
struct _GstNetTimeProvider {
GstObject parent;
+ /*< private >*/
gchar *address;
int port;
GThread *thread;
GstClock *clock;
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING];
};
struct _GstNetTimeProviderClass {
typedef struct _GstAdapter GstAdapter;
typedef struct _GstAdapterClass GstAdapterClass;
+/**
+ * GstAdapter:
+ *
+ * The opaque #GstAdapter data structure.
+ */
struct _GstAdapter {
GObject object;
typedef struct _GstBaseSink GstBaseSink;
typedef struct _GstBaseSinkClass GstBaseSinkClass;
+/**
+ * GstBaseSink:
+ *
+ * The opaque #GstBaseSink data structure.
+ */
struct _GstBaseSink {
GstElement element;
#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;
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;
typedef struct _GstPushSrc GstPushSrc;
typedef struct _GstPushSrcClass GstPushSrcClass;
+/**
+ * GstPushSrc:
+ *
+ * The opaque #GstPushSrc data structure.
+ */
struct _GstPushSrc {
GstBaseSrc parent;
* 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"
typedef struct _GstNetClientClock GstNetClientClock;
typedef struct _GstNetClientClockClass GstNetClientClockClass;
+/**
+ * GstNetClientClock:
+ *
+ * Opaque #GstNetClientClock structure.
+ */
struct _GstNetClientClock {
GstSystemClock clock;
* 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"
* 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"
typedef struct _GstNetTimeProvider GstNetTimeProvider;
typedef struct _GstNetTimeProviderClass GstNetTimeProviderClass;
+/**
+ * GstNetTimeProvider:
+ *
+ * Opaque #GstNetTimeProvider structure.
+ */
struct _GstNetTimeProvider {
GstObject parent;
+ /*< private >*/
gchar *address;
int port;
GThread *thread;
GstClock *clock;
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING];
};
struct _GstNetTimeProviderClass {
#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,
typedef struct _GstFakeSink GstFakeSink;
typedef struct _GstFakeSinkClass GstFakeSinkClass;
+/**
+ * GstFakeSink:
+ *
+ * The opaque #GstFakeSink data structure.
+ */
struct _GstFakeSink {
GstBaseSink element;
};
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;
}
{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},
};
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,
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,
typedef struct _GstFakeSrc GstFakeSrc;
typedef struct _GstFakeSrcClass GstFakeSrcClass;
+/**
+ * GstFakeSrc:
+ *
+ * Opaque #GstFakeSrc data structure.
+ */
struct _GstFakeSrc {
GstBaseSrc element;
typedef struct _GstFileSink GstFileSink;
typedef struct _GstFileSinkClass GstFileSinkClass;
+/**
+ * GstFileSink:
+ *
+ * Opaque #GstFileSink structure.
+ */
struct _GstFileSink {
GstBaseSink parent;
+ /*< private >*/
gchar *filename;
gchar *uri;
FILE *file;
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 */
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;