OggPacket Class Reference

#include <OggPacket.h>

Inheritance diagram for OggPacket:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OggPacket (void)
 OggPacket (unsigned char *inPackData, unsigned long inPacketSize, bool inIsTruncated, bool inIsContinuation)
virtual ~OggPacket (void)
virtual OggPacketclone ()
 Does a deep copy of this packet and returns a new one for you to keep.
unsigned long packetSize () const
 Returns the size of the contained packet.
unsigned char * packetData ()
 Returns a pointer to the internal packet buffer.
bool isTruncated () const
 Returns whether this packet is truncated.
bool isContinuation () const
 Returns whether this packet is continued from another one.
void setIsTruncated (bool inIsTruncated)
 Set the truncated flag on this packet.
void setIsContinuation (bool inIsContinuation)
 Set the continuation flag on this packet.
void setPacketSize (unsigned long inPacketSize)
 Set the size of this packet.
void setPacketData (unsigned char *inPacketData)
 Give a buffer to kept as the internal packet buffer.
virtual void merge (const OggPacket *inMorePacket)
 Merges this packet to another one you pass it.
string toPackDumpString ()
 Turns the packet into a hex dump string.

Static Public Attributes

const unsigned long HEX_DUMP_LINE_LENGTH = 16

Protected Member Functions

string dumpNCharsToString (unsigned char *inStartPoint, unsigned long inNumChars)
string padField (string inString, unsigned long inPadWidth, unsigned char inPadChar)

Protected Attributes

unsigned long mPacketSize
unsigned char * mPacketData
bool mIsTruncated
bool mIsContinuation

Private Member Functions

OggPacketoperator= (const OggPacket &other)
 OggPacket (const OggPacket &other)

Constructor & Destructor Documentation

OggPacket::OggPacket void   ) 
 

Definition at line 36 of file OggPacket.cpp.

References false.

Referenced by clone().

OggPacket::OggPacket unsigned char *  inPackData,
unsigned long  inPacketSize,
bool  inIsTruncated,
bool  inIsContinuation
 

Definition at line 47 of file OggPacket.cpp.

OggPacket::~OggPacket void   )  [virtual]
 

Definition at line 70 of file OggPacket.cpp.

OggPacket::OggPacket const OggPacket other  )  [private]
 


Member Function Documentation

OggPacket * OggPacket::clone  )  [virtual]
 

Does a deep copy of this packet and returns a new one for you to keep.

Reimplemented in StampedOggPacket.

Definition at line 57 of file OggPacket.cpp.

References mIsContinuation, mIsTruncated, mPacketData, mPacketSize, and OggPacket().

Referenced by FLACHeaderTweaker::getHeader(), and AnxStreamMapper::handleAnxVersion_2_0().

Here is the call graph for this function:

string OggPacket::dumpNCharsToString unsigned char *  inStartPoint,
unsigned long  inNumChars
[protected]
 

Definition at line 138 of file OggPacket.cpp.

References HEX_DUMP_LINE_LENGTH, and padField().

Referenced by toPackDumpString().

Here is the call graph for this function:

bool OggPacket::isContinuation  )  const
 

Returns whether this packet is continued from another one.

Definition at line 185 of file OggPacket.cpp.

Referenced by OggPacketiser::acceptOggPage(), OOOggPacketDumper::acceptStampedOggPacket(), and pageCB().

bool OggPacket::isTruncated  )  const
 

Returns whether this packet is truncated.

Definition at line 182 of file OggPacket.cpp.

Referenced by OggValidationState::acceptOggPage(), OggPacketiser::acceptOggPage(), OOOggPacketDumper::acceptStampedOggPacket(), and pageCB().

void OggPacket::merge const OggPacket inMorePacket  )  [virtual]
 

Merges this packet to another one you pass it.

Definition at line 210 of file OggPacket.cpp.

References mIsContinuation, mIsTruncated, mPacketData, and mPacketSize.

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

unsigned char * OggPacket::packetData  ) 
 

Returns a pointer to the internal packet buffer.

Note that you should reset the checksum on the Ogg page via OggPage::computeAndSetCRCChecksum() if you change the packet data, otherwise you'll end up with an invalid page. (Arguably this should automatically be done for you, but that's the way it is for now.)

Definition at line 179 of file OggPacket.cpp.

