[xiph-commits] r8269 - in trunk/oggdsf: sln/oggdsf_all src/lib/codecs/vorbis/filters/dsfVorbisDecoder src/lib/core/directshow/libDirectshowAbstracts

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Tue Nov 23 08:53:54 PST 2004


Author: illiminable
Date: 2004-11-23 08:53:54 -0800 (Tue, 23 Nov 2004)
New Revision: 8269

Modified:
   trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.cpp
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.h
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/dsfVorbisDecoder.vcproj
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/vorbisdecoderdllstuff.h
   trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformInputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformInputPin.h
Log:
* Switched the vorbis filter succesfully over to the new Abstract filters.
* New filters have much better seek performance.
* The new abstract filter replaces the four original abstract filters (ie AudioDec, AudioEnc, VideoDec, VideoEnc)... and is much more general purpose, without any ties to the ogg format like the old ones had.
* The hacked chaing support is out again for the moment.

Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2004-11-23 16:53:54 UTC (rev 8269)
@@ -92,7 +92,7 @@
 		{A882A968-3013-4A27-B653-E18CF5C791FE} = {A882A968-3013-4A27-B653-E18CF5C791FE}
 		{4CBC0173-27E6-4218-AE06-5EFDCA7B2547} = {4CBC0173-27E6-4218-AE06-5EFDCA7B2547}
 		{AE0ABDB0-AE3B-4C38-843B-3408A6B87BA4} = {AE0ABDB0-AE3B-4C38-843B-3408A6B87BA4}
-		{BE48BAC3-F0DE-47AA-8192-C2A52798E0E5} = {BE48BAC3-F0DE-47AA-8192-C2A52798E0E5}
+		{EA7091BB-9906-41DF-9738-F4858A136086} = {EA7091BB-9906-41DF-9738-F4858A136086}
 		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 	EndProjectSection
 EndProject

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp	2004-11-23 16:53:54 UTC (rev 8269)
@@ -56,23 +56,48 @@
 
 //*************************************************************************************************
 VorbisDecodeFilter::VorbisDecodeFilter()
-	:	AbstractAudioDecodeFilter(NAME("Vorbis Decoder"), CLSID_VorbisDecodeFilter, VORBIS)
+	:	AbstractTransformFilter(NAME("Vorbis Decoder"), CLSID_VorbisDecodeFilter)
 	,	mVorbisFormatInfo(NULL)
 {
 
 	bool locWasConstructed = ConstructPins();
+	//TODO::: Error check !
 }
 
 bool VorbisDecodeFilter::ConstructPins() 
 {
+
+	//TODO::: FIX THIS UP !!!
 	DbgLog((LOG_TRACE,1,TEXT("Vorbis Constructor...")));
+
+	vector<CMediaType*> locAcceptableTypes;
+
+	CMediaType* locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio);		//Deleted in pin destructor
+	locAcceptMediaType->subtype = MEDIASUBTYPE_PCM;
+	locAcceptMediaType->formattype = FORMAT_WaveFormatEx;
+	
+	locAcceptableTypes.push_back(locAcceptMediaType);
+
 	//Output pin must be done first because it's passed to the input pin.
-	mOutputPin = new VorbisDecodeOutputPin(this, m_pLock);			//Deleted in base class destructor
+	mOutputPin = new VorbisDecodeOutputPin(this, m_pLock, locAcceptableTypes);			//Deleted in base class destructor
 
-	CMediaType* locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio);		//Deleted in pin destructor
+	locAcceptableTypes.clear();
+	locAcceptMediaType = NULL;
+	locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio);			//Deleted by pin
+
 	locAcceptMediaType->subtype = MEDIASUBTYPE_Vorbis;
 	locAcceptMediaType->formattype = FORMAT_Vorbis;
-	mInputPin = new VorbisDecodeInputPin(this, m_pLock, mOutputPin, locAcceptMediaType);	//Deleted in base class filter destructor.
+	
+	
+
+
+
+	locAcceptableTypes.push_back(locAcceptMediaType);
+
+	
+	
+	
+	mInputPin = new VorbisDecodeInputPin(this, m_pLock, mOutputPin, locAcceptableTypes);	//Deleted in base class filter destructor.
 	return true;
 }
 
@@ -104,4 +129,83 @@
 	delete mVorbisFormatInfo;
 	mVorbisFormatInfo = new sVorbisFormatBlock;				//Deleted in destructor.
 	*mVorbisFormatInfo = *inFormatBlock;
