OggPaginator Class Reference

#include <OggPaginator.h>

Inheritance diagram for OggPaginator:

Inheritance graph
[legend]
Collaboration diagram for OggPaginator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OggPaginator (void)
virtual ~OggPaginator (void)
bool setParameters (OggPaginatorSettings *inSettings)
 Set the pagination options.
OggPaginatorSettingsparameters ()
 Get the pagination options.
virtual bool acceptStampedOggPacket (StampedOggPacket *inOggPacket)
 Feed your packets in here.
bool setPageCallback (IOggCallback *inPageCallback)
 Set the callback where your finished pages will go.
bool finishStream ()
 Finish stream flushed left over data into a page and EOS marks it.
void setNumHeaders (unsigned long inNumHeaders)
 Sets the number of headers. This is important to make sure they aren't on the same page as data packets.
unsigned long numHeaders ()
 Returns the number of headers set for this paginator.

Protected Member Functions

bool deliverCurrentPage ()
 Internal delivery to the callback.
bool setChecksum ()
 Calculates and sets the checksum on the page.
bool createFreshPage ()
 Creates a new oggpage to start filling.
bool addPacketToPage (StampedOggPacket *inOggPacket)
 Adds the packet to the page.
unsigned long addAsMuchPacketAsPossible (StampedOggPacket *inOggPacket, unsigned long inStartAt, long inRemaining)
 Adds as much packet as the settings dicate.
bool addPartOfPacketToPage (StampedOggPacket *inOggPacket, unsigned long inStartFrom, unsigned long inLength)
 Add a part of a packet to a page.

Protected Attributes

unsigned long mPacketCount
unsigned long mNumHeaders
unsigned long mCurrentPageSize
unsigned char mSegmentTable [255]
unsigned char mSegmentTableSize
unsigned long mSequenceNo
bool mPendingPageHasData
IOggCallbackmPageCallback
OggPaginatorSettingsmSettings
OggPagemPendingPage
unsigned char * mHeaderBuff
fstream debugLog
LOOG_INT64 mLastGranulePos

Private Member Functions

OggPaginatoroperator= (const OggPaginator &other)
 OggPaginator (const OggPaginator &other)

Constructor & Destructor Documentation

OggPaginator::OggPaginator void   ) 
 

Definition at line 106 of file OggPaginator.cpp.

References false, and mHeaderBuff.

OggPaginator::~OggPaginator void   )  [virtual]
 

Definition at line 123 of file OggPaginator.cpp.

References mHeaderBuff.

OggPaginator::OggPaginator const OggPaginator other  )  [private]
 


Member Function Documentation

bool OggPaginator::acceptStampedOggPacket StampedOggPacket inOggPacket  )  [virtual]
 

Feed your packets in here.

Implements IStampedOggPacketSink.

Definition at line 145 of file OggPaginator.cpp.

References addPacketToPage().

Referenced by AnxMuxInputPin::CompleteConnect(), and OggMuxInputPin::Receive().

Here is the call graph for this function:

unsigned long OggPaginator::addAsMuchPacketAsPossible StampedOggPacket inOggPacket,
unsigned long  inStartAt,
long  inRemaining
[protected]
 

Adds as much packet as the settings dicate.

Definition at line 323 of file OggPaginator.cpp.

References addPartOfPacketToPage(), deliverCurrentPage(), OggPage::header(), OggPageHeader::HeaderFlags(), mCurrentPageSize, MIN, OggPaginatorSettings::mMaxPageSize, OggPaginatorSettings::mMinPageSize, mPendingPage, mSegmentTableSize, mSettings, OggPageHeader::PageSequenceNo(), and OggPageHeader::setHeaderFlags().

Referenced by addPacketToPage().

Here is the call graph for this function:

bool OggPaginator::addPacketToPage StampedOggPacket inOggPacket  )  [protected]
 

Adds the packet to the page.

Definition at line 266 of file OggPaginator.cpp.

References addAsMuchPacketAsPossible(), deliverCurrentPage(), OggPaginatorSettings::mMaxPacksPerPage, OggPaginatorSettings::mNumHeaders, mPacketCount, mPendingPageHasData, mSettings, and OggPacket::packetSize().

Referenced by acceptStampedOggPacket().

Here is the call graph for this function:

bool OggPaginator::addPartOfPacketToPage StampedOggPacket inOggPacket,
unsigned long  inStartFrom,
unsigned long  inLength
[protected]
 

Add a part of a packet to a page.

Definition at line 395 of file OggPaginator.cpp.

References OggPage::addPacket(), StampedOggPacket::endTime(), OggPage::header(), mCurrentPageSize, mPendingPage, mSegmentTable, mSegmentTableSize, StampedOggPacket::mStampType, OggPacket::packetData(), OggPacket::packetSize(), OggPageHeader::setGranulePos(), and StampedOggPacket::startTime().

Referenced by addAsMuchPacketAsPossible().

Here is the call graph for this function:

bool OggPaginator::createFreshPage  )  [protected]
 

Creates a new oggpage to start filling.

Definition at line 241 of file OggPaginator.cpp.

References OggPage::header(), mCurrentPageSize, mPendingPage, mPendingPageHasData, mSegmentTableSize, mSequenceNo, OggPaginatorSettings::mSerialNo, mSettings, OggPageHeader::setGranulePos(), OggPageHeader::setHeaderFlags(), OggPageHeader::setPageSequenceNo(), and OggPageHeader::setStreamSerialNo().

Referenced by deliverCurrentPage(), and setParameters().

Here is the call graph for this function:

bool OggPaginator::deliverCurrentPage  )  [protected]
 

