From: Thiago Santos Date: Tue, 15 Jun 2010 21:26:01 +0000 (-0300) Subject: tag: Adds GST_TAG_IMAGE_ORIENTATION tag X-Git-Tag: RELEASE-0.10.30~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a34c1cd189ba27fd1ba56f180475c13fe080cc3;p=platform%2Fupstream%2Fgstreamer.git tag: Adds GST_TAG_IMAGE_ORIENTATION tag Adds a new tag to inform about the image orientation and how to rotate and flip it before display. Note that this tag is a string with a predefined set of possible values. API: GST_TAG_IMAGE_ORIENTATION Fixes #619508 --- diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 9be7cb1..f1d3cb9 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -2202,6 +2202,7 @@ GST_TAG_GROUPING GST_TAG_USER_RATING GST_TAG_DEVICE_MANUFACTURER GST_TAG_DEVICE_MODEL +GST_TAG_IMAGE_ORIENTATION gst_tag_register gst_tag_merge_use_first diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index d31787e..463d442 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -349,6 +349,9 @@ _gst_tag_initialize (void) gst_tag_register (GST_TAG_DEVICE_MODEL, GST_TAG_FLAG_META, G_TYPE_STRING, _("device model"), _("Model of the device used to create this media"), NULL); + gst_tag_register (GST_TAG_IMAGE_ORIENTATION, GST_TAG_FLAG_META, G_TYPE_STRING, + _("image orientation"), + _("How the image should be rotated or flipped before display"), NULL); } /** diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index 52eb134..add6ea3 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -944,6 +944,32 @@ gboolean gst_tag_list_get_buffer_index (const GstTagList * list, * Since: 0.10.30 */ #define GST_TAG_DEVICE_MODEL "device-model" +/** + * GST_TAG_IMAGE_ORIENTATION: + * + * Represents the 'Orientation' tag from EXIF. Defines how the image + * should be rotated and mirrored for display. (string) + * + * This tag has a predefined set of allowed values: + * "rotate-0" + * "rotate-90" + * "rotate-180" + * "rotate-270" + * "flip-rotate-0" + * "flip-rotate-90" + * "flip-rotate-180" + * "flip-rotate-270" + * + * The naming is adopted according to a possible transformation to perform + * on the image to fix its orientation, obviously equivalent operations will + * yield the same result. + * + * Rotations indicated by the values are in clockwise direction and + * 'flip' means an horizontal mirroring. + * + * Since: 0.10.30 + */ +#define GST_TAG_IMAGE_ORIENTATION "image-orientation" G_END_DECLS