-}
\ No newline at end of file
+}
+
+//Old imp
+//******************************************************************
+//#include "StdAfx.h"
+//#include "vorbisdecodefilter.h"
+//
+////Include Files
+//#include "StdAfx.h"
+//#include "VorbisDecodeFilter.h"
+//
+////COM Factory Template
+//CFactoryTemplate g_Templates[] = 
+//{
+//    { 
+//		L"Vorbis Decode Filter",						// Name
+//	    &CLSID_VorbisDecodeFilter,            // CLSID
+//	    VorbisDecodeFilter::CreateInstance,	// Method to create an instance of MyComponent
+//        NULL,									// Initialization function
+//        NULL									// Set-up information (for filters)
+//    }
+//
+//};
+//
+//// Generic way of determining the number of items in the template
+//int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]); 
+//
+//
+//
+////*************************************************************************************************
+//VorbisDecodeFilter::VorbisDecodeFilter()
+//	:	AbstractAudioDecodeFilter(NAME("Vorbis Decoder"), CLSID_VorbisDecodeFilter, VORBIS)
+//	,	mVorbisFormatInfo(NULL)
+//{
+//
+//	bool locWasConstructed = ConstructPins();
+//}
+//
+//bool VorbisDecodeFilter::ConstructPins() 
+//{
+//	DbgLog((LOG_TRACE,1,TEXT("Vorbis Constructor...")));
+//	//Output pin must be done first because it's passed to the input pin.
+//	mOutputPin = new VorbisDecodeOutputPin(this, m_pLock);			//Deleted in base class destructor
+//
+//	CMediaType* locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio);		//Deleted in pin destructor
+//	locAcceptMediaType->subtype = MEDIASUBTYPE_Vorbis;
+//	locAcceptMediaType->formattype = FORMAT_Vorbis;
+//	mInputPin = new VorbisDecodeInputPin(this, m_pLock, mOutputPin, locAcceptMediaType);	//Deleted in base class filter destructor.
+//	return true;
+//}
+//
+//VorbisDecodeFilter::~VorbisDecodeFilter(void)
+//{
+//	DbgLog((LOG_TRACE,1,TEXT("Vorbis Destructor...")));
+//	//DestroyPins();
+//	delete mVorbisFormatInfo;
+//}
+//
+//CUnknown* WINAPI VorbisDecodeFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr) 
+//{
+//
+//	VorbisDecodeFilter *pNewObject = new VorbisDecodeFilter();
+//    if (pNewObject == NULL) {
+//        *pHr = E_OUTOFMEMORY;
+//    }
+//	return pNewObject;
+//} 
+//
+////QUERY::: Do we need these ? Aren't we all friedns here ??
+////RESULT::: Keep them, set function must be kept... get could go... but keep for consistency
+//sVorbisFormatBlock* VorbisDecodeFilter::getVorbisFormatBlock() 
+//{
+//	return mVorbisFormatInfo;
+//}
+//void VorbisDecodeFilter::setVorbisFormat(sVorbisFormatBlock* inFormatBlock) 
+//{
+//	delete mVorbisFormatInfo;
+//	mVorbisFormatInfo = new sVorbisFormatBlock;				//Deleted in destructor.
+//	*mVorbisFormatInfo = *inFormatBlock;
+//}
\ No newline at end of file

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h	2004-11-23 16:53:54 UTC (rev 8269)
@@ -29,10 +29,11 @@
 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //===========================================================================
 
+
 #pragma once
 //Include Files
 #include "vorbisdecoderdllstuff.h"
-#include "AbstractAudioDecodeFilter.h"
+#include "AbstractTransformFilter.h"
 
 //Forward Declarations
 struct sVorbisFormatBlock;
@@ -42,7 +43,7 @@
 //Class Interface
 class VorbisDecodeFilter
 	//Base Classes
-	:	public AbstractAudioDecodeFilter
+	:	public AbstractTransformFilter
 {
 public:
 	//Friends
@@ -69,3 +70,49 @@
 	//Format Block
 	sVorbisFormatBlock* mVorbisFormatInfo;
 };
+
+
+
+
+//Old implementation
+//**********************************************
+//#pragma once
+////Include Files
+//#include "vorbisdecoderdllstuff.h"
+//#include "AbstractAudioDecodeFilter.h"
+//
+////Forward Declarations
+//struct sVorbisFormatBlock;
+//class VorbisDecodeInputPin;
+//class VorbisDecodeOutputPin;
+//
+////Class Interface
+//class VorbisDecodeFilter
+//	//Base Classes
+//	:	public AbstractAudioDecodeFilter
+//{
+//public:
+//	//Friends
+//	friend class VorbisDecodeInputPin;
+//	friend class VorbisDecodeOutputPin;
+//
+//	//Constructors and Destructors
+//	VorbisDecodeFilter(void);
+//	virtual ~VorbisDecodeFilter(void);
+//
+//	//COM Creator Function
+//	static CUnknown* WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
+//
+//
+//
+//	//VIRTUAL FUNCTIONS - AbstractAudioDecodeFilter
+//	virtual bool ConstructPins();
+//
+//	//FIX::: Do we need these ? Aren't they all friends ??
+//	virtual sVorbisFormatBlock* getVorbisFormatBlock();
+//	virtual void setVorbisFormat(sVorbisFormatBlock* inFormatBlock);
+//
+//protected:
+//	//Format Block
+//	sVorbisFormatBlock* mVorbisFormatInfo;
+//};

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp	2004-11-23 16:53:54 UTC (rev 8269)
@@ -34,16 +34,37 @@
 #include "VorbisDecodeInputPin.h"
 
 
-VorbisDecodeInputPin::VorbisDecodeInputPin(AbstractAudioDecodeFilter* inFilter, CCritSec* inFilterLock, AbstractAudioDecodeOutputPin* inOutputPin, CMediaType* inAcceptMediaType)
-	:	AbstractAudioDecodeInputPin(inFilter, inFilterLock, inOutputPin, NAME("VorbisDecodeInputPin"), L"Vorbis In", inAcceptMediaType),
-		mBegun(false)
+VorbisDecodeInputPin::VorbisDecodeInputPin	(		AbstractTransformFilter* inFilter
+												,	CCritSec* inFilterLock
+												,	AbstractTransformOutputPin* inOutputPin
+												,	vector<CMediaType*> inAcceptableMediaTypes
+											)
+
+	:	AbstractTransformInputPin			(		inFilter
+												,	inFilterLock
+												,	inOutputPin
+												,	NAME("VorbisDecodeInputPin")
+												,	L"Vorbis In", inAcceptableMediaTypes
+											)
+	,	mBegun(false)
 	,	mFishSound(NULL)
