[xiph-commits] r10284 - branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2

illiminable at svn.xiph.org illiminable at svn.xiph.org
Mon Oct 24 04:49:03 PDT 2005


Author: illiminable
Date: 2005-10-24 04:49:00 -0700 (Mon, 24 Oct 2005)
New Revision: 10284

Modified:
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp
Log:
* Move the seek table building to the initialisation of the data thread.
* Can't be in load, since the graph is not built yet

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:38:03 UTC (rev 10283)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp	2005-10-24 11:49:00 UTC (rev 10284)
@@ -390,17 +390,17 @@
 	HRESULT locHR = SetUpPins();
 
 	if (locHR == S_OK) {
-		mSeekTable = new AutoOggChainGranuleSeekTable(StringHelper::toNarrowStr(mFileName));
-		int locNumPins = GetPinCount();
+		//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();
+		//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;
@@ -441,6 +441,19 @@
 {
 	//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...



More information about the commits mailing list