[xiph-commits] r10283 - in branches/oggdsf_new_demux:
sln/oggdsf_all src/lib/codecs/vorbis/filters/dsfVorbisDecoder
src/lib/core/directshow/dsfOggDemux2 src/lib/core/ogg/libOOOggSeek
illiminable at svn.xiph.org
illiminable at svn.xiph.org
Mon Oct 24 04:38:17 PDT 2005
Author: illiminable
Date: 2005-10-24 04:38:03 -0700 (Mon, 24 Oct 2005)
New Revision: 10283
Modified:
branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln
branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/IOggDecoder.h
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.h
branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h
Log:
* Implement IOggDecoderSeek on vorbis pin
* Export the new seek table properly from the dll
* Build the seek table in the demuxes load method
Modified: branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln 2005-10-24 11:19:57 UTC (rev 10282)
+++ branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln 2005-10-24 11:38:03 UTC (rev 10283)
@@ -1200,6 +1200,7 @@
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfOggDemux2", "..\..\src\lib\core\directshow\dsfOggDemux2\dsfOggDemux2.vcproj", "{304B710A-7355-471C-A4A8-9E8F6D640E6D}"
ProjectSection(ProjectDependencies) = postProject
{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
+ {9A14F6AC-BC6E-401A-A300-07369BD6C5FE} = {9A14F6AC-BC6E-401A-A300-07369BD6C5FE}
{EA7091BB-9906-41DF-9738-F4858A136086} = {EA7091BB-9906-41DF-9738-F4858A136086}
{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
EndProjectSection
Modified: branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp 2005-10-24 11:19:57 UTC (rev 10282)
+++ branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp 2005-10-24 11:38:03 UTC (rev 10283)
@@ -483,6 +483,12 @@
return -1;
}
}
+
+LOOG_INT64 VorbisDecodeInputPin::mustSeekBefore(LOOG_INT64 inGranule)
+{
+ //TODO::: Get adjustment from block size info... for now, it doesn't matter if no preroll
+ return inGranule;
+}
IOggDecoder::eAcceptHeaderResult VorbisDecodeInputPin::showHeaderPacket(OggPacket* inCodecHeaderPacket)
{
switch (mSetupState) {
Modified: branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h 2005-10-24 11:19:57 UTC (rev 10282)
+++ branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h 2005-10-24 11:38:03 UTC (rev 10283)
@@ -74,6 +74,7 @@
//IOggDecoder Interface
virtual LOOG_INT64 convertGranuleToTime(LOOG_INT64 inGranule);
+ virtual LOOG_INT64 mustSeekBefore(LOOG_INT64 inGranule);
virtual IOggDecoder::eAcceptHeaderResult showHeaderPacket(OggPacket* inCodecHeaderPacket);
virtual string getCodecShortName();
virtual string getCodecIdentString();
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/IOggDecoder.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/IOggDecoder.h 2005-10-24 11:19:57 UTC (rev 10282)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/IOggDecoder.h 2005-10-24 11:38:03 UTC (rev 10283)
@@ -10,9 +10,11 @@
//
#include <libOOOgg/libOOOgg.h>
+#include <libOOOggSeek/IOggDecoderSeek.h>
#include <string>
using namespace std;
class IOggDecoder
+ : public IOggDecoderSeek
{
public:
enum eAcceptHeaderResult {
@@ -24,6 +26,7 @@
};
virtual LOOG_INT64 convertGranuleToTime(LOOG_INT64 inGranule) = 0;
+ virtual LOOG_INT64 mustSeekBefore(LOOG_INT64 inGranule) = 0;
virtual eAcceptHeaderResult showHeaderPacket(OggPacket* inCodecHeaderPacket) = 0;
virtual string getCodecShortName() = 0;
virtual string getCodecIdentString() = 0;
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp 2005-10-24 11:19:57 UTC (rev 10282)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp 2005-10-24 11:38:03 UTC (rev 10283)
@@ -103,6 +103,7 @@
, mSeenPositiveGranulePos(false)
, mPendingPage(NULL)
, mJustReset(true)
+ , mSeekTable(NULL)
{
//Why do we do this, should the base class do it ?
m_pLock = new CCritSec;
@@ -112,11 +113,14 @@
mStreamLock = new CCritSec;
mStreamMapper = new OggStreamMapper(this, m_pLock);
+
+
}
OggDemuxPacketSourceFilter::~OggDemuxPacketSourceFilter(void)
{
delete mStreamMapper;
+ delete mSeekTable;
//TODO::: Delete the locks
}
//IMEdiaStreaming
@@ -383,8 +387,25 @@
//mSeekTable = new AutoOggSeekTable(StringHelper::toNarrowStr(mFileName));
//mSeekTable->buildTable();
//
- return SetUpPins();
+ HRESULT locHR = SetUpPins();
+ if (locHR == S_OK) {
+ mSeekTable = new AutoOggChainGranuleSeekTable(StringHelper::toNarrowStr(mFileName));
+ int locNumPins = GetPinCount();
+
+ OggDemuxPacketSourcePin* locPin = NULL;
+ for (int i = 0; i < locNumPins; i++) {
+ locPin = (OggDemuxPacketSourcePin*)GetPin(i);
+
+
+ mSeekTable->addStream(locPin->getSerialNo(), locPin->getDecoderInterface());
+ }
+ mSeekTable->buildTable();
+ return S_OK;
+ } else {
+ return locHR;
+ }
+
//TODO:::
//return S_OK;
}
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.h 2005-10-24 11:19:57 UTC (rev 10282)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.h 2005-10-24 11:38:03 UTC (rev 10283)
@@ -33,6 +33,8 @@
#include "IFilterDataSource.h"
//#include "OggStreamMapper.h"
#include <libOOOgg/OggDataBuffer.h>
+
+#include <libOOOggSeek/AutoOggChainGranuleSeekTable.h>
#include "DataSourceFactory.h"
class OggStreamMapper;
@@ -135,6 +137,8 @@
IFilterDataSource* mDataSource;
OggStreamMapper* mStreamMapper;
+ AutoOggChainGranuleSeekTable* mSeekTable;
+
bool mJustReset;
};
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 11:19:57 UTC (rev 10282)
+++ branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h 2005-10-24 11:38:03 UTC (rev 10283)
@@ -5,7 +5,7 @@
#include "IOggDecoderSeek.h"
-class AutoOggChainGranuleSeekTable
+class LIBOOOGGSEEK_API AutoOggChainGranuleSeekTable
: public IOggCallback
{
public:
More information about the commits
mailing list