+
+	,	mNumChannels(0)
+	,	mFrameSize(0)
+	,	mSampleRate(0)
+	,	mUptoFrame(0)
 		
 {
-	//debugLog.open("g:\\logs\\vorbislog.log", ios_base::out);
+	debugLog.open("g:\\logs\\vorbislog.log", ios_base::out);
 	ConstructCodec();
 }
 
+VorbisDecodeInputPin::~VorbisDecodeInputPin(void)
+{
+	debugLog.close();
+	DestroyCodec();
+}
+//Is this needed ??
 STDMETHODIMP VorbisDecodeInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
 {
 	if (riid == IID_IMediaSeeking) {
@@ -52,9 +73,10 @@
 		return NOERROR;
 	}
 
-	return CBaseInputPin::NonDelegatingQueryInterface(riid, ppv); 
+	return AbstractTransformInputPin::NonDelegatingQueryInterface(riid, ppv); 
 }
-bool VorbisDecodeInputPin::ConstructCodec() {
+bool VorbisDecodeInputPin::ConstructCodec() 
+{
 	mFishSound = fish_sound_new (FISH_SOUND_DECODE, &mFishInfo);			//Deleted by destroycodec from destructor.
 
 	int i = 1;
@@ -65,34 +87,32 @@
 	//FIX::: Proper return value
 	return true;
 }
-void VorbisDecodeInputPin::DestroyCodec() {
+void VorbisDecodeInputPin::DestroyCodec() 
+{
 	fish_sound_delete(mFishSound);
 	mFishSound = NULL;
 }
-VorbisDecodeInputPin::~VorbisDecodeInputPin(void)
+
+
+STDMETHODIMP VorbisDecodeInputPin::NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate) 
 {
-	//debugLog.close();
-	DestroyCodec();
+	CAutoLock locLock(mStreamLock);
+	debugLog<<"New segment "<<inStartTime<<" - "<<inStopTime<<endl;
+	mUptoFrame = 0;
+	return AbstractTransformInputPin::NewSegment(inStartTime, inStopTime, inRate);
+	
 }
 
-
-
 int __cdecl VorbisDecodeInputPin::VorbisDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer) 
 {
-
-	DbgLog((LOG_TRACE,1,TEXT("Decoded... Sending...")));
-	//Do we need to delete the pcm structure ???? 
-	//More of this can go to the abstract class.
-
-	//For convenience we do all these cast once and for all here.
+	
 	VorbisDecodeInputPin* locThis = reinterpret_cast<VorbisDecodeInputPin*> (inThisPointer);
 	VorbisDecodeFilter* locFilter = reinterpret_cast<VorbisDecodeFilter*>(locThis->m_pFilter);
-	
 
 	if (locThis->CheckStreaming() == S_OK) {
 		if (! locThis->mBegun) {
-
-		
+			locThis->debugLog<<"First Time"<<endl;
+			//Set up fishsound		
 			fish_sound_command (locThis->mFishSound, FISH_SOUND_GET_INFO, &(locThis->mFishInfo), sizeof (FishSoundInfo)); 
 			locThis->mBegun = true;
 			
@@ -102,51 +122,22 @@
 
 		}
 
-		//FIX::: Most of this will be obselete... the demux does it all.
-		
 
 		unsigned long locActualSize = inFrames * locThis->mFrameSize;
 		unsigned long locTotalFrameCount = inFrames * locThis->mNumChannels;
 		
-		//REFERENCE_TIME locFrameStart = locThis->CurrentStartTime() + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
+		locThis->debugLog<<"m_tStart = "<<locThis->m_tStart<<endl;
+		locThis->debugLog<<"mUptoFrame = "<<locThis->mUptoFrame<<endl;
+		//Make the start presentation time
+		REFERENCE_TIME locFrameStart = (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
 
-
-		//New hacks for chaining.
-		if (locThis->mSeekTimeBase == -1) {
-			//locThis->debugLog<<"Chaining was detected... setting chain time base to : "<<locThis->mPreviousEndTime<<endl;
-			//This is our signal this is the start of a chain...
-			// This can only happen on non-seekable streams.
-			locThis->mChainTimeBase = locThis->mPreviousEndTime;
-			
-			locThis->mSeekTimeBase = 0;
-		}
-
-		//Start time hacks
-		REFERENCE_TIME locTimeBase = ((locThis->mLastSeenStartGranPos * UNITS) / locThis->mSampleRate) - locThis->mSeekTimeBase + locThis->mChainTimeBase;
-	
-		
-		
-		//locThis->aadDebug<<"Last Seen  : " <<locThis->mLastSeenStartGranPos<<endl;
-		//locThis->debugLog<<"Last Seen  : " << locThis->mLastSeenStartGranPos<<endl;
-		//locThis->debugLog<<"Time Base  : " << locTimeBase << endl;
-		//locThis->debugLog<<"FrameCount : " <<locThis->mUptoFrame<<endl;
-		//locThis->debugLog<<"Seek TB    : " <<locThis->mSeekTimeBase<<endl;
-
-		//Temp - this will break seeking
-		REFERENCE_TIME locFrameStart = locTimeBase + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
 		//Increment the frame counter
 		locThis->mUptoFrame += inFrames;
-		//Make the end frame counter
 
-		//REFERENCE_TIME locFrameEnd = locThis->CurrentStartTime() + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
-		REFERENCE_TIME locFrameEnd = locTimeBase + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
-		locThis->mPreviousEndTime = locFrameEnd;
+		//Make the end presentation time
+		REFERENCE_TIME locFrameEnd = (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
 
-
-
-		//locThis->debugLog<<"Start      : "<<locFrameStart<<endl;
-		//locThis->debugLog<<"End        : "<<locFrameEnd<<endl;
-		//locThis->debugLog<<"=================================================="<<endl;
+		locThis->debugLog<<"Sample time = "<<locFrameStart<<" - "<<locFrameEnd<<endl;
 		IMediaSample* locSample;
 		HRESULT locHR = locThis->mOutputPin->GetDeliveryBuffer(&locSample, &locFrameStart, &locFrameEnd, NULL);
 
@@ -195,18 +186,15 @@
 		
 				CAutoLock locLock(locThis->m_pLock);
 
-				//Add a reference so it isn't deleted en route.... or not
-				//locSample->AddRef();
-				HRESULT lHR = locThis->mOutputPin->mDataQueue->Receive(locSample);
-				if (lHR != S_OK) {
+				//TODO::: Explain why we don't addref or release.
+				HRESULT locHR = ((VorbisDecodeOutputPin*)(locThis->mOutputPin))->mDataQueue->Receive(locSample);
+				if (locHR != S_OK) {
 					DbgLog((LOG_TRACE,1,TEXT("Queue rejected us...")));
 					return -1;
 				}
 			}
 
-			//Don't Release the sample it gets done for us !
-			//locSample->Release();
-
+			
 			return 0;
 		} else {
 			throw 0;
@@ -220,7 +208,7 @@
 
 
 
-long VorbisDecodeInputPin::decodeData(BYTE* inBuf, long inNumBytes) 
+long VorbisDecodeInputPin::TransformData(BYTE* inBuf, long inNumBytes) 
 {
 	//debugLog << "Decode called... Last Gran Pos : "<<mLastSeenStartGranPos<<endl;
 	DbgLog((LOG_TRACE,1,TEXT("decodeData")));
@@ -241,10 +229,234 @@
 
 	if (inMediaType->subtype == MEDIASUBTYPE_Vorbis) {
 		((VorbisDecodeFilter*)mParentFilter)->setVorbisFormat((sVorbisFormatBlock*)inMediaType->pbFormat);
-		mParentFilter->mAudioFormat = AbstractAudioDecodeFilter::VORBIS;
+		
 	} else {
 		throw 0;
 	}
 	return CBaseInputPin::SetMediaType(inMediaType);
 }
 
+
+
+
+//Old imp
+//*************************************************
+//#include "StdAfx.h"
+//
+//#include "VorbisDecodeInputPin.h"
+//
+//
+//VorbisDecodeInputPin::VorbisDecodeInputPin(AbstractAudioDecodeFilter* inFilter, CCritSec* inFilterLock, AbstractAudioDecodeOutputPin* inOutputPin, CMediaType* inAcceptMediaType)
+//	:	AbstractAudioDecodeInputPin(inFilter, inFilterLock, inOutputPin, NAME("VorbisDecodeInputPin"), L"Vorbis In", inAcceptMediaType),
+//		mBegun(false)
+//	,	mFishSound(NULL)
+//		
+//{
+//	//debugLog.open("g:\\logs\\vorbislog.log", ios_base::out);
+//	ConstructCodec();
+//}
+//
+//STDMETHODIMP VorbisDecodeInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+//{
+//	if (riid == IID_IMediaSeeking) {
+//		*ppv = (IMediaSeeking*)this;
+//		((IUnknown*)*ppv)->AddRef();
+//		return NOERROR;
+//	}
+//
+//	return CBaseInputPin::NonDelegatingQueryInterface(riid, ppv); 
+//}
+//bool VorbisDecodeInputPin::ConstructCodec() {
+//	mFishSound = fish_sound_new (FISH_SOUND_DECODE, &mFishInfo);			//Deleted by destroycodec from destructor.
+//
+//	int i = 1;
+//	//FIX::: Use new API for interleave setting
+//	fish_sound_command(mFishSound, FISH_SOUND_SET_INTERLEAVE, &i, sizeof(int));
+//
+//	fish_sound_set_decoded_callback (mFishSound, VorbisDecodeInputPin::VorbisDecoded, this);
+//	//FIX::: Proper return value
+//	return true;
+//}
+//void VorbisDecodeInputPin::DestroyCodec() {
+//	fish_sound_delete(mFishSound);
+//	mFishSound = NULL;
+//}
+//VorbisDecodeInputPin::~VorbisDecodeInputPin(void)
+//{
+//	//debugLog.close();
+//	DestroyCodec();
+//}
+//
+//
+//
+//int __cdecl VorbisDecodeInputPin::VorbisDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer) 
+//{
+//
+//	DbgLog((LOG_TRACE,1,TEXT("Decoded... Sending...")));
+//	//Do we need to delete the pcm structure ???? 
+//	//More of this can go to the abstract class.
+//
+//	//For convenience we do all these cast once and for all here.
+//	VorbisDecodeInputPin* locThis = reinterpret_cast<VorbisDecodeInputPin*> (inThisPointer);
+//	VorbisDecodeFilter* locFilter = reinterpret_cast<VorbisDecodeFilter*>(locThis->m_pFilter);
+//	
+//
+//	if (locThis->CheckStreaming() == S_OK) {
+//		if (! locThis->mBegun) {
+//
+//		
+//			fish_sound_command (locThis->mFishSound, FISH_SOUND_GET_INFO, &(locThis->mFishInfo), sizeof (FishSoundInfo)); 
+//			locThis->mBegun = true;
+//			
+//			locThis->mNumChannels = locThis->mFishInfo.channels;
+//			locThis->mFrameSize = locThis->mNumChannels * SIZE_16_BITS;
+//			locThis->mSampleRate = locThis->mFishInfo.samplerate;
+//
+//		}
+//
+//		//FIX::: Most of this will be obselete... the demux does it all.
+//		
+//
+//		unsigned long locActualSize = inFrames * locThis->mFrameSize;
+//		unsigned long locTotalFrameCount = inFrames * locThis->mNumChannels;
+//		
+//		//REFERENCE_TIME locFrameStart = locThis->CurrentStartTime() + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
+//
+//
+//		//New hacks for chaining.
+//		if (locThis->mSeekTimeBase == -1) {
+//			//locThis->debugLog<<"Chaining was detected... setting chain time base to : "<<locThis->mPreviousEndTime<<endl;
+//			//This is our signal this is the start of a chain...
+//			// This can only happen on non-seekable streams.
+//			locThis->mChainTimeBase = locThis->mPreviousEndTime;
+//			
+//			locThis->mSeekTimeBase = 0;
+//		}
+//
+//		//Start time hacks
+//		REFERENCE_TIME locTimeBase = ((locThis->mLastSeenStartGranPos * UNITS) / locThis->mSampleRate) - locThis->mSeekTimeBase + locThis->mChainTimeBase;
+//	
+//		
+//		
+//		//locThis->aadDebug<<"Last Seen  : " <<locThis->mLastSeenStartGranPos<<endl;
+//		//locThis->debugLog<<"Last Seen  : " << locThis->mLastSeenStartGranPos<<endl;
+//		//locThis->debugLog<<"Time Base  : " << locTimeBase << endl;
+//		//locThis->debugLog<<"FrameCount : " <<locThis->mUptoFrame<<endl;
+//		//locThis->debugLog<<"Seek TB    : " <<locThis->mSeekTimeBase<<endl;
+//
+//		//Temp - this will break seeking
+//		REFERENCE_TIME locFrameStart = locTimeBase + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
+//		//Increment the frame counter
+//		locThis->mUptoFrame += inFrames;
+//		//Make the end frame counter
+//
+//		//REFERENCE_TIME locFrameEnd = locThis->CurrentStartTime() + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
+//		REFERENCE_TIME locFrameEnd = locTimeBase + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
+//		locThis->mPreviousEndTime = locFrameEnd;
+//
+//
+//
+//		//locThis->debugLog<<"Start      : "<<locFrameStart<<endl;
+//		//locThis->debugLog<<"End        : "<<locFrameEnd<<endl;
+//		//locThis->debugLog<<"=================================================="<<endl;
+//		IMediaSample* locSample;
+//		HRESULT locHR = locThis->mOutputPin->GetDeliveryBuffer(&locSample, &locFrameStart, &locFrameEnd, NULL);
+//
+//		if (locHR != S_OK) {
+//			return -1;
+//		}	
+//		
+//
+//		//Create pointers for the samples buffer to be assigned to
+//		BYTE* locBuffer = NULL;
+//		signed short* locShortBuffer = NULL;
+//		
+//		locSample->GetPointer(&locBuffer);
+//		locShortBuffer = (short *) locBuffer;
+//		
+//		signed short tempInt = 0;
+//		float tempFloat = 0;
+//		
+//		//FIX:::Move the clipping to the abstract function
+//
+//		if (locSample->GetSize() >= locActualSize) {
+//			//Do float to int conversion with clipping
+//			const float SINT_MAX_AS_FLOAT = 32767.0f;
+//			for (unsigned long i = 0; i < locTotalFrameCount; i++) {
+//				//Clipping because vorbis puts out floats out of range -1 to 1
+//				if (((float*)inPCM)[i] <= -1.0f) {
+//					tempInt = SINT_MIN;	
+//				} else if (((float*)inPCM)[i] >= 1.0f) {
+//					tempInt = SINT_MAX;
+//				} else {
+//					//FIX:::Take out the unnescessary variable.
+//					tempFloat = ((( (float*) inPCM )[i]) * SINT_MAX_AS_FLOAT);
+//					//ASSERT((tempFloat <= 32767.0f) && (tempFloat >= -32786.0f));
+//					tempInt = (signed short)(tempFloat);
+//					//tempInt = (signed short) ((( (float*) inPCM )[i]) * SINT_MAX_AS_FLOAT);
+//				}
+//				
+//				*locShortBuffer = tempInt;
+//				locShortBuffer++;
+//			}
+//			
+//			//Set the sample parameters.
+//			locThis->SetSampleParams(locSample, locActualSize, &locFrameStart, &locFrameEnd);
+//
+//			{
+//		
+//				CAutoLock locLock(locThis->m_pLock);
+//
+//				//Add a reference so it isn't deleted en route.... or not
+//				//locSample->AddRef();
+//				HRESULT lHR = locThis->mOutputPin->mDataQueue->Receive(locSample);
+//				if (lHR != S_OK) {
+//					DbgLog((LOG_TRACE,1,TEXT("Queue rejected us...")));
+//					return -1;
+//				}
+//			}
+//
+//			//Don't Release the sample it gets done for us !
+//			//locSample->Release();
+//
+//			return 0;
+//		} else {
+//			throw 0;
+//		}
+//	} else {
+//		DbgLog((LOG_TRACE,1,TEXT("Fishsound sending stuff we aren't ready for...")));
+//		return -1;
+//	}
+//
+//}
+//
+//
+//
+//long VorbisDecodeInputPin::decodeData(BYTE* inBuf, long inNumBytes) 
+//{
+//	//debugLog << "Decode called... Last Gran Pos : "<<mLastSeenStartGranPos<<endl;
+//	DbgLog((LOG_TRACE,1,TEXT("decodeData")));
+//	long locErr = fish_sound_decode(mFishSound, inBuf, inNumBytes);
+//	//FIX::: Do something here ?
+//	if (locErr < 0) {
+//		//debugLog <<"** Fish Sound error **"<<endl;
+//	} else {
+//		//debugLog << "Fish Sound OK >=0 "<<endl;
+//	}
+//	return locErr;
+//}
+//
+//
+//HRESULT VorbisDecodeInputPin::SetMediaType(const CMediaType* inMediaType) {
+//	//FIX:::Error checking
+//	//RESOLVED::: Bit better.
+//
+//	if (inMediaType->subtype == MEDIASUBTYPE_Vorbis) {
+//		((VorbisDecodeFilter*)mParentFilter)->setVorbisFormat((sVorbisFormatBlock*)inMediaType->pbFormat);
+//		mParentFilter->mAudioFormat = AbstractAudioDecodeFilter::VORBIS;
+//	} else {
+//		throw 0;
+//	}
+//	return CBaseInputPin::SetMediaType(inMediaType);
+//}
+//

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h	2004-11-23 16:53:54 UTC (rev 8269)
@@ -30,10 +30,11 @@
 //===========================================================================
 
 #pragma once
+#include <vector>
 #include <fstream>
 using namespace std;
 #include "vorbisdecoderdllstuff.h"
-#include "AbstractAudioDecodeInputPin.h"
+#include "AbstractTransformInputPin.h"
 #include "VorbisDecodeInputPin.h"
 
 #include "VorbisDecodeFilter.h"
@@ -46,31 +47,89 @@
 class VorbisDecodeOutputPin;
 
 class VorbisDecodeInputPin 
-	:	public AbstractAudioDecodeInputPin
+	:	public AbstractTransformInputPin
 {
 public:
 
 	DECLARE_IUNKNOWN
 	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
-	VorbisDecodeInputPin(AbstractAudioDecodeFilter* inFilter, CCritSec* inFilterLock, AbstractAudioDecodeOutputPin* inOutputPin, CMediaType* inAcceptMediaType);
+	VorbisDecodeInputPin(AbstractTransformFilter* inFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, vector<CMediaType*> inAcceptableMediaTypes);
 	virtual ~VorbisDecodeInputPin(void);
 	static int __cdecl VorbisDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer);
 
 	virtual HRESULT SetMediaType(const CMediaType* inMediaType);
 
-	//VIRTUAL FUNCTIONS - AbstractAudioDecodeInputPin
-	//FIX:::These should be protected.
-	virtual bool ConstructCodec();
-	virtual void DestroyCodec();
+	virtual STDMETHODIMP NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate);
 
-	long decodeData(unsigned char* inBuf, long inNumBytes);
 
 protected:
+	fstream debugLog;
 
+
+
+	//Implementation of virtuals from AbstractTransform Filter
+	virtual bool ConstructCodec();
+	virtual void DestroyCodec();
+	virtual HRESULT TransformData(unsigned char* inBuf, long inNumBytes);
+
 	HRESULT mHR;
 	bool mBegun;
 
 	FishSound* mFishSound;
 	FishSoundInfo mFishInfo; 
 
+	int mNumChannels;
+	int mFrameSize;
+	int mSampleRate;
+	unsigned int mUptoFrame;
+
 };
+
+
+//Old imp
+//************************************************************
+//#pragma once
+//#include <fstream>
+//using namespace std;
+//#include "vorbisdecoderdllstuff.h"
+//#include "AbstractAudioDecodeInputPin.h"
+//#include "VorbisDecodeInputPin.h"
+//
+//#include "VorbisDecodeFilter.h"
+//
+//extern "C" {
+////#include <fishsound/fishsound.h>
+//#include "fish_cdecl.h"
+//}
+//
+//class VorbisDecodeOutputPin;
+//
+//class VorbisDecodeInputPin 
+//	:	public AbstractAudioDecodeInputPin
+//{
+//public:
+//
+//	DECLARE_IUNKNOWN
+//	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+//	VorbisDecodeInputPin(AbstractAudioDecodeFilter* inFilter, CCritSec* inFilterLock, AbstractAudioDecodeOutputPin* inOutputPin, CMediaType* inAcceptMediaType);
+//	virtual ~VorbisDecodeInputPin(void);
+//	static int __cdecl VorbisDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer);
+//
+//	virtual HRESULT SetMediaType(const CMediaType* inMediaType);
+//
+//	//VIRTUAL FUNCTIONS - AbstractAudioDecodeInputPin
+//	//FIX:::These should be protected.
+//	virtual bool ConstructCodec();
+//	virtual void DestroyCodec();
+//
+//	long decodeData(unsigned char* inBuf, long inNumBytes);
+//
+//protected:
+//
+//	HRESULT mHR;
+//	bool mBegun;
+//
+//	FishSound* mFishSound;
+//	FishSoundInfo mFishInfo; 
+//
+//};

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.cpp	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.cpp	2004-11-23 16:53:54 UTC (rev 8269)
@@ -29,12 +29,11 @@
 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //===========================================================================
 
-
 #include "StdAfx.h"
 #include "Vorbisdecodeoutputpin.h"
 
-VorbisDecodeOutputPin::VorbisDecodeOutputPin(VorbisDecodeFilter* inParentFilter, CCritSec* inFilterLock)
-	: AbstractAudioDecodeOutputPin(inParentFilter, inFilterLock,NAME("VorbisDecodeOutputPin"), L"PCM Out")
+VorbisDecodeOutputPin::VorbisDecodeOutputPin(VorbisDecodeFilter* inParentFilter, CCritSec* inFilterLock, vector<CMediaType*> inAcceptableMediaTypes)
+	: AbstractTransformOutputPin(inParentFilter, inFilterLock,NAME("VorbisDecodeOutputPin"), L"PCM Out", 65536, 20, inAcceptableMediaTypes)
 {
 
 		
@@ -56,13 +55,61 @@
 	return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv); 
 }
 
-bool VorbisDecodeOutputPin::FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer) {
-	inFormatBuffer->wFormatTag = WAVE_FORMAT_PCM;
-	inFormatBuffer->nChannels = ((VorbisDecodeFilter*)m_pFilter)->mVorbisFormatInfo->numChannels;
-	inFormatBuffer->nSamplesPerSec =  ((VorbisDecodeFilter*)m_pFilter)->mVorbisFormatInfo->samplesPerSec;
-	inFormatBuffer->wBitsPerSample = 16;
-	inFormatBuffer->nBlockAlign = (inFormatBuffer->nChannels) * (inFormatBuffer->wBitsPerSample >> 3);
-	inFormatBuffer->nAvgBytesPerSec = ((inFormatBuffer->nChannels) * (inFormatBuffer->wBitsPerSample >> 3)) * inFormatBuffer->nSamplesPerSec;
-	inFormatBuffer->cbSize = 0;
-	return true;
-}
\ No newline at end of file
+HRESULT VorbisDecodeOutputPin::CreateAndFillFormatBuffer(CMediaType* outMediaType, int inPosition)
+{
+	if (inPosition == 0) {
+		WAVEFORMATEX* locWaveFormat = (WAVEFORMATEX*)outMediaType->AllocFormatBuffer(sizeof(WAVEFORMATEX));
+		//TODO::: Check for null ?
+
+		locWaveFormat->wFormatTag = WAVE_FORMAT_PCM;
+		locWaveFormat->nChannels = ((VorbisDecodeFilter*)m_pFilter)->mVorbisFormatInfo->numChannels;
+		locWaveFormat->nSamplesPerSec =  ((VorbisDecodeFilter*)m_pFilter)->mVorbisFormatInfo->samplesPerSec;
+		locWaveFormat->wBitsPerSample = 16;
+		locWaveFormat->nBlockAlign = (locWaveFormat->nChannels) * (locWaveFormat->wBitsPerSample >> 3);
+		locWaveFormat->nAvgBytesPerSec = ((locWaveFormat->nChannels) * (locWaveFormat->wBitsPerSample >> 3)) * locWaveFormat->nSamplesPerSec;
+		locWaveFormat->cbSize = 0;
+		return S_OK;
+	} else {
+        return S_FALSE;
+	}
+}
+
+
+//Old imp
+//****************************************************
+//#include "StdAfx.h"
+//#include "Vorbisdecodeoutputpin.h"
+//
+//VorbisDecodeOutputPin::VorbisDecodeOutputPin(VorbisDecodeFilter* inParentFilter, CCritSec* inFilterLock)
+//	: AbstractAudioDecodeOutputPin(inParentFilter, inFilterLock,NAME("VorbisDecodeOutputPin"), L"PCM Out")
+//{
+//
+//		
+//}
+//VorbisDecodeOutputPin::~VorbisDecodeOutputPin(void)
+//{
+//	
+//	
+//}
+//
+//STDMETHODIMP VorbisDecodeOutputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+//{
+//	if (riid == IID_IMediaSeeking) {
+//		*ppv = (IMediaSeeking*)this;
+//		((IUnknown*)*ppv)->AddRef();
+//		return NOERROR;
+//	}
+//
+//	return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv); 
+//}
+//
+//bool VorbisDecodeOutputPin::FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer) {
+//	inFormatBuffer->wFormatTag = WAVE_FORMAT_PCM;
+//	inFormatBuffer->nChannels = ((VorbisDecodeFilter*)m_pFilter)->mVorbisFormatInfo->numChannels;
+//	inFormatBuffer->nSamplesPerSec =  ((VorbisDecodeFilter*)m_pFilter)->mVorbisFormatInfo->samplesPerSec;
+//	inFormatBuffer->wBitsPerSample = 16;
+//	inFormatBuffer->nBlockAlign = (inFormatBuffer->nChannels) * (inFormatBuffer->wBitsPerSample >> 3);
+//	inFormatBuffer->nAvgBytesPerSec = ((inFormatBuffer->nChannels) * (inFormatBuffer->wBitsPerSample >> 3)) * inFormatBuffer->nSamplesPerSec;
+//	inFormatBuffer->cbSize = 0;
+//	return true;
+//}
\ No newline at end of file

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.h	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.h	2004-11-23 16:53:54 UTC (rev 8269)
@@ -31,22 +31,44 @@
 
 #pragma once
 #include "vorbisdecoderdllstuff.h"
