exif-mnote-data-olympus.c File Reference

#include <config.h>
#include "exif-mnote-data-olympus.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <libexif/exif-utils.h>
#include <libexif/exif-data.h>

Go to the source code of this file.

Defines

#define DEBUG

Functions

static enum
OlympusVersion 
exif_mnote_data_olympus_identify_variant (const unsigned char *buf, unsigned int buf_size)
static void exif_mnote_data_olympus_clear (ExifMnoteDataOlympus *n)
static void exif_mnote_data_olympus_free (ExifMnoteData *n)
static char * exif_mnote_data_olympus_get_value (ExifMnoteData *d, unsigned int i, char *val, unsigned int maxlen)
static void exif_mnote_data_olympus_save (ExifMnoteData *ne, unsigned char **buf, unsigned int *buf_size)
 save the MnoteData from ne to buf
static void exif_mnote_data_olympus_load (ExifMnoteData *en, const unsigned char *buf, unsigned int buf_size)
static unsigned int exif_mnote_data_olympus_count (ExifMnoteData *n)
static unsigned int exif_mnote_data_olympus_get_id (ExifMnoteData *d, unsigned int n)
static const char * exif_mnote_data_olympus_get_name (ExifMnoteData *d, unsigned int i)
static const char * exif_mnote_data_olympus_get_title (ExifMnoteData *d, unsigned int i)
static const char * exif_mnote_data_olympus_get_description (ExifMnoteData *d, unsigned int i)
static void exif_mnote_data_olympus_set_byte_order (ExifMnoteData *d, ExifByteOrder o)
static void exif_mnote_data_olympus_set_offset (ExifMnoteData *n, unsigned int o)
int exif_mnote_data_olympus_identify (const ExifData *ed, const ExifEntry *e)
 Detect if MakerNote is recognized as one handled by the Olympus module.
ExifMnoteDataexif_mnote_data_olympus_new (ExifMem *mem)


Define Documentation

#define DEBUG

Definition at line 31 of file exif-mnote-data-olympus.c.


Function Documentation

static void exif_mnote_data_olympus_clear ( ExifMnoteDataOlympus n  )  [static]

Definition at line 46 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _MnoteOlympusEntry::data, _ExifMnoteDataOlympus::entries, exif_mem_free(), and _ExifMnoteData::mem.

Referenced by exif_mnote_data_olympus_free(), and exif_mnote_data_olympus_load().

static unsigned int exif_mnote_data_olympus_count ( ExifMnoteData n  )  [static]

Definition at line 506 of file exif-mnote-data-olympus.c.

Referenced by exif_mnote_data_olympus_new().

static void exif_mnote_data_olympus_free ( ExifMnoteData n  )  [static]

Definition at line 66 of file exif-mnote-data-olympus.c.

References exif_mnote_data_olympus_clear().

Referenced by exif_mnote_data_olympus_new().

static const char* exif_mnote_data_olympus_get_description ( ExifMnoteData d,
unsigned int  i 
) [static]

Definition at line 542 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, mnote_olympus_tag_get_description(), and _MnoteOlympusEntry::tag.

Referenced by exif_mnote_data_olympus_new().

static unsigned int exif_mnote_data_olympus_get_id ( ExifMnoteData d,
unsigned int  n 
) [static]

Definition at line 512 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, and _MnoteOlympusEntry::tag.

Referenced by exif_mnote_data_olympus_new().

static const char* exif_mnote_data_olympus_get_name ( ExifMnoteData d,
unsigned int  i 
) [static]

Definition at line 522 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, mnote_olympus_tag_get_name(), and _MnoteOlympusEntry::tag.

Referenced by exif_mnote_data_olympus_new().

static const char* exif_mnote_data_olympus_get_title ( ExifMnoteData d,
unsigned int  i 
) [static]

Definition at line 532 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, mnote_olympus_tag_get_title(), and _MnoteOlympusEntry::tag.

Referenced by exif_mnote_data_olympus_new().

static char* exif_mnote_data_olympus_get_value ( ExifMnoteData d,
unsigned int  i,
char *  val,
unsigned int  maxlen 
) [static]

Definition at line 74 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, and mnote_olympus_entry_get_value().

Referenced by exif_mnote_data_olympus_new().

int exif_mnote_data_olympus_identify ( const ExifData ed,
const ExifEntry e 
)

Detect if MakerNote is recognized as one handled by the Olympus module.

