mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
Add function to reset tagsetter for element reuse.
Original commit message from CVS: * docs/gst/gstreamer-sections.txt: * gst/gsttagsetter.c: * gst/gsttagsetter.h: Add function to reset tagsetter for element reuse. API: gst_tag_setter_flush()
This commit is contained in:
parent
4a162d56ab
commit
2e25b024cc
4 changed files with 35 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-12-16 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/gst/gstreamer-sections.txt:
|
||||
* gst/gsttagsetter.c:
|
||||
* gst/gsttagsetter.h:
|
||||
Add function to reset tagsetter for element reuse.
|
||||
API: gst_tag_setter_flush()
|
||||
|
||||
2008-12-16 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/gsttaglist.c:
|
||||
|
|
|
@ -2107,6 +2107,7 @@ gst_tag_merge_mode_get_type
|
|||
<TITLE>GstTagSetter</TITLE>
|
||||
GstTagSetter
|
||||
GstTagSetterIFace
|
||||
gst_tag_setter_flush
|
||||
gst_tag_setter_merge_tags
|
||||
gst_tag_setter_add_tags
|
||||
gst_tag_setter_add_tag_values
|
||||
|
|
|
@ -86,8 +86,7 @@ typedef struct
|
|||
{
|
||||
GstTagMergeMode mode;
|
||||
GstTagList *list;
|
||||
}
|
||||
GstTagData;
|
||||
} GstTagData;
|
||||
|
||||
GType
|
||||
gst_tag_setter_get_type (void)
|
||||
|
@ -120,6 +119,7 @@ gst_tag_setter_get_type (void)
|
|||
|
||||
return tag_setter_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_tag_data_free (gpointer p)
|
||||
{
|
||||
|
@ -130,6 +130,7 @@ gst_tag_data_free (gpointer p)
|
|||
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
static GstTagData *
|
||||
gst_tag_setter_get_data (GstTagSetter * setter)
|
||||
{
|
||||
|
@ -147,6 +148,27 @@ gst_tag_setter_get_data (GstTagSetter * setter)
|
|||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_tag_setter_flush:
|
||||
* @setter: a #GstTagSetter
|
||||
*
|
||||
* Reset the internal taglist. Elements should call this from within the
|
||||
* state-change handler.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_flush (GstTagSetter * setter)
|
||||
{
|
||||
GstTagData *data;
|
||||
|
||||
g_return_if_fail (GST_IS_TAG_SETTER (setter));
|
||||
|
||||
data = gst_tag_setter_get_data (setter);
|
||||
if (data->list) {
|
||||
gst_tag_list_free (data->list);
|
||||
data->list = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_tag_setter_merge_tags:
|
||||
* @setter: a #GstTagSetter
|
||||
|
|
|
@ -58,6 +58,8 @@ struct _GstTagSetterIFace
|
|||
|
||||
GType gst_tag_setter_get_type (void);
|
||||
|
||||
void gst_tag_setter_flush (GstTagSetter * setter);
|
||||
|
||||
void gst_tag_setter_merge_tags (GstTagSetter * setter,
|
||||
const GstTagList * list,
|
||||
GstTagMergeMode mode);
|
||||
|
|
Loading…
Reference in a new issue