-#include "AbstractAudioDecodeOutputPin.h"
+#include "AbstractTransformOutputPin.h"
 
 
 class VorbisDecodeFilter;
 class VorbisDecodeOutputPin :
-	public AbstractAudioDecodeOutputPin
+	public AbstractTransformOutputPin
 {
 public:
+
+	friend class VorbisDecodeInputPin;
+
 	DECLARE_IUNKNOWN
 	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
-	VorbisDecodeOutputPin(VorbisDecodeFilter* inParentFilter,CCritSec* inFilterLock);
+	VorbisDecodeOutputPin(VorbisDecodeFilter* inParentFilter,CCritSec* inFilterLock, vector<CMediaType*> inAcceptableMediaTypes);
 	virtual ~VorbisDecodeOutputPin(void);
+protected:
+	virtual HRESULT CreateAndFillFormatBuffer(CMediaType* outMediaType, int inPosition);
+	//virtual bool FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer);
+};
 
-	virtual bool FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer);
-	
+//Old imp
+//*************************************
+//#pragma once
+//#include "vorbisdecoderdllstuff.h"
+//#include "AbstractAudioDecodeOutputPin.h"
+//
+//
+//class VorbisDecodeFilter;
+//class VorbisDecodeOutputPin :
+//	public AbstractAudioDecodeOutputPin
+//{
+//public:
+//	DECLARE_IUNKNOWN
+//	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+//	VorbisDecodeOutputPin(VorbisDecodeFilter* inParentFilter,CCritSec* inFilterLock);
+//	virtual ~VorbisDecodeOutputPin(void);
+//
+//	virtual bool FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer);
+//};
 
