#include "config.h"
#include "mnote-canon-entry.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <libexif/exif-format.h>
#include <libexif/exif-utils.h>
#include <libexif/i18n.h>
Go to the source code of this file.
|
#define | CF(format, target, v, maxlen) |
|
#define | CC(number, target, v, maxlen) |
|
#define | CC2(number, t1, t2, v, maxlen) |
|
#define | UNDEFINED 0xFF |
|
|
static void | canon_search_table_value (const struct canon_entry_table_t table[], unsigned int t, ExifShort vs, char *val, unsigned int maxlen) |
|
static void | canon_search_table_bitfield (const struct canon_entry_table_t table[], unsigned int t, ExifShort vs, char *val, unsigned int maxlen) |
|
unsigned int | mnote_canon_entry_count_values (const MnoteCanonEntry *entry) |
|
static double | apex_value_to_aperture (double x) |
|
static double | apex_value_to_shutter_speed (double x) |
|
static double | apex_value_to_iso_speed (double x) |
|
char * | mnote_canon_entry_get_value (const MnoteCanonEntry *entry, unsigned int t, char *val, unsigned int maxlen) |
|
◆ CC
#define CC |
( |
|
number, |
|
|
|
target, |
|
|
|
v, |
|
|
|
maxlen |
|
) |
| |
Value:{ \
if (number != target) { \
snprintf (v, maxlen, \
_(
"Invalid number of components (%i, " \
"expected %i)."), (int) number, (int) target); \
break; \
} \
}
Definition at line 46 of file mnote-canon-entry.c.
◆ CC2
#define CC2 |
( |
|
number, |
|
|
|
t1, |
|
|
|
t2, |
|
|
|
v, |
|
|
|
maxlen |
|
) |
| |
Value:{ \
if ((number != t1) && (number != t2)) { \
snprintf (v, maxlen, \
_(
"Invalid number of components (%i, " \
"expected %i or %i)."), (int) number, \
(int) t1, (int) t2); \
break; \
} \
}
Definition at line 55 of file mnote-canon-entry.c.
◆ CF
#define CF |
( |
|
format, |
|
|
|
target, |
|
|
|
v, |
|
|
|
maxlen |
|
) |
| |
Value:{ \
snprintf (v, maxlen, \
_(
"Invalid format '%s', " \
"expected '%s'."), \
break; \
} \
}
Definition at line 34 of file mnote-canon-entry.c.
◆ UNDEFINED
◆ apex_value_to_aperture()
static double apex_value_to_aperture |
( |
double |
x | ) |
|
|
static |
◆ apex_value_to_iso_speed()
static double apex_value_to_iso_speed |
( |
double |
x | ) |
|
|
static |
◆ apex_value_to_shutter_speed()
static double apex_value_to_shutter_speed |
( |
double |
x | ) |
|
|
static |
◆ canon_search_table_bitfield()
static void canon_search_table_bitfield |
( |
const struct canon_entry_table_t |
table[], |
|
|
unsigned int |
t, |
|
|
ExifShort |
vs, |
|
|
char * |
val, |
|
|
unsigned int |
maxlen |
|
) |
| |
|
static |
◆ canon_search_table_value()
static void canon_search_table_value |
( |
const struct canon_entry_table_t |
table[], |
|
|
unsigned int |
t, |
|
|
ExifShort |
vs, |
|
|
char * |
val, |
|
|
unsigned int |
maxlen |
|
) |
| |
|
static |
◆ mnote_canon_entry_count_values()
unsigned int mnote_canon_entry_count_values |
( |
const MnoteCanonEntry * |
entry | ) |
|
Definition at line 502 of file mnote-canon-entry.c.
References _MnoteCanonEntry::components, _MnoteCanonEntry::data, EXIF_FORMAT_SHORT, exif_get_short(), _MnoteCanonEntry::format, MIN, MNOTE_CANON_TAG_COLOR_INFORMATION, MNOTE_CANON_TAG_CUSTOM_FUNCS, MNOTE_CANON_TAG_FOCAL_LENGTH, MNOTE_CANON_TAG_PANORAMA, MNOTE_CANON_TAG_SETTINGS_1, MNOTE_CANON_TAG_SETTINGS_2, _MnoteCanonEntry::order, _MnoteCanonEntry::size, and _MnoteCanonEntry::tag.
Referenced by exif_mnote_data_canon_count(), exif_mnote_data_canon_get_tags(), and exif_mnote_data_canon_load().
◆ mnote_canon_entry_get_value()
char* mnote_canon_entry_get_value |
( |
const MnoteCanonEntry * |
entry, |
|
|
unsigned int |
t, |
|
|
char * |
val, |
|
|
unsigned int |
maxlen |
|
) |
| |
Definition at line 549 of file mnote-canon-entry.c.
References _, apex_value_to_aperture(), apex_value_to_iso_speed(), apex_value_to_shutter_speed(), canon_search_table_bitfield(), canon_search_table_value(), CC, CF, color_information, _MnoteCanonEntry::components, _MnoteCanonEntry::data, entries_focal_length, entries_panorama, entries_settings_1, entries_settings_2, EXIF_FORMAT_ASCII, EXIF_FORMAT_LONG, EXIF_FORMAT_SHORT, EXIF_FORMAT_SLONG, EXIF_FORMAT_SSHORT, exif_get_long(), exif_get_short(), exif_get_slong(), exif_get_sshort(), _MnoteCanonEntry::format, MIN, MNOTE_CANON_TAG_COLOR_INFORMATION, MNOTE_CANON_TAG_CUSTOM_FUNCS, MNOTE_CANON_TAG_FIRMWARE, MNOTE_CANON_TAG_FOCAL_LENGTH, MNOTE_CANON_TAG_IMAGE_NUMBER, MNOTE_CANON_TAG_IMAGE_TYPE, MNOTE_CANON_TAG_OWNER, MNOTE_CANON_TAG_PANORAMA, MNOTE_CANON_TAG_SERIAL_NUMBER, MNOTE_CANON_TAG_SETTINGS_1, MNOTE_CANON_TAG_SETTINGS_2, _MnoteCanonEntry::order, _MnoteCanonEntry::size, size, and _MnoteCanonEntry::tag.
Referenced by exif_mnote_data_canon_get_value().
◆ color_information
◆ entries_focal_length
◆ entries_panorama
Initial value:= {
{0, 0,
N_(
"Left to right")},
{0, 1,
N_(
"Right to left")},
{0, 2,
N_(
"Bottom to top")},
{0, 3,
N_(
"Top to bottom")},
{0, 4,
N_(
"2x2 matrix (clockwise)")},
{0, 0, NULL}
}
Referenced by mnote_canon_entry_get_value().
◆ entries_settings_1
◆ entries_settings_2