[xiph-commits] r7776 - in trunk/oggdsf/src/lib: codecs/theora/filters/dsfTheoraDecoder core/directshow/dsfAbstractAudioDecoder core/directshow/dsfAbstractVideoDecoder core/directshow/dsfOggDemux

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Fri Sep 17 10:45:02 PDT 2004


Author: illiminable
Date: 2004-09-17 10:45:02 -0700 (Fri, 17 Sep 2004)
New Revision: 7776

Modified:
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeFilter.h
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.h
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.h
Log:
* Sync checkin before i test my hypothesis that in order to make WMP9&10 work you must learn to ignore the directshow specs.
* Implemented a few more of the seeking functions like getrate and getpreroll.
* Removed the IMediaSeeking interface from the last of the fitlers.
* Implemented the uality control notifiction (to do nothing.. so it doesn't keep triggering assertions in the debug build)

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp	2004-09-17 17:45:02 UTC (rev 7776)
@@ -52,7 +52,7 @@
 		return NOERROR;
 	}
 
-	return CTransformInputPin::NonDelegatingQueryInterface(riid, ppv); 
+	return CBaseInputPin::NonDelegatingQueryInterface(riid, ppv); 
 }
 
 HRESULT TheoraDecodeInputPin::BreakConnect() {

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp	2004-09-17 17:45:02 UTC (rev 7776)
@@ -51,9 +51,11 @@
 		((IUnknown*)*ppv)->AddRef();
 		
 		return NOERROR;
+	} else if (riid == IID_IMediaPosition) {
+		debugLog<<"Asking for OLD SEEKER"<<endl;
 	}
-
-	return CTransformOutputPin::NonDelegatingQueryInterface(riid, ppv); 
+	debugLog<<"Trying base output pin"<<endl;
+	return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv); 
 }
 
 HRESULT TheoraDecodeOutputPin::BreakConnect() {
@@ -76,6 +78,10 @@
 	SetDelegate(locSeeker);
 	return CTransformOutputPin::CompleteConnect(inReceivePin);
 }
+
+STDMETHODIMP TheoraDecodeOutputPin::Notify(IBaseFilter* inMessageSource, Quality inQuality) {
+	return E_NOTIMPL;
+}
 //----------------------
 //OLD IMPLEMENTATION
 //----------------------

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h	2004-09-17 17:45:02 UTC (rev 7776)
@@ -52,6 +52,9 @@
 	virtual HRESULT BreakConnect();
 	virtual HRESULT CompleteConnect (IPin *inReceivePin);
 
+	//Quality control
+	virtual STDMETHODIMP Notify(IBaseFilter* inMessageSource, Quality inQuality);
+
 	fstream debugLog;
 };
 //----------------------

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeFilter.h	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeFilter.h	2004-09-17 17:45:02 UTC (rev 7776)
@@ -43,7 +43,7 @@
 class ABS_AUDIO_DEC_API AbstractAudioDecodeFilter
 	//Parent Classes
 	:	public CBaseFilter
-	,	public BasicSeekable
+	//,	public BasicSeekable
 {
 public:
 	//Friends

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.h	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.h	2004-09-17 17:45:02 UTC (rev 7776)
@@ -70,6 +70,8 @@
 	virtual HRESULT DeliverEndFlush(void);
 	virtual HRESULT DeliverBeginFlush(void);
 
+
+
 	COutputQueue* mDataQueue;
 protected:
 	HRESULT mHR;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-09-17 17:45:02 UTC (rev 7776)
@@ -114,7 +114,7 @@
 	mDemuxLock = new CCritSec;
 	mStreamLock = new CCritSec;
 	mStreamMapper = new OggStreamMapper(this);
-	//debugLog.open("g:\\logs\\sourcelog.log", ios_base::out);
+	debugLog.open("g:\\logs\\sourcelog.log", ios_base::out);
 	//debugLog << "**************** Starting LOg ********************"<<endl;
 
 }
