StampedOggPacket Class Reference

#include <StampedOggPacket.h>

Inheritance diagram for StampedOggPacket:

Inheritance graph
[legend]
Collaboration diagram for StampedOggPacket:

Collaboration graph
[legend]
List of all members.

Public Types

enum  eStampType { NONE = 0, OGG_END_ONLY = 1, OGG_BOTH = 2, DIRECTSHOW = 3 }

Public Member Functions

 StampedOggPacket (void)
 StampedOggPacket (unsigned char *inPackData, unsigned long inPacketSize, bool inIsTruncated, bool inIsContinuation, LOOG_INT64 inStartTime, LOOG_INT64 inEndTime, unsigned short inStampType)
virtual ~StampedOggPacket (void)
virtual OggPacketclone ()
 Does a deep copy of the packet a returns you a new one you can keep.
LOOG_INT64 startTime ()
 Returns the start time of the packet. (Check stamp type).
LOOG_INT64 endTime ()
 Returns the end time of the packet (Check stamp type).
void setStartTime (LOOG_INT64 inStartTime)
 Sets the start time of the packet (You need to set stamp type appropriately).
void setEndTime (LOOG_INT64 inEndTime)
 Sets the end time of the packet (You need to set stamp type appropriately).
void setTimeStamp (LOOG_INT64 inStartTime, LOOG_INT64 inEndTime, StampedOggPacket::eStampType inStampType)
 Sets the time stamp in one hit.
virtual void merge (const StampedOggPacket *inMorePacket)
 Merges two packets together.
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.

Public Attributes

unsigned short mStampType

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

LOOG_INT64 mStartTime
LOOG_INT64 mEndTime
unsigned long mPacketSize
unsigned char * mPacketData
bool mIsTruncated
bool mIsContinuation

Private Member Functions

StampedOggPacketoperator= (const StampedOggPacket &other)
 StampedOggPacket (const StampedOggPacket &other)

Member Enumeration Documentation

enum StampedOggPacket::eStampType
 

Enumeration values:
NONE 
OGG_END_ONLY 
OGG_BOTH 
DIRECTSHOW 

Definition at line 41 of file StampedOggPacket.h.


Constructor & Destructor Documentation

StampedOggPacket::StampedOggPacket void   ) 
 

Definition at line 35 of file StampedOggPacket.cpp.

Referenced by clone().

StampedOggPacket::StampedOggPacket unsigned char *  inPackData,
unsigned long  inPacketSize,
bool  inIsTruncated,
bool  inIsContinuation,
LOOG_INT64  inStartTime,
LOOG_INT64  inEndTime,
unsigned short  inStampType
 

Definition at line 48 of file StampedOggPacket.cpp.

StampedOggPacket::~StampedOggPacket void   )  [virtual]
 

Definition at line 44 of file StampedOggPacket.cpp.

StampedOggPacket::StampedOggPacket const StampedOggPacket other  )  [private]
 


Member Function Documentation

OggPacket * StampedOggPacket::clone  )  [virtual]
 

Does a deep copy of the packet a returns you a new one you can keep.

Reimplemented from OggPacket.

Definition at line 95 of file StampedOggPacket.cpp.

References mEndTime, mStampType, mStartTime, and StampedOggPacket().

Referenced by OggPacketiser::acceptOggPage(), FLACStream::deliverCodecHeaders(), VorbisStream::InitCodec(), TheoraStream::InitCodec(), SpeexStream::InitCodec(), OggFLAC_1_0_Stream::InitCodec(), FLACStream::InitCodec(), FFDShowVideoStream::InitCodec(), CMMLStream::InitCodec(), OggPacketiser::processPage(), and OggMuxInputPin::Receive().

Here is the call graph for this function:

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

Definition at line 138 of file OggPacket.cpp.

References OggPacket::HEX_DUMP_LINE_LENGTH, and OggPacket::padField().

Referenced by OggPacket::toPackDumpString().

Here is the call graph for this function:

LOOG_INT64 StampedOggPacket::endTime  ) 
 

Returns the end time of the packet (Check stamp type).

Definition at line 109 of file StampedOggPacket.cpp.

References LOOG_INT64.

Referenced by OOOggPacketDumper::acceptStampedOggPacket(), OggPaginator::addPartOfPacketToPage(), OggDemuxSourcePin::deliverOggPacket(), CMMLSourcePin::deliverOggPacket(), TheoraDecoder::simulateOldOggPacket(), and TheoraEncodeInputPin::TransformData().

