From 19cef390235f4cb1eba7868493ff2dec8aa2bf30 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 17 Aug 2010 06:47:52 -0300 Subject: [PATCH] tag: Adds some basic photography tags Adds the following basic photography tags. API: GST_TAG_CAPTURING_SHUTTER_SPEED API: GST_TAG_CAPTURING_FOCAL_RATIO API: GST_TAG_CAPTURING_FOCAL_LENGTH API: GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO API: GST_TAG_CAPTURING_ISO_SPEED Fixes #626651 --- docs/libs/gst-plugins-base-libs-sections.txt | 5 +++ gst-libs/gst/tag/tag.h | 47 ++++++++++++++++++++ gst-libs/gst/tag/tags.c | 21 +++++++++ 3 files changed, 73 insertions(+) diff --git a/docs/libs/gst-plugins-base-libs-sections.txt b/docs/libs/gst-plugins-base-libs-sections.txt index b9dc18c343..c553f4bd30 100644 --- a/docs/libs/gst-plugins-base-libs-sections.txt +++ b/docs/libs/gst-plugins-base-libs-sections.txt @@ -1634,6 +1634,11 @@ GST_TAG_CDDA_TRACK_TAGS GST_TAG_CMML_CLIP GST_TAG_CMML_HEAD GST_TAG_CMML_STREAM +GST_TAG_CAPTURING_SHUTTER_SPEED +GST_TAG_CAPTURING_FOCAL_RATIO +GST_TAG_CAPTURING_FOCAL_LENGTH +GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO +GST_TAG_CAPTURING_ISO_SPEED gst_tag_register_musicbrainz_tags gst_tag_freeform_string_to_utf8 gst_tag_parse_extended_comment diff --git a/gst-libs/gst/tag/tag.h b/gst-libs/gst/tag/tag.h index c00f22cfd8..399bc4331c 100644 --- a/gst-libs/gst/tag/tag.h +++ b/gst-libs/gst/tag/tag.h @@ -120,6 +120,53 @@ G_BEGIN_DECLS */ #define GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL "musicbrainz-discid-full" +/** + * GST_TAG_CAPTURING_SHUTTER_SPEED: + * + * Shutter speed used when capturing an image, in seconds. (fraction) + * + * Since: 0.10.31 + */ +#define GST_TAG_CAPTURING_SHUTTER_SPEED "capturing-shutter-speed" + +/** + * GST_TAG_CAPTURING_FOCAL_RATIO: + * + * Focal ratio (f-number) used when capturing an image. (double) + * + * The value stored is the denominator of the focal ratio (f-number). + * For example, if this tag value is 2, the focal ratio is f/2. + * + * Since: 0.10.31 + */ +#define GST_TAG_CAPTURING_FOCAL_RATIO "capturing-focal-ratio" + +/** + * GST_TAG_CAPTURING_FOCAL_LENGTH: + * + * Focal length used when capturing an image, in mm. (double) + * + * Since: 0.10.31 + */ +#define GST_TAG_CAPTURING_FOCAL_LENGTH "capturing-focal-length" + +/** + * GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO: + * + * Digital zoom ratio used when capturing an image. (double) + * + * Since: 0.10.31 + */ +#define GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO "capturing-digital-zoom-ratio" + +/** + * GST_TAG_CAPTURING_ISO_SPEED: + * + * ISO speed used when capturing an image. (integer) + * + * Since: 0.10.31 + */ +#define GST_TAG_CAPTURING_ISO_SPEED "capturing-iso-speed" /* additional information for image tags */ diff --git a/gst-libs/gst/tag/tags.c b/gst-libs/gst/tag/tags.c index 46c1a15208..493fcb3892 100644 --- a/gst-libs/gst/tag/tags.c +++ b/gst-libs/gst/tag/tags.c @@ -85,6 +85,27 @@ gst_tag_register_tags_internal (gpointer unused) "Musicbrainz discid for metadata retrieval (full)", gst_tag_merge_use_first); + /* photography tags */ + gst_tag_register (GST_TAG_CAPTURING_SHUTTER_SPEED, GST_TAG_FLAG_META, + GST_TYPE_FRACTION, _("capturing shutter speed"), + _("Shutter speed used when capturing an image, in seconds"), NULL); + + gst_tag_register (GST_TAG_CAPTURING_FOCAL_RATIO, GST_TAG_FLAG_META, + G_TYPE_DOUBLE, _("capturing focal ratio"), + _("Focal ratio (f-number) used when capturing the image"), NULL); + + gst_tag_register (GST_TAG_CAPTURING_FOCAL_LENGTH, GST_TAG_FLAG_META, + G_TYPE_DOUBLE, _("capturing focal length"), + _("Focal length of the lens used capturing the image, in mm"), NULL); + + gst_tag_register (GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO, GST_TAG_FLAG_META, + G_TYPE_DOUBLE, _("capturing digital zoom ratio"), + _("Digital zoom ratio used when capturing an image"), NULL); + + gst_tag_register (GST_TAG_CAPTURING_ISO_SPEED, GST_TAG_FLAG_META, + G_TYPE_INT, _("capturing iso speed"), + _("The ISO speed used when capturing an image"), NULL); + return NULL; }