MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Public Member Functions | Data Fields | Private Attributes
OGG::Page Class Reference

#include <ogg.h>

Public Member Functions

 Page ()
 
 Page ()
 
 Page (const Page &rhs)
 
 Page (const Page &rhs)
 
unsigned int addSegment (const std::string &content)
 
unsigned int addSegment (const std::string &content)
 
unsigned int addSegment (const char *content, unsigned int length)
 
unsigned int addSegment (const char *content, unsigned int length)
 
long unsigned int calcChecksum ()
 
long unsigned int calcChecksum ()
 
unsigned int calcPayloadSize ()
 
unsigned int calcPayloadSize ()
 
long long unsigned int calculateGranule (oggSegment &currentSegment)
 this calculates the granule position for a DTSC packet More...
 
long long unsigned int calculateGranule (oggSegment &currentSegment)
 
void clear (char HeaderType, long long unsigned int GranPos, long unsigned int BSN, long unsigned int PSN)
 
void clear (char HeaderType, long long unsigned int GranPos, long unsigned int BSN, long unsigned int PSN)
 
const std::deque< std::string > & getAllSegments ()
 
const std::deque< std::string > & getAllSegments ()
 
long unsigned int getBitstreamSerialNumber ()
 
long unsigned int getBitstreamSerialNumber ()
 
long unsigned int getCRCChecksum ()
 
long unsigned int getCRCChecksum ()
 
long long unsigned int getGranulePosition ()
 
long long unsigned int getGranulePosition ()
 
char getHeaderType ()
 
char getHeaderType ()
 
char getPageSegments ()
 
char getPageSegments ()
 
long unsigned int getPageSequenceNumber ()
 
long unsigned int getPageSequenceNumber ()
 
int getPayloadSize ()
 
int getPayloadSize ()
 
bool getSegment (unsigned int index, std::string &ret)
 
bool getSegment (unsigned int index, std::string &ret)
 
const char * getSegment (unsigned int index)
 
const char * getSegment (unsigned int index)
 
unsigned long getSegmentLen (unsigned int index)
 
unsigned long getSegmentLen (unsigned int index)
 
char getVersion ()
 
char getVersion ()
 
void operator= (const Page &rhs)
 
void operator= (const Page &rhs)
 
unsigned int overFlow ()
 
unsigned int overFlow ()
 
bool possiblyContinued ()
 
bool possiblyContinued ()
 
void prepareNext (bool continueMe=false)
 
void prepareNext (bool continueMe=false)
 
bool read (std::string &newData)
 Reads an OGG Page from the source and if valid, removes it from source. More...
 
bool read (std::string &newData)
 
bool read (FILE *inFile)
 
bool read (FILE *inFile)
 
void sendTo (Socket::Connection &destination, int calcGranule=-2)
 
void sendTo (Socket::Connection &destination, int calcGranule=-2)
 
void setBitstreamSerialNumber (long unsigned int newVal)
 
void setBitstreamSerialNumber (long unsigned int newVal)
 
void setCRCChecksum (long unsigned int newVal)
 
void setCRCChecksum (long unsigned int newVal)
 
void setGranulePosition (long long unsigned int newVal)
 
void setGranulePosition (long long unsigned int newVal)
 
void setHeaderType (char newVal)
 
void setHeaderType (char newVal)
 
void setMagicNumber ()
 
void setMagicNumber ()
 
unsigned int setNextSegmentTableEntry (unsigned int entrySize)
 
unsigned int setNextSegmentTableEntry (unsigned int entrySize)
 
void setPageSegments (char newVal)
 
void setPageSegments (char newVal)
 
void setPageSequenceNumber (long unsigned int newVal)
 
void setPageSequenceNumber (long unsigned int newVal)
 
bool setPayload (char *newData, unsigned int length)
 
bool setPayload (char *newData, unsigned int length)
 
void setVersion (char newVal=0)
 
void setVersion (char newVal=0)
 
bool shouldSend ()
 
bool shouldSend ()
 
std::string toPrettyString (size_t indent=0)
 
std::string toPrettyString (size_t indent=0)
 
bool verifyChecksum ()
 
bool verifyChecksum ()
 
void vorbisStuff ()
 
void vorbisStuff ()
 

Data Fields

char blockSize [2]
 
OGG::oggCodec codec
 
unsigned int firstSample
 
unsigned int framesSeen
 
int granules
 
unsigned int lastKeyFrame
 
std::deque< oggSegmentoggSegments
 
unsigned int pageSequenceNumber
 
int prevBlockFlag
 
unsigned int sampleRate
 
unsigned int split
 
long long unsigned int totalFrames
 
std::deque< vorbis::modevorbisModes
 

Private Attributes

char data [282]
 
std::deque< std::string > segments
 

Constructor & Destructor Documentation

OGG::Page::Page ( )
OGG::Page::Page ( const Page rhs)
OGG::Page::Page ( )
OGG::Page::Page ( const Page rhs)

Member Function Documentation

unsigned int OGG::Page::addSegment ( const std::string &  content)
unsigned int OGG::Page::addSegment ( const std::string &  content)
unsigned int OGG::Page::addSegment ( const char *  content,
unsigned int  length 
)
unsigned int OGG::Page::addSegment ( const char *  content,
unsigned int  length 
)
long unsigned int OGG::Page::calcChecksum ( )
long unsigned int OGG::Page::calcChecksum ( )
unsigned int OGG::Page::calcPayloadSize ( )
unsigned int OGG::Page::calcPayloadSize ( )
long long unsigned int OGG::Page::calculateGranule ( oggSegment currentSegment)

