tests: jifmux: Adds test for new exposure compensation tag

Adds a test for GST_TAG_CAPTURING_EXPOSURE_COMPENSATION on
jifmux check tests.
This commit is contained in:
Thiago Santos 2011-04-13 23:59:40 -03:00
parent 747f32a857
commit bfc4f70f02

View file

@ -619,6 +619,8 @@ static const GstExifTagMatch tag_map[] = {
EXIF_TYPE_SRATIONAL, compare_shutter_speed},
{GST_TAG_CAPTURING_FOCAL_RATIO, EXIF_TAG_APERTURE_VALUE, EXIF_TYPE_RATIONAL,
compare_aperture_value},
{GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, EXIF_TAG_EXPOSURE_BIAS_VALUE,
EXIF_TYPE_SRATIONAL},
{GST_TAG_CAPTURING_FLASH_FIRED, EXIF_TAG_FLASH, EXIF_TYPE_SHORT,
compare_flash},
{GST_TAG_CAPTURING_FLASH_MODE, EXIF_TAG_FLASH, EXIF_TYPE_SHORT,
@ -810,14 +812,24 @@ check_content (ExifContent * content, void *user_data)
g_free (taglist_str);
}
break;
case EXIF_TYPE_SRATIONAL:
case EXIF_TYPE_RATIONAL:{
ExifRational exif_rational = exif_get_rational (entry->data,
exif_data_get_byte_order (entry->parent->parent));
GValue exif_value = { 0 };
g_value_init (&exif_value, GST_TYPE_FRACTION);
gst_value_set_fraction (&exif_value, exif_rational.numerator,
exif_rational.denominator);
if (entry->format == EXIF_TYPE_RATIONAL) {
ExifRational exif_rational = exif_get_rational (entry->data,
exif_data_get_byte_order (entry->parent->parent));
gst_value_set_fraction (&exif_value, exif_rational.numerator,
exif_rational.denominator);
} else {
ExifSRational exif_rational = exif_get_srational (entry->data,
exif_data_get_byte_order (entry->parent->parent));
gst_value_set_fraction (&exif_value, exif_rational.numerator,
exif_rational.denominator);
}
if (gst_tag_type == GST_TYPE_FRACTION) {
const GValue *value = gst_tag_list_get_value_index (test_data->taglist,
@ -1029,6 +1041,7 @@ GST_START_TEST (test_jifmux_tags)
GST_TAG_CAPTURING_ISO_SPEED, 800, GST_TAG_DATE_TIME, datetime,
GST_TAG_CAPTURING_FOCAL_LENGTH, 22.5,
GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO, 5.25,
GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, -2.5,
GST_TAG_APPLICATION_DATA, buffer,
GST_TAG_CAPTURING_FLASH_FIRED, TRUE,
GST_TAG_CAPTURING_FLASH_MODE, "auto",