#include <config.h>
#include <libexif/exif-entry.h>
#include <libexif/exif-ifd.h>
#include <libexif/exif-utils.h>
#include <libexif/i18n.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <math.h>
Include dependency graph for exif-entry.c:
Go to the source code of this file.
Data Structures | |
struct | _ExifEntryPrivate |
Defines | |
#define | CF(entry, target, v, maxlen) |
#define | CC(entry, target, v, maxlen) |
Functions | |
ExifLog * | exif_data_get_log (ExifData *) |
static void | exif_entry_log (ExifEntry *e, ExifLogCode code, const char *format,...) |
static void * | exif_entry_alloc (ExifEntry *e, unsigned int i) |
static void * | exif_entry_realloc (ExifEntry *e, void *d_orig, unsigned int i) |
ExifEntry * | exif_entry_new (void) |
ExifEntry * | exif_entry_new_mem (ExifMem *mem) |
void | exif_entry_ref (ExifEntry *e) |
void | exif_entry_unref (ExifEntry *e) |
void | exif_entry_free (ExifEntry *e) |
void | exif_entry_fix (ExifEntry *e) |
void | exif_entry_dump (ExifEntry *e, unsigned int indent) |
const char * | exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen) |
void | exif_entry_initialize (ExifEntry *e, ExifTag tag) |
Variables | |
struct { | |
ExifTag tag | |
const char * strings [10] | |
} | list [] |
struct { | |
ExifTag tag | |
struct { | |
int index | |
const char * values [4] | |
} elem [25] | |
} | list2 [] |
#define CC | ( | entry, | |||
target, | |||||
v, | |||||
maxlen | ) |
Value:
{ \ if (entry->components != target) { \ exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA, \ _("The tag '%s' contains an invalid number of " \ "components (%i, expected %i)."), \ exif_tag_get_name (entry->tag), \ (int) entry->components, (int) target); \ break; \ } \ }
Definition at line 369 of file exif-entry.c.
#define CF | ( | entry, | |||
target, | |||||
v, | |||||
maxlen | ) |
Value:
{ \ if (entry->format != target) { \ exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA, \ _("The tag '%s' contains data of an invalid " \ "format ('%s', expected '%s')."), \ exif_tag_get_name (entry->tag), \ exif_format_get_name (entry->format), \ exif_format_get_name (target)); \ break; \ } \ }
Definition at line 356 of file exif-entry.c.
static void* exif_entry_alloc | ( | ExifEntry * | e, | |
unsigned int | i | |||
) | [static] |
Definition at line 59 of file exif-entry.c.
References exif_data_get_log(), EXIF_LOG_NO_MEMORY, exif_mem_alloc(), _ExifEntryPrivate::mem, _ExifContent::parent, _ExifEntry::parent, and _ExifEntry::priv.
Referenced by exif_entry_initialize().
void exif_entry_dump | ( | ExifEntry * | e, | |
unsigned int | indent | |||
) |
Definition at line 334 of file exif-entry.c.
References _ExifEntry::components, exif_entry_get_value(), exif_format_get_name(), exif_tag_get_name(), _ExifEntry::format, _ExifEntry::size, _ExifEntry::tag, and value.
Referenced by exif_content_dump().
void exif_entry_fix | ( | ExifEntry * | e | ) |
Definition at line 156 of file exif-entry.c.
References _, _ExifEntry::components, _ExifEntry::data, ExifRational::denominator, ExifSRational::denominator, exif_data_get_byte_order(), exif_entry_log(), exif_entry_realloc(), exif_format_get_name(), exif_format_get_size(), EXIF_FORMAT_LONG, EXIF_FORMAT_RATIONAL, EXIF_FORMAT_SHORT, EXIF_FORMAT_SRATIONAL, EXIF_FORMAT_UNDEFINED, exif_get_long(), exif_get_srational(), EXIF_LOG_CODE_DEBUG, exif_set_rational(), exif_set_short(), EXIF_TAG_APERTURE_VALUE, EXIF_TAG_COLOR_SPACE, EXIF_TAG_CONTRAST, EXIF_TAG_CUSTOM_RENDERED, EXIF_TAG_EXPOSURE_MODE, EXIF_TAG_EXPOSURE_TIME, EXIF_TAG_FNUMBER, EXIF_TAG_FOCAL_LENGTH, EXIF_TAG_GAIN_CONTROL, exif_tag_get_name(), EXIF_TAG_ORIENTATION, EXIF_TAG_PHOTOMETRIC_INTERPRETATION, EXIF_TAG_PLANAR_CONFIGURATION, EXIF_TAG_SATURATION, EXIF_TAG_SCENE_CAPTURE_TYPE, EXIF_TAG_SENSING_METHOD, EXIF_TAG_SHARPNESS, EXIF_TAG_SUBJECT_AREA, EXIF_TAG_USER_COMMENT, EXIF_TAG_WHITE_BALANCE, EXIF_TAG_YCBCR_POSITIONING, EXIF_TAG_YCBCR_SUB_SAMPLING, _ExifEntry::format, ExifRational::numerator, ExifSRational::numerator, _ExifEntry::parent, _ExifContent::parent, _ExifEntry::priv, _ExifEntry::size, size, and _ExifEntry::tag.
Referenced by fix_func().
void exif_entry_free | ( | ExifEntry * | e | ) |
Definition at line 141 of file exif-entry.c.
References _ExifEntry::data, exif_mem_free(), exif_mem_unref(), _ExifEntryPrivate::mem, and _ExifEntry::priv.
Referenced by exif_entry_unref().
const char* exif_entry_get_value | ( | ExifEntry * | e, | |
char * | val, | |||
unsigned int | maxlen | |||
) |
Definition at line 535 of file exif-entry.c.
References _, bindtextdomain, CC, CF, _ExifEntry::components, _ExifEntry::data, ExifRational::denominator, ExifSRational::denominator, exif_content_get_entry(), exif_data_get_byte_order(), exif_entry_log(), EXIF_FORMAT_ASCII, exif_format_get_size(), EXIF_FORMAT_RATIONAL, EXIF_FORMAT_SRATIONAL, EXIF_FORMAT_UNDEFINED, exif_get_rational(), exif_get_srational(), EXIF_IFD_0, EXIF_LOG_CODE_DEBUG, EXIF_TAG_APERTURE_VALUE, EXIF_TAG_BRIGHTNESS_VALUE, EXIF_TAG_COMPONENTS_CONFIGURATION, EXIF_TAG_COPYRIGHT, EXIF_TAG_EXIF_VERSION, EXIF_TAG_EXPOSURE_TIME, EXIF_TAG_FILE_SOURCE, EXIF_TAG_FLASH_PIX_VERSION, EXIF_TAG_FNUMBER, EXIF_TAG_FOCAL_LENGTH, EXIF_TAG_MAKE, EXIF_TAG_MODEL, EXIF_TAG_SHUTTER_SPEED_VALUE, EXIF_TAG_SUBJECT_DISTANCE, EXIF_TAG_USER_COMMENT, _ExifEntry::format, _ExifData::ifd, MIN, ExifRational::numerator, ExifSRational::numerator, _ExifEntry::parent, _ExifContent::parent, _ExifEntry::size, and _ExifEntry::tag.
Referenced by exif_data_get_type_maker_note(), and exif_entry_dump().
Definition at line 1069 of file exif-entry.c.
References _, _ExifEntry::components, _ExifEntry::data, ExifRational::denominator, exif_data_get_byte_order(), exif_entry_alloc(), EXIF_FORMAT_ASCII, exif_format_get_size(), EXIF_FORMAT_LONG, EXIF_FORMAT_RATIONAL, EXIF_FORMAT_SHORT, EXIF_FORMAT_SRATIONAL, EXIF_FORMAT_UNDEFINED, exif_set_rational(), exif_set_short(), EXIF_TAG_APERTURE_VALUE, EXIF_TAG_ARTIST, EXIF_TAG_BITS_PER_SAMPLE, EXIF_TAG_BRIGHTNESS_VALUE, EXIF_TAG_COMPRESSED_BITS_PER_PIXEL, EXIF_TAG_COMPRESSION, EXIF_TAG_CONTRAST, EXIF_TAG_COPYRIGHT, EXIF_TAG_CUSTOM_RENDERED, EXIF_TAG_DATE_TIME, EXIF_TAG_DATE_TIME_DIGITIZED, EXIF_TAG_DATE_TIME_ORIGINAL, EXIF_TAG_DIGITAL_ZOOM_RATIO, EXIF_TAG_EXIF_IFD_POINTER, EXIF_TAG_EXIF_VERSION, EXIF_TAG_EXPOSURE_BIAS_VALUE, EXIF_TAG_EXPOSURE_INDEX, EXIF_TAG_EXPOSURE_MODE, EXIF_TAG_EXPOSURE_PROGRAM, EXIF_TAG_EXPOSURE_TIME, EXIF_TAG_FILE_SOURCE, EXIF_TAG_FLASH_ENERGY, EXIF_TAG_FLASH_PIX_VERSION, EXIF_TAG_FNUMBER, EXIF_TAG_FOCAL_LENGTH, EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM, EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT, EXIF_TAG_FOCAL_PLANE_X_RESOLUTION, EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION, EXIF_TAG_GAIN_CONTROL, EXIF_TAG_GPS_INFO_IFD_POINTER, EXIF_TAG_IMAGE_DESCRIPTION, EXIF_TAG_IMAGE_LENGTH, EXIF_TAG_IMAGE_WIDTH, EXIF_TAG_INTEROPERABILITY_IFD_POINTER, EXIF_TAG_JPEG_INTERCHANGE_FORMAT, EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH, EXIF_TAG_LIGHT_SOURCE, EXIF_TAG_MAKE, EXIF_TAG_MAKER_NOTE, EXIF_TAG_MAX_APERTURE_VALUE, EXIF_TAG_METERING_MODE, EXIF_TAG_MODEL, EXIF_TAG_ORIENTATION, EXIF_TAG_PHOTOMETRIC_INTERPRETATION, EXIF_TAG_PIXEL_X_DIMENSION, EXIF_TAG_PIXEL_Y_DIMENSION, EXIF_TAG_PLANAR_CONFIGURATION, EXIF_TAG_PRIMARY_CHROMATICITIES, EXIF_TAG_REFERENCE_BLACK_WHITE, EXIF_TAG_RESOLUTION_UNIT, EXIF_TAG_SAMPLES_PER_PIXEL, EXIF_TAG_SATURATION, EXIF_TAG_SCENE_CAPTURE_TYPE, EXIF_TAG_SCENE_TYPE, EXIF_TAG_SENSING_METHOD, EXIF_TAG_SHARPNESS, EXIF_TAG_SHUTTER_SPEED_VALUE, EXIF_TAG_SOFTWARE, EXIF_TAG_SUB_SEC_TIME, EXIF_TAG_SUB_SEC_TIME_DIGITIZED, EXIF_TAG_SUB_SEC_TIME_ORIGINAL, EXIF_TAG_SUBJECT_DISTANCE, EXIF_TAG_SUBJECT_DISTANCE_RANGE, EXIF_TAG_SUBJECT_LOCATION, EXIF_TAG_USER_COMMENT, EXIF_TAG_WHITE_BALANCE, EXIF_TAG_WHITE_POINT, EXIF_TAG_X_RESOLUTION, EXIF_TAG_Y_RESOLUTION, EXIF_TAG_YCBCR_POSITIONING, EXIF_TAG_YCBCR_SUB_SAMPLING, _ExifEntry::format, ExifRational::numerator, _ExifEntry::parent, _ExifContent::parent, _ExifEntry::size, and _ExifEntry::tag.
Referenced by exif_content_fix().
static void exif_entry_log | ( | ExifEntry * | e, | |
ExifLogCode | code, | |||
const char * | format, | |||
... | ||||
) | [static] |
Definition at line 46 of file exif-entry.c.
References exif_data_get_log(), exif_logv(), _ExifContent::parent, and _ExifEntry::parent.
Referenced by exif_entry_fix(), and exif_entry_get_value().
ExifEntry* exif_entry_new | ( | void | ) |
Definition at line 95 of file exif-entry.c.
References exif_entry_new_mem(), exif_mem_new_default(), and exif_mem_unref().
Referenced by exif_content_fix().
Definition at line 106 of file exif-entry.c.
References exif_mem_alloc(), exif_mem_free(), exif_mem_ref(), _ExifEntryPrivate::mem, _ExifEntry::priv, and _ExifEntryPrivate::ref_count.
Referenced by exif_data_load_data_content(), and exif_entry_new().
static void* exif_entry_realloc | ( | ExifEntry * | e, | |
void * | d_orig, | |||
unsigned int | i | |||
) | [static] |
Definition at line 76 of file exif-entry.c.
References exif_data_get_log(), EXIF_LOG_NO_MEMORY, exif_mem_free(), exif_mem_realloc(), _ExifEntryPrivate::mem, _ExifContent::parent, _ExifEntry::parent, and _ExifEntry::priv.
Referenced by exif_entry_fix().
void exif_entry_ref | ( | ExifEntry * | e | ) |
Definition at line 123 of file exif-entry.c.
References _ExifEntry::priv, and _ExifEntryPrivate::ref_count.
Referenced by exif_content_add_entry().
void exif_entry_unref | ( | ExifEntry * | e | ) |
Definition at line 131 of file exif-entry.c.
References exif_entry_free(), _ExifEntry::priv, and _ExifEntryPrivate::ref_count.
Referenced by exif_content_fix(), exif_content_free(), exif_content_remove_entry(), and exif_data_load_data_content().
struct { ... } elem[25] |
Referenced by mnote_olympus_entry_get_value(), and mnote_pentax_entry_get_value().
int index |
Definition at line 421 of file exif-entry.c.
Referenced by mnote_olympus_entry_get_value(), and mnote_pentax_entry_get_value().
struct { ... } list[] [static] |
struct { ... } list2[] [static] |
const char* strings[10] |
Definition at line 383 of file exif-entry.c.
Definition at line 419 of file exif-entry.c.
Definition at line 382 of file exif-entry.c.
const char* values[4] |
Definition at line 422 of file exif-entry.c.