GstTag

GstTag —

Synopsis


#include <gst/gst.h>


enum        GstTagMergeMode;
enum        GstTagFlag;
void        (*GstTagForeachFunc)            (const GstTagList *list,
                                             const gchar *tag,
                                             gpointer user_data);
void        (*GstTagMergeFunc)              (GValue *dest,
                                             const GValue *src);
void        gst_tag_register                (gchar *name,
                                             GstTagFlag flag,
                                             GType type,
                                             gchar *nick,
                                             gchar *blurb,
                                             GstTagMergeFunc func);
void        gst_tag_merge_use_first         (GValue *dest,
                                             const GValue *src);
void        gst_tag_merge_strings_with_comma
                                            (GValue *dest,
                                             const GValue *src);
gboolean    gst_tag_exists                  (const gchar *tag);
GType       gst_tag_get_type                (const gchar *tag);
G_CONST_RETURN gchar* gst_tag_get_nick      (const gchar *tag);
G_CONST_RETURN gchar* gst_tag_get_description
                                            (const gchar *tag);
GstTagFlag  gst_tag_get_flag                (const gchar *tag);
gboolean    gst_tag_is_fixed                (const gchar *tag);
GstTagList* gst_tag_list_new                (void);
GstTagList* gst_tag_list_copy               (const GstTagList *list);
void        gst_tag_list_insert             (GstTagList *into,
                                             const GstTagList *from,
                                             GstTagMergeMode mode);
GstTagList* gst_tag_list_merge              (const GstTagList *list1,
                                             const GstTagList *list2,
                                             GstTagMergeMode mode);
void        gst_tag_list_free               (GstTagList *list);
guint       gst_tag_list_get_tag_size       (const GstTagList *list,
                                             const gchar *tag);
void        gst_tag_list_add                (GstTagList *list,
                                             GstTagMergeMode mode,
                                             const gchar *tag,
                                             ...);
void        gst_tag_list_add_values         (GstTagList *list,
                                             GstTagMergeMode mode,
                                             const gchar *tag,
                                             ...);
void        gst_tag_list_add_valist         (GstTagList *list,
                                             GstTagMergeMode mode,
                                             const gchar *tag,
                                             va_list var_args);
void        gst_tag_list_add_valist_values  (GstTagList *list,
                                             GstTagMergeMode mode,
                                             const gchar *tag,
                                             va_list var_args);
void        gst_tag_list_remove_tag         (GstTagList *list,
                                             const gchar *tag);
void        gst_tag_list_foreach            (GstTagList *list,
                                             GstTagForeachFunc func,
                                             gpointer user_data);
G_CONST_RETURN GValue* gst_tag_list_get_value_index
                                            (const GstTagList *list,
                                             const gchar *tag,
                                             guint index);
gboolean    gst_tag_list_copy_value         (GValue *dest,
                                             const GstTagList *list,
                                             const gchar *tag);
gboolean    gst_tag_list_get_char           (const GstTagList *list,
                                             const gchar *tag,
                                             gchar *value);
gboolean    gst_tag_list_get_char_index     (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gchar *value);
gboolean    gst_tag_list_get_uchar          (const GstTagList *list,
                                             const gchar *tag,
                                             guchar *value);
gboolean    gst_tag_list_get_uchar_index    (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             guchar *value);
gboolean    gst_tag_list_get_boolean        (const GstTagList *list,
                                             const gchar *tag,
                                             gboolean *value);
gboolean    gst_tag_list_get_boolean_index  (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gboolean *value);
gboolean    gst_tag_list_get_int            (const GstTagList *list,
                                             const gchar *tag,
                                             gint *value);
gboolean    gst_tag_list_get_int_index      (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gint *value);
gboolean    gst_tag_list_get_uint           (const GstTagList *list,
                                             const gchar *tag,
                                             guint *value);
gboolean    gst_tag_list_get_uint_index     (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             guint *value);
gboolean    gst_tag_list_get_long           (const GstTagList *list,
                                             const gchar *tag,
                                             glong *value);
gboolean    gst_tag_list_get_long_index     (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             glong *value);
gboolean    gst_tag_list_get_ulong          (const GstTagList *list,
                                             const gchar *tag,
                                             gulong *value);
