#include <essence.h>
Inheritance diagram for BodyReader:

Public Member Functions | |
| BodyReader (MXFFilePtr File) | |
| Construct a body reader and associate it with an MXF file.   | |
| Position | Seek (Position Pos=0) | 
| Seek to a specific point in the file.   | |
| Position | Tell (void) | 
| Tell the current file location.   | |
| Position | Seek (UInt32 BodySID, Position Pos) | 
| Seek to a specific byte offset in a given stream.   | |
| Position | Tell (UInt32 BodySID) | 
| Report the byte offset in a given stream.   | |
| void | SetDefaultHandler (GCReadHandlerPtr DefaultHandler=NULL) | 
| Set the default handler for all new GCReaders.   | |
| void | SetFillerHandler (GCReadHandlerPtr FillerHandler=NULL) | 
| Set the filler handler for all new GCReaders.   | |
| void | SetEncryptionHandler (GCReadHandlerPtr EncryptionHandler=NULL) | 
| Set the encryption handler for all new GCReaders.   | |
| bool | MakeGCReader (UInt32 BodySID, GCReadHandlerPtr DefaultHandler=NULL, GCReadHandlerPtr FillerHandler=NULL) | 
| Make a GCReader for the specified BodySID.   | |
| GCReaderPtr | GetGCReader (UInt32 BodySID) | 
| Get a pointer to the GCReader used for the specified BodySID.   | |
| bool | ReadFromFile (bool SingleKLV=false) | 
| Read from file.   | |
| bool | ReSync () | 
| Resync after possible loss or corruption of body data.   | |
| bool | IsAtPartition (void) | 
| Are we currently at the start of a partition pack?   | |
| bool | Eof (void) | 
| Are we currently at the end of the file?   | |
| UInt32 | GetBodySID (void) | 
| Get the BodySID of the current location (0 if not known).   | |
Protected Member Functions | |
| bool | InitSeek (void) | 
| Initialize the per SID seek system.   | |
Protected Attributes | |
| MXFFilePtr | File | 
| File from which to read.   | |
| Position | CurrentPos | 
| Current position within file.   | |
| bool | NewPos | 
| The value of CurrentPos has been updated by a seek - therefore reading must be reinitialized!   | |
| bool | SeekInited | 
| True once the per SID seek system has been initialized.   | |
| bool | AtPartition | 
| Are we (to our knowledge) at the start of a partition pack?   | |
| bool | AtEOF | 
| Are we (to our knowledge) at the end of the file?   | |
| UInt32 | CurrentBodySID | 
| The currentBodySID being processed.   | |
| GCReadHandlerPtr | GCRDefaultHandler | 
| Default handler to use for new GCReaders.   | |
| GCReadHandlerPtr | GCRFillerHandler | 
| Filler handler to use for new GCReaders.   | |
| GCReadHandlerPtr | GCREncryptionHandler | 
| Encryption handler to use for new GCReaders.   | |
| std::map< UInt32, GCReaderPtr > | Readers | 
| Map of GCReaders indexed by BodySID.   | |
| BodyReader | ( | MXFFilePtr | File | ) | 
Construct a body reader and associate it with an MXF file.
Seek to a specific point in the file.
| Position Tell | ( | void | ) |  [inline] | 
        
Tell the current file location.
Seek to a specific byte offset in a given stream.
Report the byte offset in a given stream.
| void SetDefaultHandler | ( | GCReadHandlerPtr |  DefaultHandler = NULL           | 
          ) |  [inline] | 
        
Set the default handler for all new GCReaders.
Each time a new GCReader is created this default handler will be used if no other is specified
| void SetFillerHandler | ( | GCReadHandlerPtr |  FillerHandler = NULL           | 
          ) |  [inline] | 
        
Set the filler handler for all new GCReaders.
Each time a new GCReader is created this filler handler will be used if no other is specified
| void SetEncryptionHandler | ( | GCReadHandlerPtr |  EncryptionHandler = NULL           | 
          ) |  [inline] | 
        
Set the encryption handler for all new GCReaders.
Each time a new GCReader is created this encryption handler will be used
| bool MakeGCReader | ( | UInt32 | BodySID, | |
| GCReadHandlerPtr |  DefaultHandler = NULL,  | 
        |||
| GCReadHandlerPtr |  FillerHandler = NULL | |||
| ) | 
| GCReaderPtr GetGCReader | ( | UInt32 | BodySID | ) |  [inline] | 
        
Get a pointer to the GCReader used for the specified BodySID.
| bool ReadFromFile | ( | bool |  SingleKLV = false           | 
          ) | 
Read from file.
All KLVs are dispatched to handlers Stops reading at the next partition pack unless SingleKLV is true when only one KLV is dispatched
| bool ReSync | ( | ) | 
Resync after possible loss or corruption of body data.
Searches for the next partition pack and moves file pointer to that point
| bool IsAtPartition | ( | void | ) | 
Are we currently at the start of a partition pack?
| bool Eof | ( | void | ) | 
Are we currently at the end of the file?
| UInt32 GetBodySID | ( | void | ) |  [inline] | 
        
Get the BodySID of the current location (0 if not known).
| bool InitSeek | ( | void | ) |  [protected] | 
        
Initialize the per SID seek system.
To allow us to seek to byte offsets within a file we need to initialize various structures - seeking is not always possible!!
MXFFilePtr File [protected]           | 
        
File from which to read.
Position CurrentPos [protected]           | 
        
Current position within file.
bool NewPos [protected]           | 
        
The value of CurrentPos has been updated by a seek - therefore reading must be reinitialized!
bool SeekInited [protected]           | 
        
True once the per SID seek system has been initialized.
bool AtPartition [protected]           | 
        
Are we (to our knowledge) at the start of a partition pack?
bool AtEOF [protected]           | 
        
Are we (to our knowledge) at the end of the file?
UInt32 CurrentBodySID [protected]           | 
        
The currentBodySID being processed.
GCReadHandlerPtr GCRDefaultHandler [protected]           | 
        
Default handler to use for new GCReaders.
GCReadHandlerPtr GCRFillerHandler [protected]           | 
        
Filler handler to use for new GCReaders.
GCReadHandlerPtr GCREncryptionHandler [protected]           | 
        
Encryption handler to use for new GCReaders.
std::map<UInt32, GCReaderPtr> Readers [protected]           | 
        
Map of GCReaders indexed by BodySID.
 1.5.1-p1