OggPacketiser Class Reference

#include <OggPacketiser.h>

Inheritance diagram for OggPacketiser:

Inheritance graph
[legend]
Collaboration diagram for OggPacketiser:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ePacketiserState { PKRSTATE_OK, PKRSTATE_AWAITING_CONTINUATION, PKRSTATE_INVALID_STREAM }

Public Member Functions

 OggPacketiser (void)
 OggPacketiser (IStampedOggPacketSink *inPacketSink)
virtual ~OggPacketiser (void)
virtual bool acceptOggPage (OggPage *inOggPage)
 Takes incoming pages, and fires the packets to the packet sink.
void setPacketSink (IStampedOggPacketSink *inPacketSink)
 Set the callback interface where generated packets will go.
IStampedOggPacketSinkpacketSink ()
 Returns a pointer to the interface recieving packets.
void setNumIgnorePackets (unsigned long inNumIgnorePackets)
 Tell the packetiser to ignore this many following packets.
unsigned long numIgnorePackets ()
 How many packets we are ignoring.
bool reset ()
 Reset the packetiser.

Protected Member Functions

virtual bool dispatchStampedOggPacket (StampedOggPacket *inPacket)
bool processPage (OggPage *inOggPage, bool inIncludeFirst, bool inIncludeLast)

Protected Attributes

IStampedOggPacketSinkmPacketSink
StampedOggPacketmPendingPacket
bool mLooseMode
unsigned long mNumIgnorePackets
LOOG_INT64 mPrevGranPos
LOOG_INT64 mCurrentGranPos
ePacketiserState mPacketiserState

Private Member Functions

OggPacketiseroperator= (const OggPacketiser &other)
 OggPacketiser (const OggPacketiser &other)

Member Enumeration Documentation

enum OggPacketiser::ePacketiserState
 

Enumeration values:
PKRSTATE_OK 
PKRSTATE_AWAITING_CONTINUATION 
PKRSTATE_INVALID_STREAM 

Definition at line 47 of file OggPacketiser.h.


Constructor & Destructor Documentation

OggPacketiser::OggPacketiser void   ) 
 

Definition at line 34 of file OggPacketiser.cpp.

References true.

OggPacketiser::OggPacketiser IStampedOggPacketSink inPacketSink  ) 
 

Definition at line 46 of file OggPacketiser.cpp.

References true.

OggPacketiser::~OggPacketiser void   )  [virtual]
 

Definition at line 58 of file OggPacketiser.cpp.

OggPacketiser::OggPacketiser const OggPacketiser other  )  [private]
 


Member Function Documentation

bool OggPacketiser::acceptOggPage OggPage inOggPage  )  [virtual]
 

Takes incoming pages, and fires the packets to the packet sink.

... and there is at least 1 packet...

Implements IOggCallback.

Definition at line 80 of file OggPacketiser.cpp.

References StampedOggPacket::clone(), dispatchStampedOggPacket(), OggPage::getPacket(), OggPage::getStampedPacket(), OggPageHeader::GranulePos(), OggPage::header(), OggPageHeader::HeaderFlags(), OggPacket::isContinuation(), OggPacket::isTruncated(), mCurrentGranPos, StampedOggPacket::merge(), mLooseMode, mPacketiserState, mPendingPacket, mPrevGranPos, OggPage::numPackets(), and processPage().

Referenced by OggStream::acceptOggPage().

Here is the call graph for this function:

bool OggPacketiser::dispatchStampedOggPacket StampedOggPacket inPacket  )  [protected, virtual]
 

Definition at line 334 of file OggPacketiser.cpp.

References IStampedOggPacketSink::acceptStampedOggPacket(), mCurrentGranPos, mNumIgnorePackets, mPacketSink, mPrevGranPos, and StampedOggPacket::setTimeStamp().

Referenced by acceptOggPage(), and processPage().

Here is the call graph for this function:

unsigned long OggPacketiser::numIgnorePackets  ) 
 

How many packets we are ignoring.

Definition at line 355 of file OggPacketiser.cpp.

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

IStampedOggPacketSink * OggPacketiser::packetSink  ) 
 

Returns a pointer to the interface recieving packets.

Definition at line 64 of file OggPacketiser.cpp.

bool OggPacketiser::processPage OggPage inOggPage,
bool  inIncludeFirst,
bool  inIncludeLast
[protected]
 

Definition at line 312 of file OggPacketiser.cpp.

References StampedOggPacket::clone(), dispatchStampedOggPacket(), OggPage::getStampedPacket(), and OggPage::numPackets().

Referenced by acceptOggPage().

Here is the call graph for this function:

bool OggPacketiser::reset  ) 
 

Reset the packetiser.

Definition at line 70 of file OggPacketiser.cpp.

References mCurrentGranPos, mNumIgnorePackets, mPacketiserState, mPendingPacket, and mPrevGranPos.

Referenced by OggStream::flush().

void OggPacketiser::setNumIgnorePackets unsigned long  inNumIgnorePackets  ) 
 

Tell the packetiser to ignore this many following packets.

Definition at line 352 of file OggPacketiser.cpp.

References mNumIgnorePackets.

Referenced by OggStream::flush().

void OggPacketiser::setPacketSink IStampedOggPacketSink inPacketSink  ) 
 

Set the callback interface where generated packets will go.

Definition at line 67 of file OggPacketiser.cpp.

References mPacketSink.

Referenced by OggStream::OggStream().


Member Data Documentation

LOOG_INT64 OggPacketiser::mCurrentGranPos [protected]
 

Definition at line 85 of file OggPacketiser.h.

Referenced by acceptOggPage(), dispatchStampedOggPacket(), and reset().

bool OggPacketiser::mLooseMode [protected]
 

Definition at line 82 of file OggPacketiser.h.

Referenced by acceptOggPage().

unsigned long OggPacketiser::mNumIgnorePackets [protected]
 

Definition at line 83 of file OggPacketiser.h.

Referenced by dispatchStampedOggPacket(), reset(), and setNumIgnorePackets().

ePacketiserState OggPacketiser::mPacketiserState [protected]
 

Definition at line 87 of file OggPacketiser.h.

Referenced by acceptOggPage(), and reset().

IStampedOggPacketSink* OggPacketiser::mPacketSink [protected]
 

Definition at line 77 of file OggPacketiser.h.

Referenced by dispatchStampedOggPacket(), and setPacketSink().

StampedOggPacket* OggPacketiser::mPendingPacket [protected]
 

Definition at line 78 of file OggPacketiser.h.

Referenced by acceptOggPage(), and reset().

LOOG_INT64 OggPacketiser::mPrevGranPos [protected]
 

Definition at line 84 of file OggPacketiser.h.

Referenced by acceptOggPage(), dispatchStampedOggPacket(), and reset().


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