[xiph-commits] r8406 - trunk/oggdsf/src/lib/core/directshow/dsfOggDemux

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Wed Dec 15 01:45:51 PST 2004


Author: illiminable
Date: 2004-12-15 01:45:50 -0800 (Wed, 15 Dec 2004)
New Revision: 8406

Modified:
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp
Log:
* Killedmore dead code
* Removed a few warnings

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-12-15 09:39:25 UTC (rev 8405)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-12-15 09:45:50 UTC (rev 8406)
@@ -291,12 +291,12 @@
 		return E_NOTIMPL;
 	}
 }
-STDMETHODIMP OggDemuxSourceFilter::GetCurrentPosition(LONGLONG *pCurrent){
+STDMETHODIMP OggDemuxSourceFilter::GetCurrentPosition(LONGLONG *pCurrent)
+{
+	//TODO::: Implement this properly
+
 	//debugLog<<"GetCurrentPos = NOT_IMPL"<<endl;
 	return E_NOTIMPL;
-	//debugLog <<"GetCurrPos = HARD CODED = 6 secs"<< endl;
-	 *pCurrent = 6 * UNITS;
-	return S_OK;
 }
 STDMETHODIMP OggDemuxSourceFilter::ConvertTimeFormat(LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat){
 	//debugLog<<"ConvertTimeForamt : NOT IMPL"<<endl;
@@ -358,13 +358,11 @@
 
 	return S_OK;
 }
-STDMETHODIMP OggDemuxSourceFilter::GetPositions(LONGLONG *pCurrent, LONGLONG *pStop){
+STDMETHODIMP OggDemuxSourceFilter::GetPositions(LONGLONG *pCurrent, LONGLONG *pStop)
+{
 	//debugLog<<"Getpos : Not IMPL"<<endl;
 	//debugLog<<"GetPos : Current = HARDCODED 2 secs , Stop = "<<mSeekTable->fileDuration()/UNITS <<" secs."<<endl;
 	return E_NOTIMPL;
-	//*pCurrent = 2 * UNITS;
-	//*pStop = mSeekTable->fileDuration();
-	//return S_OK;
 }
 STDMETHODIMP OggDemuxSourceFilter::GetAvailable(LONGLONG *pEarliest, LONGLONG *pLatest){
 	//debugLog<<"****GetAvailable : NOT IMPL"<<endl;
@@ -373,6 +371,7 @@
 		*pEarliest = 0;
 		//debugLog<<"+++++ Duration is "<<mSeekTable->fileDuration()<<endl;
 		*pLatest = mSeekTable->fileDuration();
+		return S_OK;
 	} else {
 		return E_NOTIMPL;
 	}
@@ -413,7 +412,9 @@
 }
 CBasePin* OggDemuxSourceFilter::GetPin(int inPinNo) 
 {
-	if ((inPinNo >= 0) && (inPinNo < mStreamMapper->numStreams())) {
+	//The cast in thesecond condition removes a warning C4018 signed/unsigned mismatch.
+	// Since the first condition would short circuit if inPinNo was < 0, the cast is safe.
+	if ((inPinNo >= 0) && ((unsigned long)inPinNo < mStreamMapper->numStreams())) {
 		return mStreamMapper->getOggStream(inPinNo)->getPin();
 	} else {
 		return NULL;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp	2004-12-15 09:39:25 UTC (rev 8405)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp	2004-12-15 09:45:50 UTC (rev 8406)
@@ -37,16 +37,22 @@
 										StreamHeaders* inHeaderSource, 
 										CMediaType* inMediaType,
 										wstring inPinName,
-										bool inAllowSeek)
-	:	CBaseOutputPin(NAME("Ogg Demux Output Pin"), inParentFilter, inFilterLock, &mFilterHR, inPinName.c_str()),
-		mHeaders(inHeaderSource),
-		mParentFilter(inParentFilter),
-		mMediaType(inMediaType),
-		mDataQueue(NULL),
-		mFirstRun(true),
-		mPartialPacket(NULL)
+										bool inAllowSeek )
+	:	CBaseOutputPin(			NAME("Ogg Demux Output Pin")
+							,	inParentFilter
+							,	inFilterLock
+							,	&mFilterHR
+							,	inPinName.c_str() )
+	,	mHeaders(inHeaderSource)
+	,	mParentFilter(inParentFilter)
+	,	mMediaType(inMediaType)
+	,	mDataQueue(NULL)
+	,	mFirstRun(true)
+	,	mPartialPacket(NULL)
 		
 {
+	//TODO::: Something about this is causing a COM reference leak.
+
 	//debugLog.open("G:\\logs\\sourcefilterpin.log", ios_base::out);
 	IMediaSeeking* locSeeker = NULL;
 	//if (inAllowSeek) {
@@ -84,15 +90,11 @@
 
 	return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv); 
 }
-bool OggDemuxSourcePin::deliverOggPacket(StampedOggPacket* inPacket) {
+bool OggDemuxSourcePin::deliverOggPacket(StampedOggPacket* inPacket) 
+{
 	CAutoLock locStreamLock(mParentFilter->mStreamLock);
 
-	//Hack to try and suport chaining (only for non-seekables)
-	
-	//
 
-
-
 	IMediaSample* locSample = NULL;
 	REFERENCE_TIME locStart = inPacket->startTime();
 	REFERENCE_TIME locStop = inPacket->endTime();



More information about the commits mailing list