gboolean    gst_tag_list_get_ulong_index    (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gulong *value);
gboolean    gst_tag_list_get_int64          (const GstTagList *list,
                                             const gchar *tag,
                                             gint64 *value);
gboolean    gst_tag_list_get_int64_index    (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gint64 *value);
gboolean    gst_tag_list_get_uint64         (const GstTagList *list,
                                             const gchar *tag,
                                             guint64 *value);
gboolean    gst_tag_list_get_uint64_index   (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             guint64 *value);
gboolean    gst_tag_list_get_float          (const GstTagList *list,
                                             const gchar *tag,
                                             gfloat *value);
gboolean    gst_tag_list_get_float_index    (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gfloat *value);
gboolean    gst_tag_list_get_double         (const GstTagList *list,
                                             const gchar *tag,
                                             gdouble *value);
gboolean    gst_tag_list_get_double_index   (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gdouble *value);
gboolean    gst_tag_list_get_string         (const GstTagList *list,
                                             const gchar *tag,
                                             gchar **value);
gboolean    gst_tag_list_get_string_index   (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gchar **value);
gboolean    gst_tag_list_get_pointer        (const GstTagList *list,
                                             const gchar *tag,
                                             gpointer *value);
gboolean    gst_tag_list_get_pointer_index  (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gpointer *value);

Description

Details

enum GstTagMergeMode

typedef enum {
  GST_TAG_MERGE_UNDEFINED,
  GST_TAG_MERGE_REPLACE_ALL,
  GST_TAG_MERGE_REPLACE,
  GST_TAG_MERGE_APPEND,
  GST_TAG_MERGE_PREPEND,
  GST_TAG_MERGE_KEEP,
  GST_TAG_MERGE_KEEP_ALL,
  /* add more */
  GST_TAG_MERGE_COUNT
} GstTagMergeMode;


enum GstTagFlag

typedef enum {
  GST_TAG_FLAG_UNDEFINED,
  GST_TAG_FLAG_META,
  GST_TAG_FLAG_ENCODED,
  GST_TAG_FLAG_DECODED,
  GST_TAG_FLAG_COUNT
} GstTagFlag;


GstTagForeachFunc ()

void        (*GstTagForeachFunc)            (const GstTagList *list,
                                             const gchar *tag,
                                             gpointer user_data);

list :
tag :
user_data :

GstTagMergeFunc ()

void        (*GstTagMergeFunc)              (GValue *dest,
                                             const GValue *src);

dest :
src :

gst_tag_register ()

void        gst_tag_register                (gchar *name,
                                             GstTagFlag flag,
                                             GType type,
                                             gchar *nick,
                                             gchar *blurb,
                                             GstTagMergeFunc func);

Registers a new tag type for the use with GStreamer's type system. If a type with that name is already registered, that one is used. The old registration may have used a different type however. So don't rely on your supplied values. This function takes ownership of all supplied variables.

name : the name or identifier string
flag : a flag describing the type of tag info
type : the type this data is in
nick : human-readable name
blurb : a human-readable description about this tag
func : function for merging multiple values of this tag

gst_tag_merge_use_first ()

void        gst_tag_merge_use_first         (GValue *dest,
                                             const GValue *src);

This is a convenience function for the func argument of gst_tag_register(). It creates a copy of the first value from the list.

dest : uninitialized GValue to store result in
src : GValue to copy from

gst_tag_merge_strings_with_comma ()

void        gst_tag_merge_strings_with_comma
                                            (GValue *dest,
                                             const GValue *src);

This is a convenience function for the func argument of gst_tag_register(). It concatenates all given strings using a comma. The tag must be registered as a G_TYPE_STRING or this function will fail.

dest : uninitialized GValue to store result in
src : GValue to copy from

gst_tag_exists ()

gboolean    gst_tag_exists                  (const gchar *tag);

Checks if the given type is already registered.

tag : name of the tag
Returns : TRUE if the type is already registered

gst_tag_get_type ()

GType       gst_tag_get_type                (const gchar *tag);

Gets the GType used for this tag.

tag : the tag
Returns : the GType of this tag

gst_tag_get_nick ()

G_CONST_RETURN gchar* gst_tag_get_nick      (const gchar *tag);

Returns the human-readable name of this tag, You must not change or free this string.

tag : the tag
Returns : the human-readable name of this tag

gst_tag_get_description ()