this calculates the granule position for a DTSC packet

long long unsigned int OGG::Page::calculateGranule ( oggSegment currentSegment)
void OGG::Page::clear ( char  HeaderType,
long long unsigned int  GranPos,
long unsigned int  BSN,
long unsigned int  PSN 
)
void OGG::Page::clear ( char  HeaderType,
long long unsigned int  GranPos,
long unsigned int  BSN,
long unsigned int  PSN 
)
const std::deque< std::string > & OGG::Page::getAllSegments ( )
const std::deque<std::string>& OGG::Page::getAllSegments ( )
long unsigned int OGG::Page::getBitstreamSerialNumber ( )
long unsigned int OGG::Page::getBitstreamSerialNumber ( )
long unsigned int OGG::Page::getCRCChecksum ( )
long unsigned int OGG::Page::getCRCChecksum ( )
long long unsigned int OGG::Page::getGranulePosition ( )
long long unsigned int OGG::Page::getGranulePosition ( )
char OGG::Page::getHeaderType ( )
char OGG::Page::getHeaderType ( )
char OGG::Page::getPageSegments ( )
char OGG::Page::getPageSegments ( )
long unsigned int OGG::Page::getPageSequenceNumber ( )
long unsigned int OGG::Page::getPageSequenceNumber ( )
int OGG::Page::getPayloadSize ( )
int OGG::Page::getPayloadSize ( )
bool OGG::Page::getSegment ( unsigned int  index,
std::string &  ret 
)
bool OGG::Page::getSegment ( unsigned int  index,
std::string &  ret 
)
const char * OGG::Page::getSegment ( unsigned int  index)
const char* OGG::Page::getSegment ( unsigned int  index)
unsigned long OGG::Page::getSegmentLen ( unsigned int  index)
unsigned long OGG::Page::getSegmentLen ( unsigned int  index)
char OGG::Page::getVersion ( )
char OGG::Page::getVersion ( )
void OGG::Page::operator= ( const Page rhs)
void OGG::Page::operator= ( const Page rhs)
unsigned int OGG::Page::overFlow ( )
unsigned int OGG::Page::overFlow ( )
bool OGG::Page::possiblyContinued ( )
bool OGG::Page::possiblyContinued ( )
void OGG::Page::prepareNext ( bool  continueMe = false)
void OGG::Page::prepareNext ( bool  continueMe = false)
bool OGG::Page::read ( std::string &  newData)

Reads an OGG Page from the source and if valid, removes it from source.

bool OGG::Page::read ( std::string &  newData)
bool OGG::Page::read ( FILE *  inFile)
bool OGG::Page::read ( FILE *  inFile)
void OGG::Page::sendTo ( Socket::Connection destination,
int  calcGranule = -2 
)
Todo:
Rewrite this
void OGG::Page::sendTo ( Socket::Connection destination,
int  calcGranule = -2 
)
void OGG::Page::setBitstreamSerialNumber ( long unsigned int  newVal)
void OGG::Page::setBitstreamSerialNumber ( long unsigned int  newVal)
void OGG::Page::setCRCChecksum ( long unsigned int  newVal)
void OGG::Page::setCRCChecksum ( long unsigned int  newVal)
void OGG::Page::setGranulePosition ( long long unsigned int  newVal)
void OGG::Page::setGranulePosition ( long long unsigned int  newVal)
void OGG::Page::setHeaderType ( char  newVal)
void OGG::Page::setHeaderType ( char  newVal)
void OGG::Page::setMagicNumber ( )
void OGG::Page::setMagicNumber ( )
unsigned int OGG::Page::setNextSegmentTableEntry ( unsigned int  entrySize)
unsigned int OGG::Page::setNextSegmentTableEntry ( unsigned int  entrySize)
void OGG::Page::setPageSegments ( char  newVal)
inline
void OGG::Page::setPageSegments ( char  newVal)
inline
void OGG::Page::setPageSequenceNumber ( long unsigned int  newVal)
void OGG::Page::setPageSequenceNumber ( long unsigned int  newVal)
bool OGG::Page::setPayload ( char *  newData,
unsigned int  length 
)
bool OGG::Page::setPayload ( char *  newData,
unsigned int  length 
)
void OGG::Page::setVersion ( char  newVal = 0)
void OGG::Page::setVersion ( char  newVal = 0)
bool OGG::Page::shouldSend ( )
bool OGG::Page::shouldSend ( )
std::string OGG::Page::toPrettyString ( size_t  indent = 0)
std::string OGG::Page::toPrettyString ( size_t  indent = 0)
bool OGG::Page::verifyChecksum ( )
bool OGG::Page::verifyChecksum ( )
void OGG::Page::vorbisStuff ( )
void OGG::Page::vorbisStuff ( )

Field Documentation

char OGG::Page::blockSize
OGG::oggCodec OGG::Page::codec
char OGG::Page::data
private
unsigned int OGG::Page::firstSample
unsigned int OGG::Page::framesSeen
int OGG::Page::granules
unsigned int OGG::Page::lastKeyFrame
std::deque< oggSegment > OGG::Page::oggSegments
unsigned int OGG::Page::pageSequenceNumber
int OGG::Page::prevBlockFlag
unsigned int OGG::Page::sampleRate
std::deque< std::string > OGG::Page::segments
private
unsigned int OGG::Page::split
long long unsigned int OGG::Page::totalFrames
std::deque< vorbis::mode > OGG::Page::vorbisModes

The documentation for this class was generated from the following files: