[xiph-commits] r8676 - in trunk/oggdsf/src/lib/core/directshow: dsfAnxMux dsfOggMux

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sat Jan 8 07:50:15 PST 2005


Author: illiminable
Date: 2005-01-08 07:50:14 -0800 (Sat, 08 Jan 2005)
New Revision: 8676

Modified:
   trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxPacketMaker.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxPageInterleaver.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/FishSkeleton.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/dsfOggMux.vcproj
Log:
* Fixed some more wanrings
* Fixed a COM interface leak on the input to the muxer which had a cascading effect causing the entire graph to leak.

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxPacketMaker.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxPacketMaker.cpp	2005-01-08 14:22:26 UTC (rev 8675)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxPacketMaker.cpp	2005-01-08 15:50:14 UTC (rev 8676)
@@ -125,9 +125,9 @@
 			//THere has to be a content type field.
 
 			locPacketSize = 28;  //Base header size
-			for (int i = 0; i < inMessageHeaders.size(); i++) {
+			for (size_t i = 0; i < inMessageHeaders.size(); i++) {
 				//2 is the crlf
-				locPacketSize += inMessageHeaders[i].size() + 2;
+				locPacketSize += (unsigned long)(inMessageHeaders[i].size() + 2);
 			}
 
 			//terminating crlf
@@ -148,9 +148,9 @@
 			iLE_Math::Int64ToCharArr(inGranuleRateDenom, locBuff + 16);
 			iLE_Math::ULongToCharArr(inNumSecHeaders, locBuff + 24);
 			locUpto = 28;
-			for (int i = 0; i < inMessageHeaders.size(); i++) {
+			for (size_t i = 0; i < inMessageHeaders.size(); i++) {
 				memcpy((void*)(locBuff + locUpto), (const void*)(inMessageHeaders[i].c_str()), inMessageHeaders[i].size());
-				locUpto += inMessageHeaders[i].size();
+				locUpto += (unsigned long)(inMessageHeaders[i].size());
 				//TODO::: How terminated ??
 				locBuff[locUpto++] = '\r';	
 				locBuff[locUpto++] = '\n';

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxPageInterleaver.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxPageInterleaver.cpp	2005-01-08 14:22:26 UTC (rev 8675)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxPageInterleaver.cpp	2005-01-08 15:50:14 UTC (rev 8676)
@@ -76,7 +76,7 @@
 
 void AnxPageInterleaver::addAllAnxData_2_0_BOS() {
 	OggPage* locOggPage = NULL;
-	for (int i = 0; i < mInputStreams.size() - 1; i++) {
+	for (size_t i = 0; i < mInputStreams.size() - 1; i++) {
 		locOggPage = mInputStreams[i]->popFront();
 		mBytesWritten += locOggPage->pageSize();
 		mFileWriter->acceptOggPage(locOggPage);
@@ -103,7 +103,7 @@
 
 	bool locWasAny = false;
 	bool locIsOK = true;
-	for (int i = 0; i < mInputStreams.size(); i++) {
+	for (size_t i = 0; i < mInputStreams.size(); i++) {
 		if (mInputStreams[i]->isActive()) {
 			
 			//if ((mInputStreams[i]->peekFront() != NULL) || (!mInputStreams[i]->isActive())) {

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/FishSkeleton.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/FishSkeleton.cpp	2005-01-08 14:22:26 UTC (rev 8675)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/FishSkeleton.cpp	2005-01-08 15:50:14 UTC (rev 8676)
@@ -42,14 +42,14 @@
 FishSkeleton::~FishSkeleton(void)
 {
 }
-OggPage* FishSkeleton::makeFishHeadBOS_3_0	(			unsigned long inSerialNo
-														,	unsigned short inVersionMajor
-														,	unsigned short inVersionMinor
-														,	unsigned __int64 inTimebaseNum
-														,	unsigned __int64 inTimebaseDenom
-														,	const unsigned char* inUTC
+OggPage* FishSkeleton::makeFishHeadBOS_3_0	(		unsigned long inSerialNo
+												,	unsigned short inVersionMajor
+												,	unsigned short inVersionMinor
+												,	unsigned __int64 inTimebaseNum
+												,	unsigned __int64 inTimebaseDenom
+												,	const unsigned char* inUTC
 														
-													)
+											)
 {
 	unsigned char* locBuff = NULL;
 	StampedOggPacket* locPack = NULL;
@@ -105,11 +105,12 @@
 	}
 }
 
-	static StampedOggPacket* makeFishBone_3_0	(	unsigned __int64 inGranuleRateNum
-												,	unsigned __int64 inGranuleDenom
-												,	unsigned long inNumSecHeaders
-												,	unsigned short inGranuleShift
-												,	vector<string> inMessageHeaders
-												) {
-
-	}
\ No newline at end of file
+StampedOggPacket* FishSkeleton::makeFishBone_3_0	(		unsigned __int64 inGranuleRateNum
+														,	unsigned __int64 inGranuleDenom
+														,	unsigned long inNumSecHeaders
+														,	unsigned short inGranuleShift
+														,	vector<string> inMessageHeaders
+													) 
+{
+	return NULL;
+}
\ No newline at end of file

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp	2005-01-08 14:22:26 UTC (rev 8675)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp	2005-01-08 15:50:14 UTC (rev 8676)
@@ -242,7 +242,7 @@
 }
 CBasePin* OggMuxFilter::GetPin(int inPinNo) {
 
-	if ((inPinNo < mInputPins.size()) && (inPinNo >= 0)) {
+	if ((inPinNo >= 0) && ((size_t)inPinNo < mInputPins.size()) ) {
 		return mInputPins[inPinNo];
 	} else {
 		return NULL;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2005-01-08 14:22:26 UTC (rev 8675)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2005-01-08 15:50:14 UTC (rev 8676)
@@ -254,10 +254,10 @@
 		
 		//delete locPacket;		//Don't delete the splitter will delete when it's done.
 
-		for (int i = 0; i < locFLACSplitter->numHeaders(); i++) {
+		for (unsigned long i = 0; i < locFLACSplitter->numHeaders(); i++) {
 			//debugLog<<"Giving pager, packet "<<i<<endl;
 			//debugLog<<locFLACSplitter->getHeader(i)->toPackDumpString()<<endl;		//This is a leak !!
-			if (i==0) {
+			if (i == 0) {
 				//Set the number of headers in the paginator for FLAC classic.
 				StampedOggPacket* locHeadPack = locFLACSplitter->getHeader(i);
 				mPaginator.setNumHeaders((locHeadPack->packetData()[8]) + 1);
@@ -293,7 +293,21 @@
 	
 	mMuxStream->setIsActive(true);
 	return mParentFilter->addAnotherPin();
+
+
 }
+
+HRESULT OggMuxInputPin::BreakConnect() 
+{
+	CAutoLock locLock(m_pLock);
+	//Release the seeking delegate
+	ReleaseDelegate();
+	return CBaseInputPin::BreakConnect();
+}
+
+
+
+
 STDMETHODIMP OggMuxInputPin::EndOfStream(void) {
 	
 	mPaginator.finishStream();

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2005-01-08 14:22:26 UTC (rev 8675)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2005-01-08 15:50:14 UTC (rev 8676)
@@ -50,29 +50,18 @@
 	OggMuxInputPin(OggMuxFilter* inParentFilter, CCritSec* inFilterLock, HRESULT* inHR, OggMuxStream* inMuxStream);
 	virtual ~OggMuxInputPin(void);
 
-
 	//COM Setup
 	DECLARE_IUNKNOWN
 	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
 
 	virtual HRESULT GetMediaType(int inPosition, CMediaType* outMediaType);
 	virtual HRESULT CheckMediaType(const CMediaType* inMediaType);
-	//virtual HRESULT DecideBufferSize(IMemAllocator* inoutAllocator, ALLOCATOR_PROPERTIES* inoutInputRequest);
 	virtual HRESULT SetMediaType(const CMediaType* inMediaType);
 
-
-
-	//IOggCallback
-	//virtual bool acceptOggPage(OggPage* inOggPage);
-
-
 	STDMETHODIMP Receive(IMediaSample* inSample);
-	//IPin
-	//virtual HRESULT CompleteConnect (IPin *inReceivePin);
-	//virtual HRESULT DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
 	virtual STDMETHODIMP EndOfStream(void);
 	virtual HRESULT CompleteConnect(IPin* inReceivePin);
-
+	virtual HRESULT BreakConnect();
 	
 	//virtual HRESULT DeliverEndFlush(void);
 	//virtual HRESULT DeliverBeginFlush(void);

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/dsfOggMux.vcproj
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/dsfOggMux.vcproj	2005-01-08 14:22:26 UTC (rev 8675)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/dsfOggMux.vcproj	2005-01-08 15:50:14 UTC (rev 8676)
@@ -28,7 +28,8 @@
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="TRUE"
 				DebugInformationFormat="4"
-				CallingConvention="2"/>
+				CallingConvention="2"
+				DisableSpecificWarnings="4275"/>
 			<Tool
 				Name="VCCustomBuildTool"/>
 			<Tool
@@ -89,7 +90,8 @@
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="TRUE"
 				DebugInformationFormat="0"
-				CallingConvention="2"/>
+				CallingConvention="2"
+				DisableSpecificWarnings="4275"/>
 			<Tool
 				Name="VCCustomBuildTool"/>
 			<Tool
@@ -153,7 +155,8 @@
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="TRUE"
 				DebugInformationFormat="0"
-				CallingConvention="2"/>
+				CallingConvention="2"
+				DisableSpecificWarnings="4275"/>
 			<Tool
 				Name="VCCustomBuildTool"/>
 			<Tool
@@ -217,7 +220,8 @@
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="TRUE"
 				DebugInformationFormat="0"
-				CallingConvention="2"/>
+				CallingConvention="2"
+				DisableSpecificWarnings="4275"/>
 			<Tool
 				Name="VCCustomBuildTool"/>
 			<Tool



More information about the commits mailing list