[xiph-commits] r8051 - in trunk/oggdsf/src/lib/core: directshow/dsfAbstractVideoDecoder directshow/dsfAbstractVideoEncoder directshow/dsfOggMux ogg/libOOOgg

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Mon Oct 18 23:02:00 PDT 2004


Author: illiminable
Date: 2004-10-18 23:01:59 -0700 (Mon, 18 Oct 2004)
New Revision: 8051

Modified:
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeFilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeInputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
Log:
* Abstract video decoder leak free.

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeFilter.cpp	2004-10-18 05:50:14 UTC (rev 8050)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeFilter.cpp	2004-10-19 06:01:59 UTC (rev 8051)
@@ -37,7 +37,7 @@
 		mVideoFormat(inVideoFormat)
 {
 	//debugLog.open("G:\\logs\\avdFitler.log", ios_base::out);
-	m_pLock = new CCritSec;
+	m_pLock = new CCritSec;			//Deleted in destructor
 	
 }
 

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeInputPin.cpp	2004-10-18 05:50:14 UTC (rev 8050)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeInputPin.cpp	2004-10-19 06:01:59 UTC (rev 8051)
@@ -52,7 +52,7 @@
 {
 	//debugLog.open("G:\\logs\\avdInputPin.log", ios_base::out);
 	//ConstructCodec();
-	mStreamLock = new CCritSec;
+	mStreamLock = new CCritSec;				//Deleted in destructor
 	mAcceptableMediaType = inAcceptMediaType;
 
 	//IMediaSeeking* locSeeker = NULL;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp	2004-10-18 05:50:14 UTC (rev 8050)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp	2004-10-19 06:01:59 UTC (rev 8051)
@@ -294,7 +294,7 @@
 	//
 	//This may cause issue if pins are disconnected and reconnected
 	//DELETE in DEStructor
-	mDataQueue = new COutputQueue (inReceivePin, &locHR, FALSE, TRUE, 1, TRUE, 15);
+	mDataQueue = new COutputQueue (inReceivePin, &locHR, FALSE, TRUE, 1, TRUE, 15);			//deleted in destructor
 	if (FAILED(locHR)) {
 		//debugLog<<"Creating Output Q failed."<<endl;
 		locHR = locHR;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp	2004-10-18 05:50:14 UTC (rev 8050)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp	2004-10-19 06:01:59 UTC (rev 8051)
@@ -102,7 +102,10 @@
 		//debugLog << "Failed to get pointer... bailing out"<<endl;
 		return locHR;
 	} else {
-		
+		__int64 locTimeStart;
+		__int64 locTimeEnd;
+		inSample->GetTime(&locTimeStart, &locTimeEnd);
+		inSample->GetMediaTime(&locTimeStart, &locTimeEnd);
 		long locResult = encodeData(locBuff, inSample->GetActualDataLength());
 		if (locResult >= 0) {
 			//debugLog << "Encode Data returns 0... OK"<<endl;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2004-10-18 05:50:14 UTC (rev 8050)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2004-10-19 06:01:59 UTC (rev 8051)
@@ -39,6 +39,8 @@
 	,	mNeedsFLACHeaderCount(false)
 
 {
+
+	
 	OggPaginatorSettings* locSettings = new OggPaginatorSettings;
 	locSettings->mMinPageSize = 4096;
 	locSettings->mMaxPageSize = 8192;
@@ -47,7 +49,13 @@
 	QueryPerformanceCounter(&locTicks);
 	srand((unsigned int)locTicks.LowPart);
 	locSettings->mSerialNo = ((unsigned long)(rand() + 1)) * ((unsigned long)(rand() + 1));
+	//string x = "G:\\logs\\muxinput_";
+	//char* ser = new char[10];
+	//itoa(locSettings->mSerialNo, ser, 10);
+	//x = x + ser;
+	//x = x +".log";
 
+	//debugLog.open(x.c_str(), ios_base::out);
 	//locSettings->mSerialNo = 13130;
 	
 	mPaginator.setParameters(locSettings);
@@ -81,6 +89,7 @@
 		
 		sTheoraFormatBlock* locTheora = (sTheoraFormatBlock*)inMediaType->pbFormat;
 		//debugLog<<"Theo sample rate = "<<locTheora->frameRateNumerator<<" / "<<locTheora->frameRateDenominator<<endl;
+		//debugLog<<"Theo KFI = "<<locTheora->maxKeyframeInterval<<endl;
 		mMuxStream->setConversionParams(locTheora->frameRateNumerator, locTheora->frameRateDenominator, 10000000, locTheora->maxKeyframeInterval);
 		mPaginator.setNumHeaders(3);
 	} else if (inMediaType->majortype == MEDIATYPE_Audio) {
@@ -247,6 +256,9 @@
 	}
 
 	return S_OK;
+	 
+
+
 }
 
 HRESULT OggMuxInputPin::CompleteConnect(IPin* inReceivePin) {

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp	2004-10-18 05:50:14 UTC (rev 8050)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp	2004-10-19 06:01:59 UTC (rev 8051)
@@ -121,7 +121,14 @@
 				} else {
 					__int64 locCurrLowTime = locLowestStream->scaledFrontTime();
 					__int64 locTestLowTime = mInputStreams[i]->scaledFrontTime();
-					//debugLog<<"writeLowest : Curr = "<<locCurrLowTime<<" -- Test["<<i<<"] = "<<locTestLowTime<<endl;
+
+					//__int64 locCurrLowTimeUNS = locLowestStream->frontTime();
+					//__int64 locTestLowTimeUNS = mInputStreams[i]->frontTime();
+
+
+					//debugLog<<"writeLowest Scaled : Curr = "<<locCurrLowTime<<" -- Test["<<i<<"] = "<<locTestLowTime<<endl;
+					//debugLog<<"writeLowest UNSCAL : Curr = "<<locCurrLowTimeUNS<<" -- Test["<<i<<"] = "<<locTestLowTimeUNS<<endl;
+
 					
 					//In english this means... any bos pages go first... then any no gran pos pages (-1 gran pos).. then
 					// whoevers got the lowest time.



More information about the commits mailing list