-};
 
-

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/dsfVorbisDecoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/dsfVorbisDecoder.vcproj	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/dsfVorbisDecoder.vcproj	2004-11-23 16:53:54 UTC (rev 8269)
@@ -19,7 +19,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFVORBISDECODER_EXPORTS"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
@@ -80,7 +80,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFVORBISDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -143,7 +143,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFVORBISDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -207,7 +207,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFVORBISDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/vorbisdecoderdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/vorbisdecoderdllstuff.h	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/vorbisdecoderdllstuff.h	2004-11-23 16:53:54 UTC (rev 8269)
@@ -30,20 +30,31 @@
 //===========================================================================
 
 #pragma once
-//#include <streams.h>
-//#include <pullpin.h>
-//#include <initguid.h>
 
-#ifdef DSFABSTRACOGGAUDIODECODER_EXPORTS
-#pragma message("----> Exporting from Abstract Library...")
-#define ABS_AUDIO_DEC_API __declspec(dllexport)
-#else
-#pragma message("<---- Importing from Abstract Library...")
-#define ABS_AUDIO_DEC_API __declspec(dllimport)
-#endif
-#include "AbstractAudioDecodeFilter.h"
-#include "AbstractAudioDecodeInputPin.h"
-#include "AbstractAudioDecodeOutputPin.h"
+//***************************** Old imp
+//#ifdef DSFABSTRACOGGAUDIODECODER_EXPORTS
+//#pragma message("----> Exporting from Abstract Library...")
+//#define ABS_AUDIO_DEC_API __declspec(dllexport)
+//#else
+//#pragma message("<---- Importing from Abstract Library...")
+//#define ABS_AUDIO_DEC_API __declspec(dllimport)
+//#endif
+//
+//
+//
+//#include "AbstractAudioDecodeFilter.h"
+//#include "AbstractAudioDecodeInputPin.h"
+//#include "AbstractAudioDecodeOutputPin.h"
+//***************************** Old imp ends
+
+
+//**************************** New imp
+
+#include "AbstractTransformFilter.h"
+#include "AbstractTransformInputPin.h"
+#include "AbstractTransformOutputPin.h"
+//****************************** New imp ends
+
 #include "VorbisDecodeInputPin.h"
 #include "VorbisDecodeOutputPin.h"
 #include "VorbisDecodeFilter.h"

