Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

TagLib::IFD::IFDReader Class Reference

Inheritance diagram for TagLib::IFD::IFDReader:

TagLib::IFD::Makernotes::Nikon3MakernoteReader TagLib::Tiff::Rw2::IFDReader

List of all members.


Detailed Description

This class contains all the IFD reading and parsing code.

Definition at line 38 of file IFDReader.cs.


Public Member Functions

 IFDReader (File file, bool is_bigendian, IFDStructure structure, long base_offset, uint ifd_offset, uint max_offset)
 Constructor. Reads an IFD from given file, using the given endianness.
void Read (int count)
 Read IFD segments from the file.
void Read ()
 Read all IFD segments from the file.

Protected Member Functions

virtual IFDReader CreateSubIFDReader (File file, bool is_bigendian, IFDStructure structure, long base_offset, uint offset, uint max_offset)
 Create a reader for Sub IFD entries.
virtual IFDEntry ParseIFDEntry (ushort tag, ushort type, uint count, long base_offset, uint offset)
 Try to parse the given IFD entry, used to discover format-specific entries.

Protected Attributes

readonly long base_offset
 A System.Int64 value describing the base were the IFD offsets refer to. E.g. in Jpegs the IFD are located in an Segment and the offsets inside the IFD refer from the beginning of this segment. So base_offset must contain the beginning of the segment.
readonly File file
 The File where this IFD is found in.
readonly uint ifd_offset
 A System.UInt32 value with the beginning of the IFD relative to base_offset.
readonly bool is_bigendian
 If IFD is encoded in BigEndian or not.
readonly uint max_offset
 A System.UInt32 with the maximal offset, which should occur in the IFD. Greater offsets, would reference beyond the considered data.
bool parse_makernote = true
 Whether or not the makernote should be parsed.
readonly IFDStructure structure
 The IFD structure that will be populated.

Properties

internal bool ShouldParseMakernote [get, set]
 Whether or not the makernote should be parsed.

Private Member Functions

IFDEntry CreateIFDEntry (ushort tag, ushort type, uint count, long base_offset, ByteVector offset_data, uint max_offset)
 Creates an IFDEntry from the given values. This method is used for every entry. Custom parsing can be hooked in by overriding the ParseIFDEntry(ushort,ushort,uint,long,uint) method.
bool DetectIFDLoop (long offset)
 Attempts to detect whether or not this file has an endless IFD loop.
void FixupDirectory (long base_offset, IFDDirectory directory)
 Performs some fixups to a read IFDDirectory. For some special cases multiple IFDEntry instances contained in the directory are needed. Therfore, we do the fixups after reading the whole directory to be sure, all entries are present.
IFDEntry ParseMakernote (ushort tag, ushort type, uint count, long base_offset, uint offset)
string ReadAsciiString (int count)
 Reads an ASCII string from the current file.
uint ReadIFD (long base_offset, uint offset, uint max_offset)
 Reads an IFD from file at position offset relative to base_offset .
int ReadInt ()
 Reads a 4-byte int from the current file.
int[] ReadIntArray (uint count)
 Reads an array of 4-byte int from the current file.
Rational ReadRational ()
 Reads a Rational by two following unsigned int from the current file.
short ReadShort ()
 Reads a 2-byte signed short from the current file.
short[] ReadShortArray (uint count)
 Reads an array of 2-byte signed shorts from the current file.
SRational ReadSRational ()
 Reads a SRational by two following unsigned int from the current file.
uint ReadUInt ()
 Reads a 4-byte unsigned int from the current file.
uint[] ReadUIntArray (uint count)
 Reads an array of 4-byte unsigned int from the current file.
ushort ReadUShort ()
 Reads a 2-byte unsigned short from the current file.
ushort[] ReadUShortArray (uint count)
 Reads an array of 2-byte shorts from the current file.
void StartIFDLoopDetect ()
 Add to the reference count for the IFD loop detection.
void StopIFDLoopDetect ()
 End the IFD loop detection, cleanup if we're the last.

Static Private Attributes

static Dictionary< File, int > ifd_loopdetect_refs = new Dictionary<File, int> ()
static Dictionary< File, List
< long > > 
ifd_offsets = new Dictionary<File, List<long>> ()
static readonly string LEICA_HEADER = "LEICA\0\0\0"
static readonly string NIKON_HEADER = "Nikon\0"
static readonly string OLYMPUS1_HEADER = "OLYMP\0"
static readonly string OLYMPUS2_HEADER = "OLYMPUS\0"
static readonly string PANASONIC_HEADER = "Panasonic\0\0\0"
static readonly string PENTAX_HEADER = "AOC\0"
static readonly string SONY_HEADER = "SONY DSC \0\0\0"

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index