Parameters:
[in] ed image ExifData to identify as as an Olympus type
[in] e ExifEntry for EXIF_TAG_MAKER_NOTE, from within ed but duplicated here for convenience
Returns:
0 if not recognized, nonzero if recognized. The specific nonzero value returned may identify a subtype unique within this module.

Definition at line 608 of file exif-mnote-data-olympus.c.

Referenced by interpret_maker_note().

static enum OlympusVersion exif_mnote_data_olympus_identify_variant ( const unsigned char *  buf,
unsigned int  buf_size 
) [static]

Definition at line 576 of file exif-mnote-data-olympus.c.

References epsonV1, nikonV0, nikonV1, nikonV2, olympusV1, olympusV2, sanyoV1, and unrecognized.

Referenced by exif_mnote_data_olympus_identify(), and exif_mnote_data_olympus_load().

static void exif_mnote_data_olympus_load ( ExifMnoteData en,
const unsigned char *  buf,
unsigned int  buf_size 
) [static]

Definition at line 237 of file exif-mnote-data-olympus.c.

References _MnoteOlympusEntry::components, _ExifMnoteDataOlympus::count, _MnoteOlympusEntry::data, _ExifMnoteDataOlympus::entries, epsonV1, EXIF_BYTE_ORDER_INTEL, EXIF_BYTE_ORDER_MOTOROLA, exif_format_get_size(), exif_get_long(), exif_get_short(), exif_log(), EXIF_LOG_CODE_CORRUPT_DATA, EXIF_LOG_CODE_DEBUG, EXIF_LOG_NO_MEMORY, exif_mem_alloc(), exif_mnote_data_olympus_clear(), exif_mnote_data_olympus_identify_variant(), _MnoteOlympusEntry::format, _ExifMnoteData::log, _ExifMnoteData::mem, MNOTE_NIKON1_TAG_BASE, mnote_olympus_tag_get_name(), nikonV0, nikonV1, nikonV2, _ExifMnoteDataOlympus::offset, olympusV1, olympusV2, _MnoteOlympusEntry::order, _ExifMnoteDataOlympus::order, sanyoV1, _MnoteOlympusEntry::size, _MnoteOlympusEntry::tag, and _ExifMnoteDataOlympus::version.

Referenced by exif_mnote_data_olympus_new().

ExifMnoteData* exif_mnote_data_olympus_new ( ExifMem mem  ) 

Definition at line 634 of file exif-mnote-data-olympus.c.

Referenced by interpret_maker_note().

static void exif_mnote_data_olympus_save ( ExifMnoteData ne,
unsigned char **  buf,
unsigned int *  buf_size 
) [static]

save the MnoteData from ne to buf

Parameters:
ne extract the data from this structure
*buf write the mnoteData to this buffer (buffer will be allocated)
buf_size the size of the buffer

Definition at line 99 of file exif-mnote-data-olympus.c.

References _MnoteOlympusEntry::components, _ExifMnoteDataOlympus::count, _MnoteOlympusEntry::data, _ExifMnoteDataOlympus::entries, epsonV1, EXIF_BYTE_ORDER_INTEL, exif_format_get_size(), EXIF_LOG_NO_MEMORY, exif_mem_alloc(), exif_mem_realloc(), exif_set_long(), exif_set_short(), _MnoteOlympusEntry::format, _ExifMnoteData::log, _ExifMnoteData::mem, MNOTE_NIKON1_TAG_BASE, nikonV0, nikonV1, nikonV2, _ExifMnoteDataOlympus::offset, olympusV1, olympusV2, _ExifMnoteDataOlympus::order, sanyoV1, _MnoteOlympusEntry::tag, and _ExifMnoteDataOlympus::version.

Referenced by exif_mnote_data_olympus_new().

static void exif_mnote_data_olympus_set_byte_order ( ExifMnoteData d,
ExifByteOrder  o 
) [static]

Definition at line 552 of file exif-mnote-data-olympus.c.

References _MnoteOlympusEntry::components, _ExifMnoteDataOlympus::count, _MnoteOlympusEntry::data, _ExifMnoteDataOlympus::entries, exif_array_set_byte_order(), _MnoteOlympusEntry::format, _MnoteOlympusEntry::order, and _ExifMnoteDataOlympus::order.

Referenced by exif_mnote_data_olympus_new().

static void exif_mnote_data_olympus_set_offset ( ExifMnoteData n,
unsigned int  o 
) [static]

Definition at line 570 of file exif-mnote-data-olympus.c.

Referenced by exif_mnote_data_olympus_new().


SourceForge.net Logo Generated by doxygen