From 421e1e05ffaa2ef8787c7ef831e4e60e0aec33ad Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Fri, 20 Aug 2010 14:54:23 -0300 Subject: [PATCH] tag: Adds GST_TAG_CAPTURE_FLASH_FIRED/_MODE Adds a new tag for informing if flash was used while capturing an image and the flash mode selected by the user during this capture API: GST_TAG_CAPTURING_FLASH_FIRED API: GST_TAG_CAPTURING_FLASH_MODE https://bugzilla.gnome.org/show_bug.cgi?id=626651 --- docs/libs/gst-plugins-base-libs-sections.txt | 2 ++ gst-libs/gst/tag/tag.h | 25 ++++++++++++++++++++ gst-libs/gst/tag/tags.c | 8 +++++++ 3 files changed, 35 insertions(+) diff --git a/docs/libs/gst-plugins-base-libs-sections.txt b/docs/libs/gst-plugins-base-libs-sections.txt index 5670f2ab57..d3c1d66525 100644 --- a/docs/libs/gst-plugins-base-libs-sections.txt +++ b/docs/libs/gst-plugins-base-libs-sections.txt @@ -1646,6 +1646,8 @@ GST_TAG_CAPTURING_GAIN_ADJUSTMENT GST_TAG_CAPTURING_WHITE_BALANCE GST_TAG_CAPTURING_CONTRAST GST_TAG_CAPTURING_SATURATION +GST_TAG_CAPTURING_FLASH_FIRED +GST_TAG_CAPTURING_FLASH_MODE 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 08a024aee4..17fac20be6 100644 --- a/gst-libs/gst/tag/tag.h +++ b/gst-libs/gst/tag/tag.h @@ -280,6 +280,31 @@ G_BEGIN_DECLS */ #define GST_TAG_CAPTURING_SATURATION "capturing-saturation" +/** + * GST_TAG_CAPTURING_FLASH_FIRED: + * + * If flash was fired during the capture of an image. (boolean) + * + * Note that if this tag isn't present, it should not be assumed that + * the flash did not fire. It should be treated as unknown. + * + * Since: 0.10.31 + */ +#define GST_TAG_CAPTURING_FLASH_FIRED "capturing-flash-fired" + +/** + * GST_TAG_CAPTURING_FLASH_MODE: + * + * The flash mode selected during the capture of an image. (string) + * + * The allowed values are: + * "auto" + * "always" + * "never" + * + * Since: 0.10.31 + */ +#define GST_TAG_CAPTURING_FLASH_MODE "capturing-flash-mode" /* additional information for image tags */ diff --git a/gst-libs/gst/tag/tags.c b/gst-libs/gst/tag/tags.c index 6b1a23d0d3..6b4c7da501 100644 --- a/gst-libs/gst/tag/tags.c +++ b/gst-libs/gst/tag/tags.c @@ -136,6 +136,14 @@ gst_tag_register_tags_internal (gpointer unused) _("The direction of saturation processing applied when " "capturing an image"), NULL); + gst_tag_register (GST_TAG_CAPTURING_FLASH_FIRED, GST_TAG_FLAG_META, + G_TYPE_BOOLEAN, _("capturing flash fired"), + _("If the flash fired while capturing and image"), NULL); + + gst_tag_register (GST_TAG_CAPTURING_FLASH_MODE, GST_TAG_FLAG_META, + G_TYPE_STRING, _("capturing flash mode"), + _("The selected flash mode while capturing and image"), NULL); + return NULL; }