AnnodexRecomposer Class Reference

#include <AnnodexRecomposer.h>

Inheritance diagram for AnnodexRecomposer:

Inheritance graph
[legend]
Collaboration diagram for AnnodexRecomposer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AnnodexRecomposer (void)
 AnnodexRecomposer (string inFilename, BufferWriter inBufferWriter, void *inBufferWriterUserData, string inCachedSeekTableFilename="")
 ~AnnodexRecomposer (void)
bool recomposeStreamFrom (double inStartingTimeOffset, const vector< string > *inWantedMIMETypes)
bool acceptOggPage (OggPage *inOggPage)
 AnnodexRecomposer (const AnnodexRecomposer &)
AnnodexRecomposeroperator= (const AnnodexRecomposer &)

Protected Types

typedef pair< unsigned long,
unsigned long > 
tSerial_HeadCountPair
enum  eDemuxState {
  SEEN_NOTHING, SEEN_ANNODEX_BOS, SEEN_ANNODEX_EOS, SEEN_ALL_CODEC_HEADERS,
  INVALID = 100
}
enum  eDemuxParserState { LOOK_FOR_HEADERS, LOOK_FOR_BODY }

Protected Attributes

BufferWriter mBufferWriter
void * mBufferWriterUserData
fstream mDebugFile
string mFilename
string mCachedSeekTableFilename
unsigned long mAnnodexSerialNumber
eDemuxState mDemuxState
eDemuxParserState mDemuxParserState
set< tSerial_HeadCountPairmWantedStreamSerialNumbers
const vector< string > * mWantedMIMETypes
LOOG_UINT64 mRequestedStartTime
unsigned short mAnnodexMajorVersion

Member Typedef Documentation

typedef pair<unsigned long, unsigned long> AnnodexRecomposer::tSerial_HeadCountPair [protected]
 

Definition at line 64 of file AnnodexRecomposer.h.

Referenced by acceptOggPage().


Member Enumeration Documentation

enum AnnodexRecomposer::eDemuxParserState [protected]
 

Enumeration values:
LOOK_FOR_HEADERS 
LOOK_FOR_BODY 

Definition at line 74 of file AnnodexRecomposer.h.

enum AnnodexRecomposer::eDemuxState [protected]
 

Enumeration values:
SEEN_NOTHING 
SEEN_ANNODEX_BOS 
SEEN_ANNODEX_EOS 
SEEN_ALL_CODEC_HEADERS 
INVALID 

Definition at line 66 of file AnnodexRecomposer.h.


Constructor & Destructor Documentation

AnnodexRecomposer::AnnodexRecomposer void   ) 
 

AnnodexRecomposer::AnnodexRecomposer string  inFilename,
BufferWriter  inBufferWriter,
void *  inBufferWriterUserData,
string  inCachedSeekTableFilename = ""
 

You may optionally ask AnnodexRecomposer to use a cached representation of the seek table (which is computationally expensive to build) by passing a filename in the inCachedSeekTableFilename parameter. If the file does not exist, AnnodexRecomposer will write out the constructed seek table to the filename given. (If the file cannot be written for any reason, you will receive no warning. Yell at me if this is a serious issue.)

Definition at line 63 of file AnnodexRecomposer.cpp.

References BufferWriter, mCachedSeekTableFilename, mFilename, and SEEN_NOTHING.

AnnodexRecomposer::~AnnodexRecomposer void   ) 
 

Definition at line 79 of file AnnodexRecomposer.cpp.

AnnodexRecomposer::AnnodexRecomposer const AnnodexRecomposer  ) 
 


Member Function Documentation

bool AnnodexRecomposer::acceptOggPage OggPage inOggPage  )  [virtual]
 

All callers to acceptOggPage give away their pointer to this function. All methods implementing this interface are responsible for deleting this page. All callers should NULL their pointer immediately after calling to avoid reusing them.

Implements IOggCallback.

Definition at line 402 of file AnnodexRecomposer.cpp.