G_CONST_RETURN gchar* gst_tag_get_description
                                            (const gchar *tag);

tag : the tag
Returns :the human-readable description of this tag, You must not change or free this string. Return the human-readable description of this tag

gst_tag_get_flag ()

GstTagFlag  gst_tag_get_flag                (const gchar *tag);

tag : the tag
Returns :the flag of this tag.

gst_tag_is_fixed ()

gboolean    gst_tag_is_fixed                (const gchar *tag);

tag :
Returns :

gst_tag_list_new ()

GstTagList* gst_tag_list_new                (void);

Creates a new empty GstTagList.

Returns : An empty tag list

gst_tag_list_copy ()

GstTagList* gst_tag_list_copy               (const GstTagList *list);

Copies a given GstTagList.

list : list to copy
Returns : copy of the given list

gst_tag_list_insert ()

void        gst_tag_list_insert             (GstTagList *into,
                                             const GstTagList *from,
                                             GstTagMergeMode mode);

Inserts the tags of the second list into the first list using the given mode.

into : list to merge into
from : list to merge from
mode : the mode to use

gst_tag_list_merge ()

GstTagList* gst_tag_list_merge              (const GstTagList *list1,
                                             const GstTagList *list2,
                                             GstTagMergeMode mode);

Merges the two given lists into a new list. If one of the lists is NULL, a copy of the other is returned. If both lists are NULL, NULL is returned.

list1 : first list to merge
list2 : second list to merge
mode : the mode to use
Returns : the new list

gst_tag_list_free ()

void        gst_tag_list_free               (GstTagList *list);

Frees the given list and all associated values.

list : the list to free

gst_tag_list_get_tag_size ()

guint       gst_tag_list_get_tag_size       (const GstTagList *list,
                                             const gchar *tag);

Checks how many value are stored in this tag list for the given tag.

list : a taglist
tag : the tag to query
Returns : The number of tags stored

gst_tag_list_add ()

void        gst_tag_list_add                (GstTagList *list,
                                             GstTagMergeMode mode,
                                             const gchar *tag,
                                             ...);

Sets the values for the given tags using the specified mode.

list : list to set tags in
mode : the mode to use
tag : tag
... : NULL-terminated list of values to set

gst_tag_list_add_values ()

void        gst_tag_list_add_values         (GstTagList *list,
                                             GstTagMergeMode mode,
                                             const gchar *tag,
                                             ...);

Sets the GValues for the given tags using the specified mode.

list : list to set tags in
mode : the mode to use
tag : tag
... : GValues to set

gst_tag_list_add_valist ()

void        gst_tag_list_add_valist         (GstTagList *list,
                                             GstTagMergeMode mode,
                                             const gchar *tag,
                                             va_list var_args);

Sets the values for the given tags using the specified mode.

list : list to set tags in
mode : the mode to use
tag : tag
var_args : tag / value pairs to set

gst_tag_list_add_valist_values ()

void        gst_tag_list_add_valist_values  (GstTagList *list,
                                             GstTagMergeMode mode,
                                             const gchar *tag,
                                             va_list var_args);

Sets the GValues for the given tags using the specified mode.

list : list to set tags in
mode : the mode to use
tag : tag
var_args : tag / GValue pairs to set

gst_tag_list_remove_tag ()

void        gst_tag_list_remove_tag         (GstTagList *list,
                                             const gchar *tag);

Removes the goven tag from the taglist.

list : list to remove tag from
tag : tag to remove

gst_tag_list_foreach ()

void        gst_tag_list_foreach            (GstTagList *list,
                                             GstTagForeachFunc func,
                                             gpointer user_data);

Calls the given function for each tag inside the tag list. Note that if there is no tag, the function won't be called at all.

list : list to iterate over
func : function to be called for each tag
user_data : user specified data

gst_tag_list_get_value_index ()

G_CONST_RETURN GValue* gst_tag_list_get_value_index
                                            (const GstTagList *list,
                                             const gchar *tag,
                                             guint index);

Gets the value that is at the given index for the given tag in the given list.

list : a GStTagList
tag : tag to read out
index : number of entry to read out
Returns : The GValue for the specified entry or NULL if the tag wasn't available or the tag doesn't have as many entries

gst_tag_list_copy_value ()