Referenced by FLACHeaderTweaker::acceptHeader(), OggDataBufferProcessor::acceptOggPage(), AnnodexRecomposer::acceptOggPage(), FileComments::acceptOggPage(), AutoOggSeekTable::acceptOggPage(), AutoAnxSeekTable::acceptOggPage(), FLACMetadataSplitter::addOtherHeaders(), OggPaginator::addPartOfPacketToPage(), FLACMetadataSplitter::addStreamInfo(), OggPage::computeAndSetCRCChecksum(), FLACMetadataSplitter::convertToStampedPacket(), VorbisStream::createFormatBlock(), TheoraStream::createFormatBlock(), SpeexStream::createFormatBlock(), OggFLAC_1_0_Stream::createFormatBlock(), FLACStream::createFormatBlock(), FFDShowVideoStream::createFormatBlock(), CMMLStream::createFormatBlock(), OggPage::createRawPageData(), OggFLAC_1_0_Stream::deliverCodecHeaders(), OggDemuxSourcePin::deliverOggPacket(), CMMLSourcePin::deliverOggPacket(), FFDShowVideoStream::dispatchPacket(), AnxStreamMapper::getAnxVersion(), headerCount(), OggStreamFactory::IdentifyCodec(), OggFLAC_1_0_Stream::InitCodec(), FFDShowVideoStream::InitCodec(), AnxStreamMapper::isAnnodexBOS(), isAnnodexBOSPage(), isAnxDataPage(), AnxStreamMapper::isAnxDataPage(), isFisheadPage(), TheoraDecoder::isKeyFrame(), mimeType(), pageCB(), VorbisComments::parseOggPacket(), OggFLAC_1_0_Stream::processHeaderPacket(), FLACStream::processHeaderPacket(), FLACPushDecoder::read_callback(), OggMuxInputPin::Receive(), secondaryHeaders(), OggPaginator::setChecksum(), FishSkeleton::setChecksum(), AnxPacketMaker::setChecksum(), setPresentationTimeOnAnnodexHeaderPage(), TheoraDecoder::simulateOldOggPacket(), TheoraEncodeInputPin::TransformData(), FLACMetadataSplitter::verifyCodecID(), and FLACEncodeInputPin::write_callback().

unsigned long OggPacket::packetSize  )  const
 

Returns the size of the contained packet.

Definition at line 171 of file OggPacket.cpp.

Referenced by OggDataBufferProcessor::acceptOggPage(), AnnodexRecomposer::acceptOggPage(), OOOggPacketDumper::acceptStampedOggPacket(), FLACMetadataSplitter::addOtherHeaders(), OggPaginator::addPacketToPage(), OggPaginator::addPartOfPacketToPage(), OggPage::computeAndSetCRCChecksum(), FLACMetadataSplitter::convertToStampedPacket(), OggPage::createRawPageData(), OggDemuxSourcePin::deliverOggPacket(), CMMLSourcePin::deliverOggPacket(), FFDShowVideoStream::dispatchPacket(), AnxStreamMapper::isAnnodexBOS(), AnxStreamMapper::isAnxDataPage(), TheoraDecoder::isKeyFrame(), FishSkeleton::makeFishBone_3_0_Page(), pageCB(), VorbisComments::parseOggPacket(), FLACPushDecoder::read_callback(), OggPaginator::setChecksum(), FishSkeleton::setChecksum(), AnxPacketMaker::setChecksum(), TheoraDecoder::simulateOldOggPacket(), TheoraEncodeInputPin::TransformData(), and FLACEncodeInputPin::write_callback().

string OggPacket::padField string  inString,
unsigned long  inPadWidth,
unsigned char  inPadChar
[protected]
 

Definition at line 130 of file OggPacket.cpp.

Referenced by dumpNCharsToString(), and toPackDumpString().

void OggPacket::setIsContinuation bool  inIsContinuation  ) 
 

Set the continuation flag on this packet.

void OggPacket::setIsTruncated bool  inIsTruncated  ) 
 

Set the truncated flag on this packet.

void OggPacket::setPacketData unsigned char *  inPacketData  ) 
 

Give a buffer to kept as the internal packet buffer.

This function accepts responsibility for the pointer it is passed, and it deletes it in the destructor. Note that you should reset the checksum on the Ogg page via OggPage::computeAndSetCRCChecksum(), otherwise you'll end up with an invalid page. (Arguably this should automatically be done for you, but that's the way it is for now.)

Definition at line 205 of file OggPacket.cpp.

References mPacketData.

Referenced by FLACMetadataSplitter::convertToStampedPacket(), and TheoraDecoder::simulateOldOggPacket().

void OggPacket::setPacketSize unsigned long  inPacketSize  ) 
 

Set the size of this packet.

Definition at line 196 of file OggPacket.cpp.

References mPacketSize.

string OggPacket::toPackDumpString  ) 
 

Turns the packet into a hex dump string.

NOTE::: ShOuld be reworked.

Definition at line 78 of file OggPacket.cpp.

References dumpNCharsToString(), HEX_DUMP_LINE_LENGTH, mPacketData, and padField().

Referenced by OOOggPacketDumper::acceptStampedOggPacket(), and pageCB().

Here is the call graph for this function:


Member Data Documentation

const unsigned long OggPacket::HEX_DUMP_LINE_LENGTH = 16 [static]
 

Definition at line 46 of file OggPacket.h.

Referenced by dumpNCharsToString(), and toPackDumpString().

bool OggPacket::mIsContinuation [protected]
 

Definition at line 87 of file OggPacket.h.

Referenced by clone(), and merge().

bool OggPacket::mIsTruncated [protected]
 

Definition at line 86 of file OggPacket.h.

Referenced by clone(), StampedOggPacket::merge(), and merge().

unsigned char* OggPacket::mPacketData [protected]
 

Definition at line 84 of file OggPacket.h.

Referenced by clone(), StampedOggPacket::merge(), merge(), setPacketData(), and toPackDumpString().

unsigned long OggPacket::mPacketSize [protected]
 

Definition at line 83 of file OggPacket.h.

Referenced by clone(), StampedOggPacket::merge(), merge(), and setPacketSize().


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