bool OggPacket::isContinuation  )  const [inherited]
 

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 [inherited]
 

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, inherited]
 

Merges this packet to another one you pass it.

Definition at line 210 of file OggPacket.cpp.

References OggPacket::mIsContinuation, OggPacket::mIsTruncated, OggPacket::mPacketData, and OggPacket::mPacketSize.

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

Merges two packets together.

Definition at line 59 of file StampedOggPacket.cpp.

References mEndTime, OggPacket::mIsTruncated, OggPacket::mPacketData, OggPacket::mPacketSize, and mStampType.

Referenced by OggPacketiser::acceptOggPage(), OggFLAC_1_0_Stream::deliverCodecHeaders(), and FLACStream::deliverCodecHeaders().

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

unsigned char * OggPacket::packetData  )  [inherited]
 

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 [inherited]
 

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, inherited]
 

Definition at line 130 of file OggPacket.cpp.

Referenced by OggPacket::dumpNCharsToString(), and OggPacket::toPackDumpString().

void StampedOggPacket::setEndTime LOOG_INT64  inEndTime  ) 
 

Sets the end time of the packet (You need to set stamp type appropriately).

Definition at line 116 of file StampedOggPacket.cpp.

References mEndTime.

void OggPacket::setIsContinuation bool  inIsContinuation  )  [inherited]
 

Set the continuation flag on this packet.

void OggPacket::setIsTruncated bool  inIsTruncated  )  [inherited]
 

Set the truncated flag on this packet.

void OggPacket::setPacketData unsigned char *  inPacketData  )  [inherited]
 

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 OggPacket::mPacketData.

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

void OggPacket::setPacketSize unsigned long  inPacketSize  )  [inherited]
 

Set the size of this packet.

Definition at line 196 of file OggPacket.cpp.

References OggPacket::mPacketSize.

void StampedOggPacket::setStartTime LOOG_INT64  inStartTime  ) 
 

Sets the start time of the packet (You need to set stamp type appropriately).

Definition at line 113 of file StampedOggPacket.cpp.

References mStartTime.

void StampedOggPacket::setTimeStamp LOOG_INT64  inStartTime,
LOOG_INT64  inEndTime,
StampedOggPacket::eStampType  inStampType
 

Sets the time stamp in one hit.

Definition at line 120 of file StampedOggPacket.cpp.

References mEndTime, mStampType, and mStartTime.

Referenced by OggPacketiser::dispatchStampedOggPacket().

LOOG_INT64 StampedOggPacket::startTime  ) 
 

Returns the start time of the packet. (Check stamp type).

Definition at line 106 of file StampedOggPacket.cpp.

References LOOG_INT64.

Referenced by OOOggPacketDumper::acceptStampedOggPacket(), OggPaginator::addPartOfPacketToPage(), OggDemuxSourcePin::deliverOggPacket(), FFDShowVideoStream::dispatchPacket(), and pageCB().

string OggPacket::toPackDumpString  )  [inherited]
 

Turns the packet into a hex dump string.

NOTE::: ShOuld be reworked.

Definition at line 78 of file OggPacket.cpp.

References OggPacket::dumpNCharsToString(), OggPacket::HEX_DUMP_LINE_LENGTH, OggPacket::mPacketData, and OggPacket::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, inherited]
 

Definition at line 46 of file OggPacket.h.

Referenced by OggPacket::dumpNCharsToString(), and OggPacket::toPackDumpString().

LOOG_INT64 StampedOggPacket::mEndTime [protected]
 

Definition at line 79 of file StampedOggPacket.h.

Referenced by clone(), merge(), setEndTime(), and setTimeStamp().

bool OggPacket::mIsContinuation [protected, inherited]
 

Definition at line 87 of file OggPacket.h.

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

bool OggPacket::mIsTruncated [protected, inherited]
 

Definition at line 86 of file OggPacket.h.

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

unsigned char* OggPacket::mPacketData [protected, inherited]
 

Definition at line 84 of file OggPacket.h.

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

unsigned long OggPacket::mPacketSize [protected, inherited]
 

Definition at line 83 of file OggPacket.h.

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

unsigned short StampedOggPacket::mStampType
 

Definition at line 57 of file StampedOggPacket.h.

Referenced by OggPaginator::addPartOfPacketToPage(), clone(), merge(), and setTimeStamp().

LOOG_INT64 StampedOggPacket::mStartTime [protected]
 

Definition at line 78 of file StampedOggPacket.h.

Referenced by clone(), setStartTime(), and setTimeStamp().


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