[xiph-commits] r10289 -
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2
illiminable at svn.xiph.org
illiminable at svn.xiph.org
Mon Oct 24 08:27:44 PDT 2005
Author: illiminable
Date: 2005-10-24 08:27:38 -0700 (Mon, 24 Oct 2005)
New Revision: 10289
Modified:
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/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.cpp
Log:
* Move the seek tbale build again, otherwise we can't figure out the duration until we start playing
* Seek table build is now done when all output pins are connected
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 14:52:35 UTC (rev 10288)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp 2005-10-24 15:27:38 UTC (rev 10289)
@@ -437,23 +437,31 @@
}
return S_OK;
}
+
+void OggDemuxPacketSourceFilter::notifyPinConnected()
+{
+ if (mStreamMapper->allStreamsReady()) {
+ //Setup the seek table.
+ if (mSeekTable == NULL) {
+ 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();
+ }
+ }
+}
HRESULT OggDemuxPacketSourceFilter::DataProcessLoop()
{
//Mess with the locking mechanisms at your own risk.
- if (mSeekTable == NULL) {
- 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();
- }
//debugLog<<"Starting DataProcessLoop :"<<endl;
DWORD locCommand = 0;
char* locBuff = new char[4096]; //Deleted before function returns...
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 14:52:35 UTC (rev 10288)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.h 2005-10-24 15:27:38 UTC (rev 10289)
@@ -110,6 +110,8 @@
void removeMatchingBufferedPages(unsigned long inSerialNo);
CCritSec* streamLock() { return mStreamLock; }
+
+ virtual void notifyPinConnected();
protected:
static const unsigned long SETUP_BUFFER_SIZE = 24;
virtual HRESULT SetUpPins();
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.cpp 2005-10-24 14:52:35 UTC (rev 10288)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.cpp 2005-10-24 15:27:38 UTC (rev 10289)
@@ -199,6 +199,7 @@
if (mIsStreamReady) {
HRESULT locHR = CBaseOutputPin::CompleteConnect(inReceivePin);
if (locHR == S_OK) {
+ ((OggDemuxPacketSourceFilter*)m_pFilter)->notifyPinConnected();
mDataQueue = new COutputQueue (inReceivePin, &mFilterHR, FALSE, TRUE,1,TRUE, mNumBuffers);
return S_OK;
} else {
More information about the commits
mailing list