#include <AutoOggSeekTable.h>
Inheritance diagram for AutoOggSeekTable:
Public Types | |
typedef pair< LOOG_INT64, unsigned long > | tSeekPair |
typedef map< LOOG_INT64, unsigned long > | tSeekMap |
Public Member Functions | |
AutoOggSeekTable (string inFileName) | |
Create a new AutoOggSeekTable associated with the filename passed into inFileName. | |
virtual | ~AutoOggSeekTable (void) |
virtual bool | buildTable () |
Builds the actual seek table: only works if we have random access to the file. | |
virtual bool | acceptOggPage (OggPage *inOggPage) |
LOOG_INT64 | fileDuration () |
The duration of the file, in DirectShow time units. | |
unsigned long | serialisedSize () |
Returns the size the seek table will be if serialised. | |
bool | serialiseInto (unsigned char *inBuff, unsigned long inBuffSize) |
Serialise the seek table into a memory buffer, which may be useful for e.g. caching. | |
bool | serialiseInto (const string inSeekTableFilename) |
Serialise the seek table into a file, which may be useful for e.g. caching. | |
virtual bool | buildTableFromBuffer (const unsigned char *inBuffer, const unsigned long inBufferSize) |
Build a seek table from a buffer previously written to with serialiseInto(). | |
virtual bool | buildTableFromFile (const string inCachedSeekTableFilename) |
Build a seek table from a file previously serialised into with serialiseInto(). | |
tSeekMap | getSeekMap () |
Returns a copy of the seek table. | |
bool | addSeekPoint (LOOG_INT64 inTime, unsigned long inStartPos) |
Add a seek point (which consists of a time in DirectShow units, and a byte offset corresponding to that time) to the seek table. | |
tSeekPair | getStartPos (LOOG_INT64 inTime) |
Given a requested seek time in DirectShow units, returns the closest time and byte to the seek time. | |
bool | enabled () |
Returns whether this table is enabled or disabled. | |
Static Public Attributes | |
const LOOG_INT64 | DS_UNITS = 10000000 |
const unsigned long | LINT_MAX = 4294967295UL |
Protected Attributes | |
unsigned long | mFilePos |
unsigned long | mPacketCount |
unsigned long | mSampleRate |
unsigned long | mNumHeaders |
unsigned long | mSerialNoToTrack |
unsigned long | mGranulePosShift |
bool | mLastIsSeekable |
bool | isTheora |
bool | isFLAC |
bool | isOggFLAC_1_0 |
bool | mFoundStreamInfo |
LOOG_INT64 | mLastSeekTime |
LOOG_INT64 | mFileDuration |
fstream | mFile |
string | mFileName |
OggDataBuffer * | mOggDemux |
tSeekMap | mSeekMap |
tSeekMap::value_type | mSeekValue |
LOOG_INT64 | mRealStartPos |
bool | mEnabled |
Private Member Functions | |
AutoOggSeekTable (const AutoOggSeekTable &) | |
AutoOggSeekTable & | operator= (const AutoOggSeekTable &) |
|
Definition at line 49 of file OggSeekTable.h. Referenced by OggSeekTable::getSeekMap(), and main(). |
|
Definition at line 48 of file OggSeekTable.h. Referenced by OggSeekTable::getStartPos(), OggBinarySeeker::getStartPos(), main(), and OggDemuxSourceFilter::SetPositions(). |
|
Create a new AutoOggSeekTable associated with the filename passed into inFileName.
Definition at line 35 of file AutoOggSeekTable.cpp. References false, mFileName, mOggDemux, and OggDataBuffer::registerVirtualCallback(). |
Here is the call graph for this function:
|
Definition at line 59 of file AutoOggSeekTable.cpp. References mFile. |
|
|
|
All callers to acceptOggPage give away their pointer to this function. All methods implementing this interface are responsible for deleting this page. All callers should NULL their pointer immediately after calling to avoid reusing them. Implements IOggCallback. Reimplemented in AutoAnxSeekTable. Definition at line 67 of file AutoOggSeekTable.cpp. References OggSeekTable::addSeekPoint(), iLE_Math::CharArrToInt64(), iBE_Math::charArrToULong(), iLE_Math::charArrToULong(), OggPage::getPacket(), OggPageHeader::GranulePos(), OggPage::header(), OggPageHeader::HeaderFlags(), isFLAC, isOggFLAC_1_0, isTheora, LOOG_INT64, mFileDuration, mFilePos, mFoundStreamInfo, mGranulePosShift, mLastIsSeekable, mLastSeekTime, mNumHeaders, mPacketCount, mSampleRate, mSerialNoToTrack, OggPage::numPackets(), OggPacket::packetData(), OggPage::pageSize(), and OggPageHeader::StreamSerialNo(). Referenced by AutoAnxSeekTable::acceptOggPage(). |
Here is the call graph for this function:
|
Add a seek point (which consists of a time in DirectShow units, and a byte offset corresponding to that time) to the seek table.
Definition at line 52 of file OggSeekTable.cpp. References OggSeekTable::mSeekMap. Referenced by acceptOggPage(), buildTable(), buildTableFromBuffer(), buildTableFromFile(), and main(). |
|
Builds the actual seek table: only works if we have random access to the file.
Definition at line 275 of file AutoOggSeekTable.cpp. References OggSeekTable::addSeekPoint(), OggDataBuffer::feed(), mFile, mFileName, mOggDemux, and mSampleRate. Referenced by OggDemuxSourceFilter::Load(), AnxDemuxSourceFilter::Load(), main(), and AnnodexRecomposer::recomposeStreamFrom(). |
Here is the call graph for this function:
|
Build a seek table from a buffer previously written to with serialiseInto().
Definition at line 304 of file AutoOggSeekTable.cpp. References OggSeekTable::addSeekPoint(), iLE_Math::CharArrToInt64(), iLE_Math::charArrToULong(), and LOOG_INT64. |
Here is the call graph for this function:
|
Build a seek table from a file previously serialised into with serialiseInto(). Note that this method does not do any verification that the file is up-to-date or valid (i.e. if you are using the serialised seek table as a cache, you must check yourself that the cached seek table is not out of date). Definition at line 324 of file AutoOggSeekTable.cpp. References OggSeekTable::addSeekPoint(), iLE_Math::CharArrToInt64(), iLE_Math::charArrToULong(), and LOOG_INT64. Referenced by main(), and AnnodexRecomposer::recomposeStreamFrom(). |
Here is the call graph for this function:
|
Returns whether this table is enabled or disabled.
Definition at line 49 of file OggSeekTable.cpp. Referenced by OggDemuxSourceFilter::GetAvailable(), OggDemuxSourceFilter::GetCapabilities(), OggDemuxSourceFilter::GetDuration(), OggDemuxSourceFilter::GetStopPosition(), and OggDemuxSourceFilter::SetPositions(). |
|
The duration of the file, in DirectShow time units.
Definition at line 270 of file AutoOggSeekTable.cpp. References LOOG_INT64. Referenced by OggDemuxSourceFilter::GetAvailable(), OggDemuxSourceFilter::GetDuration(), OggDemuxSourceFilter::GetStopPosition(), and OggDemuxSourceFilter::SetPositions(). |
|
Returns a copy of the seek table. Note that this method returns a copy of the seek table, not the actual seek table used by the class. So, feel free to corrupt your copy to your heart's leisure. Definition at line 80 of file OggSeekTable.cpp. References OggSeekTable::tSeekMap. Referenced by main(). |
|
Given a requested seek time in DirectShow units, returns the closest time and byte to the seek time. Returns a tSeekPair whose first element is the actual closest possible time that can be seeked to (which will always be either before or at the requested seek position). The second element is the number of bytes into the stream where the first page of the actual seek time occurs. Reimplemented in OggBinarySeeker. Definition at line 67 of file OggSeekTable.cpp. References OggSeekTable::mSeekMap, and OggSeekTable::tSeekPair. Referenced by main(), AnnodexRecomposer::recomposeStreamFrom(), and OggDemuxSourceFilter::SetPositions(). |
|
|
|
Returns the size the seek table will be if serialised.
Definition at line 224 of file AutoOggSeekTable.cpp. Referenced by serialiseInto(). |
|
Serialise the seek table into a file, which may be useful for e.g. caching.
Definition at line 249 of file AutoOggSeekTable.cpp. References serialisedSize(), and serialiseInto(). |
Here is the call graph for this function:
|
Serialise the seek table into a memory buffer, which may be useful for e.g. caching.
Definition at line 230 of file AutoOggSeekTable.cpp. References iLE_Math::Int64ToCharArr(), serialisedSize(), and iLE_Math::ULongToCharArr(). Referenced by main(), AnnodexRecomposer::recomposeStreamFrom(), and serialiseInto(). |
Here is the call graph for this function:
|
Definition at line 63 of file AutoOggSeekTable.h. |
|
Definition at line 100 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 101 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 99 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 64 of file AutoOggSeekTable.h. |
|
Definition at line 69 of file OggSeekTable.h. |
|
Definition at line 105 of file AutoOggSeekTable.h. Referenced by buildTable(), and ~AutoOggSeekTable(). |
|
Definition at line 104 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 106 of file AutoOggSeekTable.h. Referenced by AutoOggSeekTable(), and buildTable(). |
|
Definition at line 91 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 102 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 97 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 98 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 103 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 94 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 108 of file AutoOggSeekTable.h. Referenced by AutoOggSeekTable(), and buildTable(). |
|
Definition at line 92 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |
|
Definition at line 66 of file OggSeekTable.h. |
|
Definition at line 93 of file AutoOggSeekTable.h. Referenced by acceptOggPage(), and buildTable(). |
|
Definition at line 64 of file OggSeekTable.h. Referenced by OggSeekTable::addSeekPoint(), OggSeekTable::getStartPos(), and OggSeekTable::OggSeekTable(). |
|
Definition at line 65 of file OggSeekTable.h. |
|
Definition at line 96 of file AutoOggSeekTable.h. Referenced by acceptOggPage(). |