![]() |
![]() |
![]() |
GStreamer 0.11 Core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/gst.h> struct GstMeta; enum GstMetaFlags; #define GST_META_FLAGS (meta) #define GST_META_FLAG_IS_SET (meta, flag) #define GST_META_FLAG_SET (meta, flag) #define GST_META_FLAG_UNSET (meta, flag) struct GstMetaInfo; gboolean (*GstMetaInitFunction) (GstMeta *meta
,gpointer params
,GstBuffer *buffer
); void (*GstMetaFreeFunction) (GstMeta *meta
,GstBuffer *buffer
); void (*GstMetaCopyFunction) (GstBuffer *dest
,GstMeta *meta
,GstBuffer *buffer
,gsize offset
,gsize size
); void (*GstMetaTransformFunction) (GstBuffer *transbuf
,GstMeta *meta
,GstBuffer *buffer
,gpointer data
); const GstMetaInfo * gst_meta_register (const gchar *api
,const gchar *impl
,gsize size
,GstMetaInitFunction init_func
,GstMetaFreeFunction free_func
,GstMetaCopyFunction copy_func
,GstMetaTransformFunction transform_func
); const GstMetaInfo * gst_meta_get_info (const gchar *impl
);
struct GstMeta { GstMetaFlags flags; const GstMetaInfo *info; };
Base structure for metadata. Custom metadata will put this structure as the first member of their structure.
GstMetaFlags |
extra flags for the metadata |
const GstMetaInfo * |
pointer to the GstMetaInfo |
typedef enum { GST_META_FLAG_NONE = 0, GST_META_FLAG_READONLY = (1 << 0), GST_META_FLAG_POOLED = (1 << 1), GST_META_FLAG_LAST = (1 << 16) } GstMetaFlags;
Extra metadata flags.
#define GST_META_FLAGS(meta) (GST_META_CAST (meta)->flags)
A flags word containing GstMetaFlags flags set on meta
|
a GstMeta. |
#define GST_META_FLAG_IS_SET(meta,flag) !!(GST_META_FLAGS (meta) & (flag))
Gives the status of a specific flag on a metadata.
|
a GstMeta. |
|
the GstMetaFlags to check. |
#define GST_META_FLAG_SET(meta,flag) (GST_META_FLAGS (meta) |= (flag))
Sets a metadata flag on a metadata.
|
a GstMeta. |
|
the GstMetaFlags to set. |
#define GST_META_FLAG_UNSET(meta,flag) (GST_META_FLAGS (meta) &= ~(flag))
Clears a metadata flag.
|
a GstMeta. |
|
the GstMetaFlags to clear. |
struct GstMetaInfo { GQuark api; GType type; gsize size; GstMetaInitFunction init_func; GstMetaFreeFunction free_func; GstMetaCopyFunction copy_func; GstMetaTransformFunction transform_func; };
The GstMetaInfo provides information about a specific metadata structure.
tag indentifying the metadata structure and api | |
type indentifying the implementor of the api | |
size of the metadata | |
GstMetaInitFunction |
function for initializing the metadata |
GstMetaFreeFunction |
function for freeing the metadata |
GstMetaCopyFunction |
function for copying the metadata |
GstMetaTransformFunction |
function for transforming the metadata |
gboolean (*GstMetaInitFunction) (GstMeta *meta
,gpointer params
,GstBuffer *buffer
);
Function called when meta
is initialized in buffer
.
void (*GstMetaFreeFunction) (GstMeta *meta
,GstBuffer *buffer
);
Function called when meta
is freed in buffer
.
void (*GstMetaCopyFunction) (GstBuffer *dest
,GstMeta *meta
,GstBuffer *buffer
,gsize offset
,gsize size
);
Function called when the region at offset
and size
in buffer
is copied
into dest
. The function should update the metadata on dest
using meta
.
void (*GstMetaTransformFunction) (GstBuffer *transbuf
,GstMeta *meta
,GstBuffer *buffer
,gpointer data
);
Function called for each meta
in buffer
as a result of performing a
transformation on transbuf
. Additional type specific transform data
is passed to the function.
Implementations should check the type of the transform data
and parse
additional type specific field that should be used to perform the transform.
const GstMetaInfo * gst_meta_register (const gchar *api
,const gchar *impl
,gsize size
,GstMetaInitFunction init_func
,GstMetaFreeFunction free_func
,GstMetaCopyFunction copy_func
,GstMetaTransformFunction transform_func
);
Register a new GstMeta implementation.
The same info
can be retrieved later with gst_meta_get_info()
by using
impl
as the key.
|
the name of the GstMeta API |
|
the name of the GstMeta implementation |
|
the size of the GstMeta structure |
|
a GstMetaInitFunction |
|
a GstMetaFreeFunction |
|
a GstMetaCopyFunction |
|
a GstMetaTransformFunction |
Returns : |
a GstMetaInfo that can be used to access metadata. [transfer none] |
const GstMetaInfo * gst_meta_get_info (const gchar *impl
);
Lookup a previously registered meta info structure by its implementation name
impl
.
|
the name |
Returns : |
a GstMetaInfo with impl , or NULL when no such
metainfo exists. [transfer none]
|