[xiph-commits] r10290 -
branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek
illiminable at svn.xiph.org
illiminable at svn.xiph.org
Mon Oct 24 08:32:25 PDT 2005
Author: illiminable
Date: 2005-10-24 08:32:21 -0700 (Mon, 24 Oct 2005)
New Revision: 10290
Modified:
branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.cpp
branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h
Log:
* Determine duration of longest stream from seek table
Modified: branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.cpp 2005-10-24 15:27:38 UTC (rev 10289)
+++ branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.cpp 2005-10-24 15:32:21 UTC (rev 10290)
@@ -5,6 +5,7 @@
: mFilename(inFilename)
, mFilePos(0)
, mOggDemux(NULL)
+ , mDuration(0)
{
mOggDemux = new OggDataBuffer;
mOggDemux->registerVirtualCallback(this);
@@ -76,7 +77,10 @@
return retEarliestPos;
}
+LOOG_INT64 AutoOggChainGranuleSeekTable::fileDuration()
+{
+}
bool AutoOggChainGranuleSeekTable::acceptOggPage(OggPage* inOggPage)
{
LOOG_INT64 locGranule = inOggPage->header()->GranulePos();
@@ -91,6 +95,9 @@
locRealTime = locMapping.mSeekInterface->convertGranuleToTime(locGranule);
if (locRealTime >= 0) {
locMapping.mSeekTable->addSeekPoint(locRealTime, mFilePos, locGranule);
+ if (locRealTime > mDuration) {
+ mDuration = locRealTime;
+ }
}
}
}
Modified: branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h 2005-10-24 15:27:38 UTC (rev 10289)
+++ branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h 2005-10-24 15:32:21 UTC (rev 10290)
@@ -34,6 +34,7 @@
vector<sStreamMapping> mStreamMaps;
+ LOOG_INT64 mDuration;
sStreamMapping getMapping(unsigned long inSerialNo);
fstream mFile;
string mFilename;
More information about the commits
mailing list