Internal delivery to the callback.

Definition at line 222 of file OggPaginator.cpp.

References IOggCallback::acceptOggPage(), createFreshPage(), OggPageHeader::GranulePos(), OggPage::header(), OggPage::headerSize(), mCurrentPageSize, mLastGranulePos, mPageCallback, mPendingPage, mSegmentTable, mSegmentTableSize, setChecksum(), OggPageHeader::setDataSize(), and OggPageHeader::setSegmentTable().

Referenced by addAsMuchPacketAsPossible(), addPacketToPage(), and finishStream().

Here is the call graph for this function:

bool OggPaginator::finishStream  ) 
 

Finish stream flushed left over data into a page and EOS marks it.

Definition at line 155 of file OggPaginator.cpp.

References deliverCurrentPage(), OggPage::header(), OggPageHeader::HeaderFlags(), mLastGranulePos, mPendingPage, OggPage::numPackets(), OggPageHeader::setGranulePos(), and OggPageHeader::setHeaderFlags().

Referenced by OggMuxInputPin::EndOfStream().

Here is the call graph for this function:

unsigned long OggPaginator::numHeaders  ) 
 

Returns the number of headers set for this paginator.

Definition at line 501 of file OggPaginator.cpp.

References OggPaginatorSettings::mNumHeaders, and mSettings.

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

OggPaginatorSettings * OggPaginator::parameters  ) 
 

Get the pagination options.

Definition at line 140 of file OggPaginator.cpp.

Referenced by AnxMuxInputPin::SetMediaType().

bool OggPaginator::setChecksum  )  [protected]
 

Calculates and sets the checksum on the page.

Definition at line 175 of file OggPaginator.cpp.

References crc_lookup, OggPage::getPacket(), OggPage::header(), OggPage::headerSize(), mHeaderBuff, mPendingPage, OggPage::numPackets(), OggPacket::packetData(), OggPacket::packetSize(), OggPageHeader::rawData(), and OggPageHeader::setCRCChecksum().

Referenced by deliverCurrentPage().

Here is the call graph for this function:

void OggPaginator::setNumHeaders unsigned long  inNumHeaders  ) 
 

Sets the number of headers. This is important to make sure they aren't on the same page as data packets.

Definition at line 498 of file OggPaginator.cpp.

References OggPaginatorSettings::mNumHeaders, and mSettings.

Referenced by OggMuxInputPin::Receive(), OggMuxInputPin::SetMediaType(), and AnxMuxInputPin::SetMediaType().

bool OggPaginator::setPageCallback IOggCallback inPageCallback  ) 
 

Set the callback where your finished pages will go.

Definition at line 493 of file OggPaginator.cpp.

References mPageCallback.

Referenced by OggMuxInputPin::OggMuxInputPin().

bool OggPaginator::setParameters OggPaginatorSettings inSettings  ) 
 

Set the pagination options.

Definition at line 131 of file OggPaginator.cpp.

References createFreshPage(), and mSettings.

Referenced by OggMuxInputPin::OggMuxInputPin().

Here is the call graph for this function:


Member Data Documentation

fstream OggPaginator::debugLog [protected]
 

Definition at line 108 of file OggPaginator.h.

unsigned long OggPaginator::mCurrentPageSize [protected]
 

Definition at line 97 of file OggPaginator.h.

Referenced by addAsMuchPacketAsPossible(), addPartOfPacketToPage(), createFreshPage(), and deliverCurrentPage().

unsigned char* OggPaginator::mHeaderBuff [protected]
 

Definition at line 107 of file OggPaginator.h.

Referenced by OggPaginator(), setChecksum(), and ~OggPaginator().

LOOG_INT64 OggPaginator::mLastGranulePos [protected]
 

Definition at line 110 of file OggPaginator.h.

Referenced by deliverCurrentPage(), and finishStream().

unsigned long OggPaginator::mNumHeaders [protected]
 

Definition at line 95 of file OggPaginator.h.

unsigned long OggPaginator::mPacketCount [protected]
 

Definition at line 94 of file OggPaginator.h.

Referenced by addPacketToPage().

IOggCallback* OggPaginator::mPageCallback [protected]
 

Definition at line 103 of file OggPaginator.h.

Referenced by deliverCurrentPage(), and setPageCallback().

OggPage* OggPaginator::mPendingPage [protected]
 

Definition at line 105 of file OggPaginator.h.

Referenced by addAsMuchPacketAsPossible(), addPartOfPacketToPage(), createFreshPage(), deliverCurrentPage(), finishStream(), and setChecksum().

bool OggPaginator::mPendingPageHasData [protected]
 

Definition at line 101 of file OggPaginator.h.

Referenced by addPacketToPage(), and createFreshPage().

unsigned char OggPaginator::mSegmentTable[255] [protected]
 

Definition at line 98 of file OggPaginator.h.

Referenced by addPartOfPacketToPage(), and deliverCurrentPage().

unsigned char OggPaginator::mSegmentTableSize [protected]
 

Definition at line 99 of file OggPaginator.h.

Referenced by addAsMuchPacketAsPossible(), addPartOfPacketToPage(), createFreshPage(), and deliverCurrentPage().

unsigned long OggPaginator::mSequenceNo [protected]
 

Definition at line 100 of file OggPaginator.h.

Referenced by createFreshPage().

OggPaginatorSettings* OggPaginator::mSettings [protected]
 

Definition at line 104 of file OggPaginator.h.

Referenced by addAsMuchPacketAsPossible(), addPacketToPage(), createFreshPage(), numHeaders(), setNumHeaders(), and setParameters().


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