gboolean    gst_tag_list_copy_value         (GValue *dest,
                                             const GstTagList *list,
                                             const gchar *tag);

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. You must g_value_unset() the value after use.

dest : uninitialized GValue to copy into
list : list to get the tag from
tag : tag to read out
Returns : TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.

gst_tag_list_get_char ()

gboolean    gst_tag_list_get_char           (const GstTagList *list,
                                             const gchar *tag,
                                             gchar *value);

list :
tag :
value :
Returns :

gst_tag_list_get_char_index ()

gboolean    gst_tag_list_get_char_index     (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gchar *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_uchar ()

gboolean    gst_tag_list_get_uchar          (const GstTagList *list,
                                             const gchar *tag,
                                             guchar *value);

list :
tag :
value :
Returns :

gst_tag_list_get_uchar_index ()

gboolean    gst_tag_list_get_uchar_index    (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             guchar *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_boolean ()

gboolean    gst_tag_list_get_boolean        (const GstTagList *list,
                                             const gchar *tag,
                                             gboolean *value);

list :
tag :
value :
Returns :

gst_tag_list_get_boolean_index ()

gboolean    gst_tag_list_get_boolean_index  (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gboolean *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_int ()

gboolean    gst_tag_list_get_int            (const GstTagList *list,
                                             const gchar *tag,
                                             gint *value);

list :
tag :
value :
Returns :

gst_tag_list_get_int_index ()

gboolean    gst_tag_list_get_int_index      (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gint *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_uint ()

gboolean    gst_tag_list_get_uint           (const GstTagList *list,
                                             const gchar *tag,
                                             guint *value);

list :
tag :
value :
Returns :

gst_tag_list_get_uint_index ()

gboolean    gst_tag_list_get_uint_index     (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             guint *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_long ()

gboolean    gst_tag_list_get_long           (const GstTagList *list,
                                             const gchar *tag,
                                             glong *value);

list :
tag :
value :
Returns :

gst_tag_list_get_long_index ()

gboolean    gst_tag_list_get_long_index     (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             glong *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_ulong ()

gboolean    gst_tag_list_get_ulong          (const GstTagList *list,
                                             const gchar *tag,
                                             gulong *value);

list :
tag :
value :
Returns :

gst_tag_list_get_ulong_index ()

gboolean    gst_tag_list_get_ulong_index    (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gulong *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_int64 ()

gboolean    gst_tag_list_get_int64          (const GstTagList *list,
                                             const gchar *tag,
                                             gint64 *value);

list :
tag :
value :
Returns :

gst_tag_list_get_int64_index ()

gboolean    gst_tag_list_get_int64_index    (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gint64 *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_uint64 ()

gboolean    gst_tag_list_get_uint64         (const GstTagList *list,
                                             const gchar *tag,
                                             guint64 *value);

list :
tag :
value :
Returns :

gst_tag_list_get_uint64_index ()

gboolean    gst_tag_list_get_uint64_index   (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             guint64 *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_float ()

gboolean    gst_tag_list_get_float          (const GstTagList *list,
                                             const gchar *tag,
                                             gfloat *value);

list :
tag :
value :
Returns :

gst_tag_list_get_float_index ()

gboolean    gst_tag_list_get_float_index    (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gfloat *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_double ()

gboolean    gst_tag_list_get_double         (const GstTagList *list,
                                             const gchar *tag,
                                             gdouble *value);

list :
tag :
value :
Returns :

gst_tag_list_get_double_index ()

gboolean    gst_tag_list_get_double_index   (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gdouble *value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_string ()

gboolean    gst_tag_list_get_string         (const GstTagList *list,
                                             const gchar *tag,
                                             gchar **value);

list :
tag :
value :
Returns :

gst_tag_list_get_string_index ()

gboolean    gst_tag_list_get_string_index   (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gchar **value);

list :
tag :
index :
value :
Returns :

gst_tag_list_get_pointer ()

gboolean    gst_tag_list_get_pointer        (const GstTagList *list,
                                             const gchar *tag,
                                             gpointer *value);

list :
tag :
value :
Returns :

gst_tag_list_get_pointer_index ()

gboolean    gst_tag_list_get_pointer_index  (const GstTagList *list,
                                             const gchar *tag,
                                             guint index,
                                             gpointer *value);

list :
tag :
index :
value :
Returns :