Modified: trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformInputPin.cpp	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformInputPin.cpp	2004-11-23 16:53:54 UTC (rev 8269)
@@ -39,8 +39,6 @@
 	,	mOutputPin (inOutputPin)
 	,	mParentFilter (inParentFilter)
 	
-	,	mBegun (false)
-
 	,	mAcceptableMediaTypes(inAcceptableMediaTypes)
 
 

Modified: trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformInputPin.h	2004-11-23 11:10:04 UTC (rev 8268)
+++ trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformInputPin.h	2004-11-23 16:53:54 UTC (rev 8269)
@@ -68,11 +68,6 @@
 	AbstractTransformInputPin(AbstractTransformFilter* inParentFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, CHAR* inObjectName, LPCWSTR inPinDisplayName, vector<CMediaType*> inAcceptableMediaTypes);
 	virtual ~AbstractTransformInputPin(void);
 
-	//Pure Virtuals for codec specific methods
-	virtual HRESULT TransformData(unsigned char* inBuf, long inNumBytes) = 0;
-	virtual bool ConstructCodec() = 0;
-	virtual void DestroyCodec() = 0;
-	
 	//Pin Conenction Methods
 	virtual HRESULT BreakConnect();
 	virtual HRESULT CompleteConnect(IPin *inReceivePin);
@@ -97,11 +92,16 @@
 	static const signed short SINT_MAX = 32767;
 	static const signed short SINT_MIN = -32768;
 
+	//Pure Virtuals for codec specific methods
+	virtual HRESULT TransformData(unsigned char* inBuf, long inNumBytes) = 0;
+	virtual bool ConstructCodec() = 0;
+	virtual void DestroyCodec() = 0;
+
 	virtual bool SetSampleParams(IMediaSample* outMediaSample, unsigned long inDataSize, REFERENCE_TIME* inStartTime, REFERENCE_TIME* inEndTime);
 
 	HRESULT mHR;
-	bool mBegun;
 
+
 	//TODO::: Couldn't this be gotten from the parent filter if we make them friends ??
 	AbstractTransformOutputPin* mOutputPin;
 	AbstractTransformFilter* mParentFilter;



More information about the commits mailing list