From: Stefan Kost Date: Tue, 16 Dec 2008 07:07:36 +0000 (+0000) Subject: gst/: Update GstTagSetter and GstTagMergeMode documentation. Mention that tags can... X-Git-Tag: GIT_CONVERSION~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f085768807a50ed176c08f36277da808c8560db6;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/ChangeLog b/ChangeLog index a22bd0d..e9bf7ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-15 Stefan Kost + + * 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 * docs/design/part-TODO.txt: diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index fe6b672..1b29597 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -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. * * * merge mode diff --git a/gst/gsttagsetter.c b/gst/gsttagsetter.c index 7c21e31..06c7806 100644 --- a/gst/gsttagsetter.c +++ b/gst/gsttagsetter.c @@ -24,30 +24,26 @@ * @short_description: Element interface that allows setting and retrieval * of media metadata * - * - * * 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. 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. - * - * + * 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: - * - * - * + * + * |[ * 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); - * - * - * + * ]| + * * Last reviewed on 2006-05-18 (0.10.6) - * - * */ #ifdef HAVE_CONFIG_H