mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst/: Update GstTagSetter and GstTagMergeMode documentation. Mention that tags can come from events and from applicat...
Original commit message from CVS: * gst/gsttaglist.h: * gst/gsttagsetter.c: Update GstTagSetter and GstTagMergeMode documentation. Mention that tags can come from events and from application. Fix example.
This commit is contained in:
parent
85c0fc3260
commit
f085768807
3 changed files with 25 additions and 24 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-12-15 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/gsttaglist.h:
|
||||
* gst/gsttagsetter.c:
|
||||
Update GstTagSetter and GstTagMergeMode documentation. Mention
|
||||
that tags can come from events and from application. Fix example.
|
||||
|
||||
2008-12-15 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* docs/design/part-TODO.txt:
|
||||
|
|
|
@ -40,11 +40,12 @@ G_BEGIN_DECLS
|
|||
* @GST_TAG_MERGE_COUNT: the number of merge modes
|
||||
*
|
||||
* The different tag merging modes are basically replace, overwrite and append,
|
||||
* but they can be seen from two directions. Given two taglists: (A) the tags
|
||||
* already in the element and (B) the ones that are supplied to
|
||||
* gst_tag_setter_merge_tags() or gst_tag_setter_add_tags(), how are these tags
|
||||
* merged? In the table below this is shown for the cases that a tag exists in
|
||||
* the list (A) or does not exists (!A) and combinations thereof.
|
||||
* but they can be seen from two directions. Given two taglists: (A) the tags
|
||||
* already in the element and (B) the ones that are supplied to the element (
|
||||
* e.g. via gst_tag_setter_merge_tags() / gst_tag_setter_add_tags() or a
|
||||
* %GST_EVENT_TAG), how are these tags merged?
|
||||
* In the table below this is shown for the cases that a tag exists in the list
|
||||
* (A) or does not exists (!A) and combinations thereof.
|
||||
*
|
||||
* <table frame="all" colsep="1" rowsep="1">
|
||||
* <title>merge mode</title>
|
||||
|
|
|
@ -24,30 +24,26 @@
|
|||
* @short_description: Element interface that allows setting and retrieval
|
||||
* of media metadata
|
||||
*
|
||||
* <refsect2>
|
||||
* <para>
|
||||
* Element interface that allows setting of media metadata.
|
||||
* </para>
|
||||
* <para>
|
||||
*
|
||||
* Elements that support changing a stream's metadata will implement this
|
||||
* interface. Examples of such elements are 'vorbisenc', 'theoraenc' and
|
||||
* 'id3v2mux'.
|
||||
* </para>
|
||||
* <para>
|
||||
*
|
||||
* 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. To set tags
|
||||
* from the application, find tagsetter elements and set tags using e.g.
|
||||
* gst_tag_setter_merge_tags() or gst_tag_setter_add_tags(). The application
|
||||
* should do that before the element goes to %GST_STATE_PAUSED.
|
||||
* </para>
|
||||
* <para>
|
||||
* gst_tag_setter_merge_tags() or gst_tag_setter_add_tags(). Also consider
|
||||
* setting the #GstTagMergeMode that is used for tag events that arrive at the
|
||||
* tagsetter element (default mode is to keep existing tags).
|
||||
* The application should do that before the element goes to %GST_STATE_PAUSED.
|
||||
*
|
||||
* 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:
|
||||
* </para>
|
||||
* <para>
|
||||
* <programlisting>
|
||||
*
|
||||
* |[
|
||||
* GstTagMergeMode merge_mode;
|
||||
* const GstTagList *application_tags;
|
||||
* const GstTagList *event_tags;
|
||||
|
@ -57,7 +53,7 @@
|
|||
* tagsetter = GST_TAG_SETTER (element);
|
||||
*
|
||||
* merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter);
|
||||
* tagsetter_tags = gst_tag_setter_get_tag_list (tagsetter);
|
||||
* application_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);
|
||||
|
@ -67,12 +63,9 @@
|
|||
* result = gst_tag_list_merge (application_tags, event_tags, merge_mode);
|
||||
*
|
||||
* GST_LOG_OBJECT (tagsetter, "final tags: %" GST_PTR_FORMAT, result);
|
||||
* </programlisting>
|
||||
* </para>
|
||||
* <para>
|
||||
* ]|
|
||||
*
|
||||
* Last reviewed on 2006-05-18 (0.10.6)
|
||||
* </para>
|
||||
* </refsect2>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
Loading…
Reference in a new issue