![]() |
![]() |
![]() |
GStreamer 0.10 Core Reference Manual | ![]() |
---|---|---|---|---|
#include <gst/gst.h> GstTagSetter; GstTagSetterIFace; void gst_tag_setter_merge_tags (GstTagSetter *setter, const GstTagList *list, GstTagMergeMode mode); void gst_tag_setter_add_tags (GstTagSetter *setter, GstTagMergeMode mode, const gchar *tag, ...); void gst_tag_setter_add_tag_values (GstTagSetter *setter, GstTagMergeMode mode, const gchar *tag, ...); void gst_tag_setter_add_tag_valist (GstTagSetter *setter, GstTagMergeMode mode, const gchar *tag, va_list var_args); void gst_tag_setter_add_tag_valist_values (GstTagSetter *setter, GstTagMergeMode mode, const gchar *tag, va_list var_args); const GstTagList* gst_tag_setter_get_tag_list (GstTagSetter *setter); void gst_tag_setter_set_tag_merge_mode (GstTagSetter *setter, GstTagMergeMode mode); GstTagMergeMode gst_tag_setter_get_tag_merge_mode (GstTagSetter *setter);
Element interface that allows setting of media metadata.
Elements that support changing a stream's metadata will implement this interface. Examples of such elements are 'vorbisenc', 'theoraenc' and 'id3v2mux'.
If you just want to retrieve metadata in your application then all you need to do is watch for tag messages on your pipeline's bus. This interface is only for setting metadata, not for extracting it.
Elements implementing the GstTagSetter interface often have to merge any tags received from upstream and the tags set by the application via the interface. This can be done like this:
GstTagMergeMode merge_mode;
const GstTagList *application_tags;
const GstTagList *event_tags;
GstTagSetter *tagsetter;
GstTagList *result;
tagsetter = GST_TAG_SETTER (element);
merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter);
tagsetter_tags = gst_tag_setter_get_tag_list (tagsetter);
event_tags = (const GstTagList *) element->event_tags;
GST_LOG_OBJECT (tagsetter, "merging tags, merge mode = d
", merge_mode);
GST_LOG_OBJECT (tagsetter, "event tags: %" GST_PTR_FORMAT, event_tags);
GST_LOG_OBJECT (tagsetter, "set tags: %" GST_PTR_FORMAT, application_tags);
result = gst_tag_list_merge (application_tags, event_tags, merge_mode);
GST_LOG_OBJECT (tagsetter, "final tags: %" GST_PTR_FORMAT, result);
Last reviewed on 2006-05-18 (0.10.6)
typedef struct { GTypeInterface g_iface; /* signals */ /* virtual table */ } GstTagSetterIFace;
GstTagSetterIFace interface.
g_iface
;GTypeInterfaceg_iface
parent interface type.
parent interface type.
GTypeInterface g_iface ; |
parent interface type. |
void gst_tag_setter_merge_tags (GstTagSetter *setter, const GstTagList *list, GstTagMergeMode mode);
Merges the given list into the setter's list using the given mode.
setter
:setter
a GstTagSetter
a GstTagSetter
GstTagSetterGstTagSetterlist
:list
a tag list to merge from
a tag list to merge from
mode
:mode
the mode to merge with
the mode to merge with
setter : |
a GstTagSetter |
list : |
a tag list to merge from |
mode : |
the mode to merge with |
void gst_tag_setter_add_tags (GstTagSetter *setter, GstTagMergeMode mode, const gchar *tag, ...);
Adds the given tag / value pairs on the setter using the given merge mode. The list must be terminated with NULL.
setter
:setter
a GstTagSetter
a GstTagSetter
GstTagSetterGstTagSettermode
:mode
the mode to use
the mode to use
tag
:tag
tag to set
tag to set
...
:...
more tag / value pairs to set
more tag / value pairs to set
setter : |
a GstTagSetter |
mode : |
the mode to use |
tag : |
tag to set |
... : |
more tag / value pairs to set |
void gst_tag_setter_add_tag_values (GstTagSetter *setter, GstTagMergeMode mode, const gchar *tag, ...);
Adds the given tag / GValue pairs on the setter using the given merge mode. The list must be terminated with NULL.
setter
:setter
a GstTagSetter
a GstTagSetter
GstTagSetterGstTagSettermode
:mode
the mode to use
the mode to use
tag
:tag
tag to set
tag to set
...
:...
more tag / GValue pairs to set
more tag / GValue pairs to set
setter : |
a GstTagSetter |
mode : |
the mode to use |
tag : |
tag to set |
... : |
more tag / GValue pairs to set |
void gst_tag_setter_add_tag_valist (GstTagSetter *setter, GstTagMergeMode mode, const gchar *tag, va_list var_args);
Adds the given tag / value pairs on the setter using the given merge mode. The list must be terminated with NULL.
setter
:setter
a GstTagSetter
a GstTagSetter
GstTagSetterGstTagSettermode
:mode
the mode to use
the mode to use
tag
:tag
tag to set
tag to set
var_args
:var_args
tag / value pairs to set
tag / value pairs to set
setter : |
a GstTagSetter |
mode : |
the mode to use |
tag : |
tag to set |
var_args : |
tag / value pairs to set |
void gst_tag_setter_add_tag_valist_values (GstTagSetter *setter, GstTagMergeMode mode, const gchar *tag, va_list var_args);
Adds the given tag / GValue pairs on the setter using the given merge mode. The list must be terminated with NULL.
setter
:setter
a GstTagSetter
a GstTagSetter
GstTagSetterGstTagSettermode
:mode
the mode to use
the mode to use
tag
:tag
tag to set
tag to set
var_args
:var_args
tag / GValue pairs to set
tag / GValue pairs to set
setter : |
a GstTagSetter |
mode : |
the mode to use |
tag : |
tag to set |
var_args : |
tag / GValue pairs to set |
const GstTagList* gst_tag_setter_get_tag_list (GstTagSetter *setter);
Returns the current list of tags the setter uses. The list should not be modified or freed.
setter
:setter
a GstTagSetter
a GstTagSetter
GstTagSetterGstTagSetterReturns :Returns a current snapshot of the taglist used in the setter
or NULL if none is used.
a current snapshot of the taglist used in the setter
or NULL if none is used.
setter : |
a GstTagSetter |
Returns : | a current snapshot of the taglist used in the setter or NULL if none is used. |
void gst_tag_setter_set_tag_merge_mode (GstTagSetter *setter, GstTagMergeMode mode);
Sets the given merge mode that is used for adding tags from events to tags specified by this interface. The default is GST_TAG_MERGE_KEEP, which keeps the tags set with this interface and discards tags from events.
setter
:setter
a GstTagSetter
a GstTagSetter
GstTagSetterGstTagSettermode
:mode
The mode with which tags are added
The mode with which tags are added
setter : |
a GstTagSetter |
mode : |
The mode with which tags are added |
GstTagMergeMode gst_tag_setter_get_tag_merge_mode (GstTagSetter *setter);
Queries the mode by which tags inside the setter are overwritten by tags from events
setter
:setter
a GstTagSetter
a GstTagSetter
GstTagSetterGstTagSetterReturns :Returns the merge mode used inside the element.
the merge mode used inside the element.
setter : |
a GstTagSetter |
Returns : | the merge mode used inside the element. |