OggPageInterleaver Class Reference

Use OggPageInterleaver to interleave two or more Ogg logical bitstreams into one physical bitstream. More...

#include <OggPageInterleaver.h>

Inheritance diagram for OggPageInterleaver:

Inheritance graph
[legend]
Collaboration diagram for OggPageInterleaver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OggPageInterleaver (IOggCallback *inDataWriter, INotifyComplete *inNotifier)
 Construct a new OggPageInterleaver, which sends its output and completeness notification to inDataWriter and inNotifier, respectively.
virtual ~OggPageInterleaver (void)
virtual OggMuxStreamnewStream ()
 Create a new OggMuxStream. You need one OggMuxStream per logical bitstream you wish to interleave.
virtual void processData ()
virtual LOOG_INT64 progressTime ()
 Returns the mux progress in 100 nanoseconds.
virtual LOOG_INT64 bytesWritten ()
 Returns the number of bytes written.
virtual void notifyArrival ()
 Implement this to be notified when "something" arrives.

Protected Member Functions

virtual void writeLowest ()
 Writes the lowest stream out.
virtual bool isProcessable ()
 Returns if there is enough data to do some interleaving.
virtual bool isAllEOS ()
 Returns true if all the streams are at the end.
virtual bool isAllEmpty ()
 Returns true if all the streams are empty.

Protected Attributes

vector< OggMuxStream * > mInputStreams
IOggCallbackmFileWriter
INotifyCompletemNotifier
LOOG_INT64 mBytesWritten
LOOG_INT64 mProgressTime
fstream debugLog

Private Member Functions

OggPageInterleaveroperator= (const OggPageInterleaver &other)
 OggPageInterleaver (const OggPageInterleaver &other)

Detailed Description

Use OggPageInterleaver to interleave two or more Ogg logical bitstreams into one physical bitstream.

To feed data into OggPageInterleaver, you will need to create one OggMuxStream for every logical bitstream that you wish to interleave. Use the newStream() method to do this (don't create your own OggMuxStreams, otherwise OggPageInterleaver won't know anything about them, which is Bad). Feed your pages to each OggMuxStream using its OggMuxStream::acceptOggPage() method. (If you have your data in packets instead of pages, you'll need to use OggPaginator to put them into pages first: see its documentation for details). Note that you'll probably need to set the conversion parameters in OggMuxStream using OggMuxStream::setConversionParams() to get proper Ogg pages. Again, see its documentation for details.

Definition at line 64 of file OggPageInterleaver.h.


Constructor & Destructor Documentation

OggPageInterleaver::OggPageInterleaver IOggCallback inDataWriter,
INotifyComplete inNotifier
 

Construct a new OggPageInterleaver, which sends its output and completeness notification to inDataWriter and inNotifier, respectively.

Definition at line 34 of file OggPageInterleaver.cpp.

References debugLog.

OggPageInterleaver::~OggPageInterleaver void   )  [virtual]
 

Definition at line 45 of file OggPageInterleaver.cpp.

References debugLog.

OggPageInterleaver::OggPageInterleaver const OggPageInterleaver other  )  [private]
 


Member Function Documentation

LOOG_INT64 OggPageInterleaver::bytesWritten  )  [virtual]
 

Returns the number of bytes written.

Definition at line 231 of file OggPageInterleaver.cpp.

References LOOG_INT64.

bool OggPageInterleaver::isAllEmpty  )  [protected, virtual]
 

Returns true if all the streams are empty.

Definition at line 267 of file OggPageInterleaver.cpp.

References mInputStreams.

Referenced by processData().

bool OggPageInterleaver::isAllEOS  )  [protected, virtual]
 

Returns true if all the streams are at the end.

Definition at line 248 of file OggPageInterleaver.cpp.

References mInputStreams.

Referenced by processData().

bool OggPageInterleaver::isProcessable  )  [protected, virtual]
 

Returns if there is enough data to do some interleaving.

Definition at line 235 of file OggPageInterleaver.cpp.

References mInputStreams.

Referenced by processData().

OggMuxStream * OggPageInterleaver::newStream  )  [virtual]
 

Create a new OggMuxStream. You need one OggMuxStream per logical bitstream you wish to interleave.

Definition at line 55 of file OggPageInterleaver.cpp.

References mInputStreams.

Referenced by OggMuxFilter::addAnotherPin(), AnxMuxFilter::addAnotherPin(), AnxMuxFilter::AnxMuxFilter(), and OggMuxFilter::OggMuxFilter().

void OggPageInterleaver::notifyArrival  )  [virtual]
 

Implement this to be notified when "something" arrives.

Implements INotifyArrival.

Definition at line 61 of file OggPageInterleaver.cpp.

References debugLog, and processData().

Here is the call graph for this function:

OggPageInterleaver& OggPageInterleaver::operator= const OggPageInterleaver other  )  [private]
 

void OggPageInterleaver::processData  )  [virtual]
 

Reimplemented in AnxPageInterleaver.

Definition at line 68 of file OggPageInterleaver.cpp.

References debugLog, isAllEmpty(), isAllEOS(), isProcessable(), mNotifier, INotifyComplete::NotifyComplete(), and writeLowest().

Referenced by notifyArrival(), and AnxPageInterleaver::processData().

Here is the call graph for this function:

LOOG_INT64 OggPageInterleaver::progressTime  )  [virtual]
 

Returns the mux progress in 100 nanoseconds.

Definition at line 226 of file OggPageInterleaver.cpp.

References LOOG_INT64.

Referenced by OggMuxFilter::GetCurrentPosition(), and OggMuxFilter::GetPositions().

void OggPageInterleaver::writeLowest  )  [protected, virtual]
 

Writes the lowest stream out.

Definition at line 128 of file OggPageInterleaver.cpp.

References IOggCallback::acceptOggPage(), LOOG_INT64, mBytesWritten, mFileWriter, mInputStreams, mProgressTime, OggMuxStream::packetsSent(), OggPage::pageSize(), OggMuxStream::popFront(), OggMuxStream::scaledFrontTime(), and OggMuxStream::sentAllHeaders().

Referenced by processData().

Here is the call graph for this function:


Member Data Documentation

fstream OggPageInterleaver::debugLog [protected]
 

Definition at line 106 of file OggPageInterleaver.h.

Referenced by notifyArrival(), OggPageInterleaver(), processData(), and ~OggPageInterleaver().

LOOG_INT64 OggPageInterleaver::mBytesWritten [protected]
 

Definition at line 103 of file OggPageInterleaver.h.

Referenced by writeLowest().

IOggCallback* OggPageInterleaver::mFileWriter [protected]
 

Definition at line 100 of file OggPageInterleaver.h.

Referenced by writeLowest().

vector<OggMuxStream*> OggPageInterleaver::mInputStreams [protected]
 

Definition at line 99 of file OggPageInterleaver.h.

Referenced by isAllEmpty(), isAllEOS(), isProcessable(), newStream(), and writeLowest().

INotifyComplete* OggPageInterleaver::mNotifier [protected]
 

Definition at line 101 of file OggPageInterleaver.h.

Referenced by processData().

LOOG_INT64 OggPageInterleaver::mProgressTime [protected]
 

Definition at line 104 of file OggPageInterleaver.h.

Referenced by writeLowest().


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