References OggPage::createRawPageData(), OggPage::getPacket(), OggPage::header(), OggPageHeader::HeaderFlags(), INVALID, isAnnodexBOSPage(), isAnnodexEOSPage(), isAnxDataPage(), isFisheadPage(), mAnnodexMajorVersion, mAnnodexSerialNumber, mBufferWriter, mDebugFile, mDemuxParserState, mDemuxState, mimeType(), mRequestedStartTime, mWantedMIMETypes, mWantedStreamSerialNumbers, OggPage::numPackets(), OggPacket::packetData(), OggPacket::packetSize(), OggPage::pageSize(), secondaryHeaders(), SEEN_ALL_CODEC_HEADERS, SEEN_ANNODEX_BOS, SEEN_ANNODEX_EOS, SEEN_NOTHING, setPresentationTimeOnAnnodexHeaderPage(), OggPageHeader::StreamSerialNo(), tSerial_HeadCountPair, and wantOnlyPacketBody().

Here is the call graph for this function:

AnnodexRecomposer& AnnodexRecomposer::operator= const AnnodexRecomposer  ) 
 

bool AnnodexRecomposer::recomposeStreamFrom double  inStartingTimeOffset,
const vector< string > *  inWantedMIMETypes
[virtual]
 

The starting time offset's units is in seconds, while the wanted MIME types is a vector of strings, which will be matched against the MIME type in the AnxData header of the logical bitstream.

Implements IRecomposer.

Definition at line 87 of file AnnodexRecomposer.cpp.

References AutoOggSeekTable::buildTable(), AutoOggSeekTable::buildTableFromFile(), OggDataBuffer::feed(), fileExists(), OggSeekTable::getStartPos(), mBufferWriter, mCachedSeekTableFilename, mDebugFile, mDemuxParserState, mDemuxState, mFilename, MIN, mRequestedStartTime, mWantedMIMETypes, mWantedStreamSerialNumbers, OggDataBuffer::registerVirtualCallback(), AutoOggSeekTable::serialiseInto(), and wantOnlyCMML().

Here is the call graph for this function:


Member Data Documentation

unsigned short AnnodexRecomposer::mAnnodexMajorVersion [protected]
 

Definition at line 97 of file AnnodexRecomposer.h.

Referenced by acceptOggPage().

unsigned long AnnodexRecomposer::mAnnodexSerialNumber [protected]
 

Definition at line 87 of file AnnodexRecomposer.h.

Referenced by acceptOggPage().

BufferWriter AnnodexRecomposer::mBufferWriter [protected]
 

Definition at line 79 of file AnnodexRecomposer.h.

Referenced by acceptOggPage(), and recomposeStreamFrom().

void* AnnodexRecomposer::mBufferWriterUserData [protected]
 

Definition at line 80 of file AnnodexRecomposer.h.

string AnnodexRecomposer::mCachedSeekTableFilename [protected]
 

Definition at line 85 of file AnnodexRecomposer.h.

Referenced by AnnodexRecomposer(), and recomposeStreamFrom().

fstream AnnodexRecomposer::mDebugFile [protected]
 

Definition at line 82 of file AnnodexRecomposer.h.

Referenced by acceptOggPage(), and recomposeStreamFrom().

eDemuxParserState AnnodexRecomposer::mDemuxParserState [protected]
 

Definition at line 90 of file AnnodexRecomposer.h.

Referenced by acceptOggPage(), and recomposeStreamFrom().

eDemuxState AnnodexRecomposer::mDemuxState [protected]
 

Definition at line 89 of file AnnodexRecomposer.h.

Referenced by acceptOggPage(), and recomposeStreamFrom().

string AnnodexRecomposer::mFilename [protected]
 

Definition at line 84 of file AnnodexRecomposer.h.

Referenced by AnnodexRecomposer(), and recomposeStreamFrom().

LOOG_UINT64 AnnodexRecomposer::mRequestedStartTime [protected]
 

Definition at line 95 of file AnnodexRecomposer.h.

Referenced by acceptOggPage(), and recomposeStreamFrom().

const vector<string>* AnnodexRecomposer::mWantedMIMETypes [protected]
 

Definition at line 93 of file AnnodexRecomposer.h.

Referenced by acceptOggPage(), and recomposeStreamFrom().

set<tSerial_HeadCountPair> AnnodexRecomposer::mWantedStreamSerialNumbers [protected]
 

Definition at line 92 of file AnnodexRecomposer.h.

Referenced by acceptOggPage(), and recomposeStreamFrom().


The documentation for this class was generated from the following files:
Generated on Tue Feb 15 15:01:13 2005 for oggdsf by  doxygen 1.3.9