@@ -210,17 +210,18 @@
 
 STDMETHODIMP OggDemuxSourceFilter::GetCapabilities(DWORD* inCapabilities) {
 	if (mSeekTable->enabled())  {
-		//debugLog<<"GetCaps "<<mSeekingCap<<endl;
+		debugLog<<"GetCaps "<<mSeekingCap<<endl;
 		*inCapabilities = mSeekingCap;
 		return S_OK;
 	} else {
+		
 		*inCapabilities = 0;
 		return S_OK;;
 	}
 }
 STDMETHODIMP OggDemuxSourceFilter::GetDuration(LONGLONG* outDuration) {
 	if (mSeekTable->enabled())  {
-		//debugLog<<"GetDuration = " << mSeekTable->fileDuration()<<" ds units"<<endl;
+		debugLog<<"GetDuration = " << mSeekTable->fileDuration()<<" ds units"<<endl;
 		*outDuration = mSeekTable->fileDuration();
 		return S_OK;
 	} else {
@@ -234,28 +235,28 @@
 
 	 
 STDMETHODIMP OggDemuxSourceFilter::CheckCapabilities(DWORD *pCapabilities){
-	//debugLog<<"CheckCaps	: Not imp"<<endl;
+	debugLog<<"CheckCaps	: Not imp"<<endl;
 	return E_NOTIMPL;
 }
 STDMETHODIMP OggDemuxSourceFilter::IsFormatSupported(const GUID *pFormat){
 	ASSERT(pFormat != NULL);
 	if (*pFormat == TIME_FORMAT_MEDIA_TIME) {
-		//debugLog<<"IsFormatSupported	: TRUE"<<endl;
+		debugLog<<"IsFormatSupported	: TRUE"<<endl;
 		return S_OK;
 	} else {
-		//debugLog<<"IsFormatSupported	: FALSE !!!"<<endl;
+		debugLog<<"IsFormatSupported	: FALSE !!!"<<endl;
 		return S_FALSE;
 	}
 	
 	
 }
 STDMETHODIMP OggDemuxSourceFilter::QueryPreferredFormat(GUID *pFormat){
-	//debugLog<<"QueryPrefferedTimeFormat	: MEDIA TIME"<<endl;
+	debugLog<<"QueryPrefferedTimeFormat	: MEDIA TIME"<<endl;
 	*pFormat = TIME_FORMAT_MEDIA_TIME;
 	return S_OK;
 }
 STDMETHODIMP OggDemuxSourceFilter::SetTimeFormat(const GUID *pFormat){
-	//debugLog<<"SetTimeForamt : NOT IMPL"<<endl;
+	debugLog<<"SetTimeForamt : NOT IMPL"<<endl;
 	return E_NOTIMPL;
 }
 STDMETHODIMP OggDemuxSourceFilter::GetTimeFormat( GUID *pFormat){
@@ -265,7 +266,7 @@
 STDMETHODIMP OggDemuxSourceFilter::GetStopPosition(LONGLONG *pStop){
 	if (mSeekTable->enabled())  {
 
-		//debugLog<<"GetStopPos = " << mSeekTable->fileDuration()<<" ds units"<<endl;
+		debugLog<<"GetStopPos = " << mSeekTable->fileDuration()<<" ds units"<<endl;
 		*pStop = mSeekTable->fileDuration();
 		return S_OK;
 	} else {
@@ -273,22 +274,22 @@
 	}
 }
 STDMETHODIMP OggDemuxSourceFilter::GetCurrentPosition(LONGLONG *pCurrent){
-
-	//debugLog <<"GetCurrPos = HARD CODED = 6 secs"<< 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;
+	debugLog<<"ConvertTimeForamt : NOT IMPL"<<endl;
 	return E_NOTIMPL;
 }
 STDMETHODIMP OggDemuxSourceFilter::SetPositions(LONGLONG *pCurrent,DWORD dwCurrentFlags,LONGLONG *pStop,DWORD dwStopFlags){
 
 
 	CAutoLock locLock(m_pLock);
-	//debugLog<<"Set Positions"<<endl;
+	debugLog<<"Set Positions"<<endl;
 	if (mSeekTable->enabled())  {
-		//debugLog<<"SetPos : Current = "<<*pCurrent<<" Flags = "<<dwCurrentFlags<<" Stop = "<<*pStop<<" dwStopFlags = "<<dwStopFlags<<endl;
+		debugLog<<"SetPos : Current = "<<*pCurrent<<" Flags = "<<dwCurrentFlags<<" Stop = "<<*pStop<<" dwStopFlags = "<<dwStopFlags<<endl;
 		//debugLog<<"       : Delivering begin flush..."<<endl;
 
 	
@@ -298,7 +299,7 @@
 		
 			DeliverBeginFlush();
 		
-		//debugLog<<"       : Begin flush Delviered."<<endl;
+		debugLog<<"       : Begin flush Delviered."<<endl;
 
 		//Find the byte position for this time.
 		unsigned long locStartPos = mSeekTable->getStartPos(*pCurrent);
@@ -316,7 +317,7 @@
 		*pCurrent	= mSeekTimeBase 
 					= mSeekTable->getRealStartPos();
 
-		//debugLog<<"Corrected pCurrent : "<<mSeekTimeBase<<endl;
+		debugLog<<"Corrected pCurrent : "<<mSeekTimeBase<<endl;
 		for (unsigned long i = 0; i < mStreamMapper->numStreams(); i++) {
 			mStreamMapper->getOggStream(i)->setSendExcess(locSendExcess);		//Not needed
 			mStreamMapper->getOggStream(i)->setLastEndGranPos(*pCurrent);
@@ -335,7 +336,7 @@
 
 	
 	
-		//debugLog<<"       : Seek complete."<<endl;
+		debugLog<<"       : Seek complete."<<endl;
 		//debugLog<<"       : Notifying whether to send excess... ";
 		if (locSendExcess) {
 			//debugLog<<"YES"<<endl;
@@ -348,6 +349,7 @@
 		//	mStreamMapper->getOggStream(i)->setLastEndGranPos(mSeekTable->getRealStartPos());
 		//}
 	} else {
+		debugLog<<"Seek not IMPL"<<endl;
 		return E_NOTIMPL;
 	}
 	
@@ -368,39 +370,41 @@
 	return S_OK;
 }
 STDMETHODIMP OggDemuxSourceFilter::GetPositions(LONGLONG *pCurrent, LONGLONG *pStop){
-	//debugLog<<"GetPos : Current = HARDCODED 2 secs , Stop = "<<mSeekTable->fileDuration()/UNITS <<" secs."<<endl;
+	debugLog<<"GetPos : Current = HARDCODED 2 secs , Stop = "<<mSeekTable->fileDuration()/UNITS <<" secs."<<endl;
 	*pCurrent = 2 * UNITS;
 	*pStop = mSeekTable->fileDuration();
 	return S_OK;
 }
 STDMETHODIMP OggDemuxSourceFilter::GetAvailable(LONGLONG *pEarliest, LONGLONG *pLatest){
-	//debugLog<<"GetAvailable : NOT IMPL"<<endl;
+	debugLog<<"****GetAvailable : NOT IMPL"<<endl;
 	return E_NOTIMPL;
 }
 STDMETHODIMP OggDemuxSourceFilter::SetRate(double dRate){
+	debugLog<<"Set RATE : NOT IMPL"<<endl;
 	return E_NOTIMPL;
 	//debugLog<<"SetRate : "<<dRate<<endl;
 	return S_OK;;
 }
 STDMETHODIMP OggDemuxSourceFilter::GetRate(double *dRate){
-	
-	return E_NOTIMPL;
-	//debugLog <<"GetRate : Hard coded to 1.0"<<endl;
+	//debugLog<<"Get RATE : Not IMPL"<<endl;
+	//return E_NOTIMPL;
+	debugLog <<"GetRate : Hard coded to 1.0"<<endl;
 	*dRate = 1.0;
 	return S_OK;;
 }
 STDMETHODIMP OggDemuxSourceFilter::GetPreroll(LONGLONG *pllPreroll){
-	return E_NOTIMPL;
+	//debugLog<<"Get Preroll : NOT IMPL"<<endl;
+	//return E_NOTIMPL;
 	*pllPreroll = 0;
-	//debugLog<<"GetPreroll : HARD CODED TO 0"<<endl;
+	debugLog<<"GetPreroll : HARD CODED TO 0"<<endl;
 	return S_OK;
 }
 STDMETHODIMP OggDemuxSourceFilter::IsUsingTimeFormat(const GUID *pFormat){
 	if (*pFormat == TIME_FORMAT_MEDIA_TIME) {
-		//debugLog<<"IsUsingTimeFormat : MEDIA TIME TRUE"<<endl;
+		debugLog<<"IsUsingTimeFormat : MEDIA TIME TRUE"<<endl;
 		return S_OK;
 	} else {
-		//debugLog<<"IsUsingTimeFormat : MEDIA TIME FALSE !!!!"<<endl;
+		debugLog<<"IsUsingTimeFormat : MEDIA TIME FALSE !!!!"<<endl;
 		return S_FALSE;
 	}
 	

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h	2004-09-17 17:45:02 UTC (rev 7776)
@@ -196,7 +196,7 @@
 	OggStreamMapper* mStreamMapper;
 
 	//DEBUG
-	//fstream debugLog;
+	fstream debugLog;
 
 	
 };

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp	2004-09-17 17:45:02 UTC (rev 7776)
@@ -47,10 +47,10 @@
 		mPartialPacket(NULL)
 		
 {
-	//debugLog.open("C:\\sourcefilterpin.log", ios_base::out);
+	debugLog.open("G:\\logs\\sourcefilterpin.log", ios_base::out);
 	IMediaSeeking* locSeeker = NULL;
 	if (inAllowSeek) {
-
+		debugLog<<"Allowing seek"<<endl;
 		//Subvert COM and do this directly... this way, the source filter won't expose the interface to the
 		// graph but we can still delegate to it.
 		
@@ -67,7 +67,7 @@
 
 OggDemuxSourcePin::~OggDemuxSourcePin(void)
 {
-	//debugLog.close();
+	debugLog.close();
 	
 	delete mDataQueue;
 	mDataQueue = NULL;
@@ -76,6 +76,7 @@
 STDMETHODIMP OggDemuxSourcePin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
 {
 	if (riid == IID_IMediaSeeking) {
+		debugLog<<"Pin queried for IMediaSeeking"<<endl;
 		*ppv = (IMediaSeeking*)this;
 		((IUnknown*)*ppv)->AddRef();
 		return NOERROR;
@@ -88,8 +89,8 @@
 	IMediaSample* locSample = NULL;
 	REFERENCE_TIME locStart = inPacket->startTime();
 	REFERENCE_TIME locStop = inPacket->endTime();
-	//debugLog<<"Start   : "<<locStart<<endl;
-	//debugLog<<"End     : "<<locStop<<endl;
+	debugLog<<"Start   : "<<locStart<<endl;
+	debugLog<<"End     : "<<locStop<<endl;
 	DbgLog((LOG_TRACE, 2, "Getting Buffer in Source Pin..."));
 	HRESULT	locHR = GetDeliveryBuffer(&locSample, &locStart, &locStop, NULL);
 	DbgLog((LOG_TRACE, 2, "* After get Buffer in Source Pin..."));

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.h	2004-09-17 14:42:55 UTC (rev 7775)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.h	2004-09-17 17:45:02 UTC (rev 7776)
@@ -90,7 +90,7 @@
 	StampedOggPacket* mPartialPacket;
 	HRESULT mFilterHR;
 	COutputQueue* mDataQueue;
-	//fstream debugLog;
+	fstream debugLog;
 	bool mFirstRun;
 
 



More information about the commits mailing list