GST_TAG_CAPTURING_SHARPNESS
GST_TAG_CAPTURING_FLASH_FIRED
GST_TAG_CAPTURING_FLASH_MODE
+GST_TAG_CAPTURING_METERING_MODE
GST_TAG_IMAGE_HORIZONTAL_PPI
GST_TAG_IMAGE_VERTICAL_PPI
gst_tag_register_musicbrainz_tags
EXIF_SERIALIZATION_DESERIALIZATION_FUNC (geo_coordinate);
EXIF_SERIALIZATION_DESERIALIZATION_FUNC (geo_direction);
EXIF_SERIALIZATION_DESERIALIZATION_FUNC (geo_elevation);
+EXIF_SERIALIZATION_DESERIALIZATION_FUNC (metering_mode);
EXIF_SERIALIZATION_DESERIALIZATION_FUNC (orientation);
EXIF_SERIALIZATION_DESERIALIZATION_FUNC (saturation);
EXIF_SERIALIZATION_DESERIALIZATION_FUNC (scene_capture_type);
#define EXIF_TAG_DATE_TIME_DIGITIZED 0x9004
#define EXIF_TAG_SHUTTER_SPEED_VALUE 0x9201
#define EXIF_TAG_APERTURE_VALUE 0x9202
+#define EXIF_TAG_METERING_MODE 0x9207
#define EXIF_TAG_FLASH 0x9209
#define EXIF_TAG_FOCAL_LENGTH 0x920A
#define EXIF_TAG_MAKER_NOTE 0x927C
{GST_TAG_CAPTURING_FOCAL_RATIO, EXIF_TAG_APERTURE_VALUE, EXIF_TYPE_RATIONAL,
0,
serialize_aperture_value, deserialize_aperture_value},
+ {GST_TAG_CAPTURING_METERING_MODE, EXIF_TAG_METERING_MODE, EXIF_TYPE_SHORT, 0,
+ serialize_metering_mode, deserialize_metering_mode},
{GST_TAG_CAPTURING_FLASH_FIRED, EXIF_TAG_FLASH, EXIF_TYPE_SHORT, 0,
serialize_flash, deserialize_flash},
{GST_TAG_CAPTURING_FOCAL_LENGTH, EXIF_TAG_FOCAL_LENGTH, EXIF_TYPE_RATIONAL, 0,
capturing_exposure_program);
EXIF_SERIALIZATION_DESERIALIZATION_MAP_STRING_TO_INT_FUNC (gain_control,
capturing_gain_adjustment);
+EXIF_SERIALIZATION_DESERIALIZATION_MAP_STRING_TO_INT_FUNC (metering_mode,
+ capturing_metering_mode);
EXIF_SERIALIZATION_DESERIALIZATION_MAP_STRING_TO_INT_FUNC (orientation,
image_orientation);
EXIF_SERIALIZATION_DESERIALIZATION_MAP_STRING_TO_INT_FUNC (saturation,
return __exif_tag_capturing_contrast_sharpness_from_exif_value (value,
"sharpness");
}
+
+gint
+__exif_tag_capturing_metering_mode_to_exif_value (const gchar * str)
+{
+ if (str == NULL)
+ goto end;
+
+ if (strcmp (str, "unknown") == 0)
+ return 0;
+ else if (strcmp (str, "average") == 0)
+ return 1;
+ else if (strcmp (str, "center-weighted-average") == 0)
+ return 2;
+ else if (strcmp (str, "spot") == 0)
+ return 3;
+ else if (strcmp (str, "multi-spot") == 0)
+ return 4;
+ else if (strcmp (str, "pattern") == 0)
+ return 5;
+ else if (strcmp (str, "partial") == 0)
+ return 6;
+ else if (strcmp (str, "other") == 0)
+ return 255;
+
+end:
+ GST_WARNING ("Invalid metering mode type: %s", str);
+ return -1;
+}
+
+const gchar *
+__exif_tag_capturing_metering_mode_from_exif_value (gint value)
+{
+ switch (value) {
+ case 0:
+ return "unknown";
+ case 1:
+ return "average";
+ case 2:
+ return "center-weighted-average";
+ case 3:
+ return "spot";
+ case 4:
+ return "multi-spot";
+ case 5:
+ return "pattern";
+ case 6:
+ return "partial";
+ case 255:
+ return "other";
+ default:
+ GST_WARNING ("Invalid metering mode type: %d", value);
+ return NULL;
+ }
+}
gint __exif_tag_capturing_sharpness_to_exif_value (const gchar * str);
const gchar * __exif_tag_capturing_sharpness_from_exif_value (gint value);
+gint __exif_tag_capturing_metering_mode_to_exif_value (const gchar * str);
+const gchar * __exif_tag_capturing_metering_mode_from_exif_value (gint value);
+
G_END_DECLS
#endif /* __GST_TAG_EDIT_PRIVATE_H__ */
#define GST_TAG_CAPTURING_FLASH_MODE "capturing-flash-mode"
/**
+ * GST_TAG_CAPTURING_METERING_MODE:
+ *
+ * Defines the way a camera determines the exposure. (string)
+ *
+ * The allowed values are:
+ * "unknown"
+ * "average"
+ * "center-weighted-average"
+ * "spot"
+ * "multi-spot"
+ * "pattern"
+ * "partial"
+ * "other"
+ *
+ * Since: 0.10.31
+ */
+#define GST_TAG_CAPTURING_METERING_MODE "capturing-metering-mode"
+
+/**
* GST_TAG_IMAGE_HORIZONTAL_PPI:
*
* Media (image/video) intended horizontal pixel density in ppi. (double)
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);
+ _("If the flash fired while capturing an 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);
+ _("The selected flash mode while capturing an image"), NULL);
+
+ gst_tag_register (GST_TAG_CAPTURING_METERING_MODE, GST_TAG_FLAG_META,
+ G_TYPE_STRING, _("capturing metering mode"),
+ _("The metering mode used while determining exposure for capturing an"
+ " image"), NULL);
gst_tag_register (GST_TAG_IMAGE_HORIZONTAL_PPI, GST_TAG_FLAG_META,
G_TYPE_DOUBLE, _("image horizontal ppi"),
g_value_set_static_string (&value, "soft");
do_simple_exif_tag_serialization_deserialization (GST_TAG_CAPTURING_SHARPNESS,
&value);
+
+ g_value_set_static_string (&value, "unknown");
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_METERING_MODE, &value);
+ g_value_set_static_string (&value, "average");
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_METERING_MODE, &value);
+ g_value_set_static_string (&value, "center-weighted-average");
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_METERING_MODE, &value);
+ g_value_set_static_string (&value, "spot");
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_METERING_MODE, &value);
+ g_value_set_static_string (&value, "multi-spot");
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_METERING_MODE, &value);
+ g_value_set_static_string (&value, "pattern");
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_METERING_MODE, &value);
+ g_value_set_static_string (&value, "partial");
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_METERING_MODE, &value);
+ g_value_set_static_string (&value, "other");
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_METERING_MODE, &value);
g_value_unset (&value);
g_value_init (&value, G_TYPE_DOUBLE);