[xiph-commits] r8270 - in trunk/oggdsf: sln/oggdsf_all
src/lib/codecs/speex/filters/dsfSpeexDecoder
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 09:42:56 PST 2004
Author: illiminable
Date: 2004-11-23 09:42:56 -0800 (Tue, 23 Nov 2004)
New Revision: 8270
Modified:
trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.cpp
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.h
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeOutputPin.cpp
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeOutputPin.h
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/speexdecoderdllstuff.h
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/stdafx.h
trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp
trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h
trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformFilter.h
Log:
* Speex decoder moved to work with new abstract classes.
* This fixed the high latency of seeking in speex, seeking is now instant.
Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln 2004-11-23 17:42:56 UTC (rev 8270)
@@ -123,7 +123,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}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfSpeexEncoder", "..\..\src\lib\codecs\speex\filters\dsfSpeexEncoder\dsfSpeexEncoder.vcproj", "{419E0701-9C9A-4671-B3B6-79FA206DEE25}"
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.cpp 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.cpp 2004-11-23 17:42:56 UTC (rev 8270)
@@ -50,11 +50,8 @@
// Generic way of determining the number of items in the template
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
-
-
-//*************************************************************************************************
SpeexDecodeFilter::SpeexDecodeFilter()
- : AbstractAudioDecodeFilter(NAME("Speex Audio Decoder"), CLSID_SpeexDecodeFilter, SPEEX)
+ : AbstractTransformFilter(NAME("Speex Audio Decoder"), CLSID_SpeexDecodeFilter)
, mSpeexFormatInfo(NULL)
{
@@ -63,14 +60,35 @@
bool SpeexDecodeFilter::ConstructPins()
{
+
+ //Vector to hold our set of media types we want to accept.
+ vector<CMediaType*> locAcceptableTypes;
+
+ //Setup the media types for the output pin.
+ 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 SpeexDecodeOutputPin(this, m_pLock);
+ mOutputPin = new SpeexDecodeOutputPin(this, m_pLock, locAcceptableTypes); //Deleted in base class destructor
- CMediaType* locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio);
+ //Clear out the vector, now we've already passed it to the output pin.
+ locAcceptableTypes.clear();
+
+ //Setup the media Types for the input pin.
+ locAcceptMediaType = NULL;
+ locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio); //Deleted by pin
+
locAcceptMediaType->subtype = MEDIASUBTYPE_Speex;
locAcceptMediaType->formattype = FORMAT_Speex;
- mInputPin = new SpeexDecodeInputPin(this, m_pLock, mOutputPin, locAcceptMediaType);
+
+ locAcceptableTypes.push_back(locAcceptMediaType);
+
+ mInputPin = new SpeexDecodeInputPin(this, m_pLock, mOutputPin, locAcceptableTypes); //Deleted in base class filter destructor.
return true;
+
}
SpeexDecodeFilter::~SpeexDecodeFilter(void)
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.h 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.h 2004-11-23 17:42:56 UTC (rev 8270)
@@ -32,7 +32,7 @@
#pragma once
//Include Files
#include "speexdecoderdllstuff.h"
-#include "AbstractAudioDecodeFilter.h"
+#include "AbstractTransformFilter.h"
//Forward Declarations
struct sSpeexFormatBlock;
@@ -42,7 +42,7 @@
//Class Interface
class SpeexDecodeFilter
//Base Classes
- : public AbstractAudioDecodeFilter
+ : public AbstractTransformFilter
{
public:
//Friends
@@ -56,14 +56,15 @@
//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 sSpeexFormatBlock* getSpeexFormatBlock();
virtual void setSpeexFormat(sSpeexFormatBlock* inFormatBlock);
protected:
+ //Pure Virtuals from AbstracttransformFilter
+ virtual bool ConstructPins();
+
//Format Block
sSpeexFormatBlock* mSpeexFormatInfo;
};
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp 2004-11-23 17:42:56 UTC (rev 8270)
@@ -33,9 +33,16 @@
#include "SpeexDecodeInputPin.h"
-SpeexDecodeInputPin::SpeexDecodeInputPin(AbstractAudioDecodeFilter* inFilter, CCritSec* inFilterLock, AbstractAudioDecodeOutputPin* inOutputPin, CMediaType* inAcceptMediaType)
- : AbstractAudioDecodeInputPin(inFilter, inFilterLock, inOutputPin, NAME("SpeexDecodeInputPin"), L"Speex In", inAcceptMediaType)
+SpeexDecodeInputPin::SpeexDecodeInputPin(AbstractTransformFilter* inFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, vector<CMediaType*> inAcceptableMediaTypes)
+ : AbstractTransformInputPin(inFilter, inFilterLock, inOutputPin, NAME("SpeexDecodeInputPin"), L"Speex In", inAcceptableMediaTypes)
, mFishSound(NULL)
+
+ , mNumChannels(0)
+ , mFrameSize(0)
+ , mSampleRate(0)
+ , mUptoFrame(0)
+
+ , mBegun(false)
{
ConstructCodec();
}
@@ -70,8 +77,15 @@
return CBaseInputPin::NonDelegatingQueryInterface(riid, ppv);
}
+STDMETHODIMP SpeexDecodeInputPin::NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate)
+{
+ CAutoLock locLock(mStreamLock);
+ //debugLog<<"New segment "<<inStartTime<<" - "<<inStopTime<<endl;
+ mUptoFrame = 0;
+ return AbstractTransformInputPin::NewSegment(inStartTime, inStopTime, inRate);
+
+}
-
int SpeexDecodeInputPin::SpeexDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer)
{
//Do we need to delete the pcm structure ????
@@ -92,45 +106,19 @@
locThis->mSampleRate = locThis->mFishInfo.samplerate;
}
+
+ //TO DO::: Move this somewhere else
+ unsigned long locActualSize = inFrames * locThis->mFrameSize;
+ unsigned long locTotalFrameCount = inFrames * locThis->mNumChannels;
-
- //************************ OLD WAY
- //REFERENCE_TIME locFrameStart = locThis->CurrentStartTime() + (((__int64)(locThis->mUptoFrame * HUNDRED_NANOS)) / locThis->mSampleRate);
- //REFERENCE_TIME locFrameStart = (((__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 * HUNDRED_NANOS)) / locThis->mSampleRate);
- //REFERENCE_TIME locFrameEnd = (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
- //***********************************************
-
- //Start time hacks
- REFERENCE_TIME locTimeBase = ((locThis->mLastSeenStartGranPos * UNITS) / locThis->mSampleRate) - locThis->mSeekTimeBase;
-
- //Temp - this will break seeking
- REFERENCE_TIME locFrameStart = locTimeBase + (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
+ REFERENCE_TIME locFrameStart = (((__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->aadDebug<<"Last Seen : " <<locThis->mLastSeenStartGranPos<<endl;
- //locThis->aadDebug<<"Last Seen : " << locThis->mLastSeenStartGranPos<<endl;
- //locThis->aadDebug<<"Time Base : " << locTimeBase << endl;
- //locThis->aadDebug<<"FrameCount : " <<locThis->mUptoFrame<<endl;
- //locThis->aadDebug<<"Seek TB : " <<locThis->mSeekTimeBase<<endl;
-
- //TO DO::: Move this somewhere else
- unsigned long locActualSize = inFrames * locThis->mFrameSize;
- unsigned long locTotalFrameCount = inFrames * locThis->mNumChannels;
- //Make the start timestamp
- //FIX:::Abstract this calculation
+ REFERENCE_TIME locFrameEnd = (((__int64)(locThis->mUptoFrame * UNITS)) / locThis->mSampleRate);
-
IMediaSample* locSample;
HRESULT locHR = locThis->mOutputPin->GetDeliveryBuffer(&locSample, &locFrameStart, &locFrameEnd, NULL);
@@ -178,7 +166,7 @@
{
CAutoLock locLock(locThis->m_pLock);
- HRESULT locHR = locThis->mOutputPin->mDataQueue->Receive(locSample);
+ HRESULT locHR = ((SpeexDecodeOutputPin*)(locThis->mOutputPin))->mDataQueue->Receive(locSample);
if (locHR != S_OK) {
return locHR;
}
@@ -194,7 +182,7 @@
-long SpeexDecodeInputPin::decodeData(BYTE* inBuf, long inNumBytes)
+long SpeexDecodeInputPin::TransformData(BYTE* inBuf, long inNumBytes)
{
long locErr = fish_sound_decode(mFishSound, inBuf, inNumBytes);
return locErr;
@@ -208,7 +196,7 @@
if (inMediaType->subtype == MEDIASUBTYPE_Speex) {
((SpeexDecodeFilter*)mParentFilter)->setSpeexFormat((sSpeexFormatBlock*)inMediaType->pbFormat);
- mParentFilter->mAudioFormat = AbstractAudioDecodeFilter::SPEEX;
+
} else {
throw 0;
}
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h 2004-11-23 17:42:56 UTC (rev 8270)
@@ -31,7 +31,7 @@
#pragma once
#include "speexdecoderdllstuff.h"
-#include "AbstractAudioDecodeInputPin.h"
+#include "AbstractTransformInputPin.h"
#include "SpeexDecodeInputPin.h"
#include "SpeexDecodeFilter.h"
@@ -43,28 +43,33 @@
class SpeexDecodeOutputPin;
class SpeexDecodeInputPin
- : public AbstractAudioDecodeInputPin
+ : public AbstractTransformInputPin
{
public:
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
- SpeexDecodeInputPin(AbstractAudioDecodeFilter* inFilter, CCritSec* inFilterLock, AbstractAudioDecodeOutputPin* inOutputPin, CMediaType* inAcceptMediaType);
+ SpeexDecodeInputPin(AbstractTransformFilter* inFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, vector<CMediaType*> inAcceptableMediaTypes);
virtual ~SpeexDecodeInputPin(void);
static int SpeexDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer);
- HRESULT SetMediaType(const CMediaType* inMediaType);
+ virtual HRESULT SetMediaType(const CMediaType* inMediaType);
+ virtual STDMETHODIMP NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate);
- //VIRTUAL FUNCTIONS - AbstractAudioDecodeInputPin
- //FIX:::These should be protected.
+protected:
+ //Implementation of pure virtuals from AbstractTransformInputPin
virtual bool ConstructCodec();
virtual void DestroyCodec();
+ virtual HRESULT TransformData(unsigned char* inBuf, long inNumBytes);
- long decodeData(unsigned char* inBuf, long inNumBytes);
-
-protected:
-
FishSound* mFishSound;
FishSoundInfo mFishInfo;
+ int mNumChannels;
+ int mFrameSize;
+ int mSampleRate;
+ unsigned int mUptoFrame;
+
+ bool mBegun;
+
};
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeOutputPin.cpp 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeOutputPin.cpp 2004-11-23 17:42:56 UTC (rev 8270)
@@ -32,8 +32,8 @@
#include "StdAfx.h"
#include "speexdecodeoutputpin.h"
-SpeexDecodeOutputPin::SpeexDecodeOutputPin(SpeexDecodeFilter* inParentFilter, CCritSec* inFilterLock)
- : AbstractAudioDecodeOutputPin(inParentFilter, inFilterLock,NAME("SpeexDecodeOutputPin"), L"PCM Out")
+SpeexDecodeOutputPin::SpeexDecodeOutputPin(SpeexDecodeFilter* inParentFilter, CCritSec* inFilterLock, vector<CMediaType*> inAcceptableMediaTypes)
+ : AbstractTransformOutputPin(inParentFilter, inFilterLock,NAME("SpeexDecodeOutputPin"), L"PCM Out", 65536, 20, inAcceptableMediaTypes)
{
@@ -54,13 +54,19 @@
return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv);
}
-bool SpeexDecodeOutputPin::FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer) {
- inFormatBuffer->wFormatTag = WAVE_FORMAT_PCM;
- inFormatBuffer->nChannels = ((SpeexDecodeFilter*)m_pFilter)->mSpeexFormatInfo->numChannels;
- inFormatBuffer->nSamplesPerSec = ((SpeexDecodeFilter*)m_pFilter)->mSpeexFormatInfo->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;
+HRESULT SpeexDecodeOutputPin::CreateAndFillFormatBuffer(CMediaType* outMediaType, int inPosition)
+{
+ if (inPosition == 0) {
+ WAVEFORMATEX* locWaveFormat = (WAVEFORMATEX*)outMediaType->AllocFormatBuffer(sizeof(WAVEFORMATEX));
+ locWaveFormat->wFormatTag = WAVE_FORMAT_PCM;
+ locWaveFormat->nChannels = ((SpeexDecodeFilter*)m_pFilter)->mSpeexFormatInfo->numChannels;
+ locWaveFormat->nSamplesPerSec = ((SpeexDecodeFilter*)m_pFilter)->mSpeexFormatInfo->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;
+ }
}
\ No newline at end of file
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeOutputPin.h 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeOutputPin.h 2004-11-23 17:42:56 UTC (rev 8270)
@@ -31,22 +31,26 @@
#pragma once
#include "speexdecoderdllstuff.h"
-#include "AbstractAudioDecodeOutputPin.h"
+#include "AbstractTransformInputPin.h"
class SpeexDecodeFilter;
class SpeexDecodeOutputPin :
- public AbstractAudioDecodeOutputPin
+ public AbstractTransformOutputPin
{
public:
+
+ friend class SpeexDecodeInputPin;
+
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
- SpeexDecodeOutputPin(SpeexDecodeFilter* inParentFilter,CCritSec* inFilterLock);
+ SpeexDecodeOutputPin(SpeexDecodeFilter* inParentFilter,CCritSec* inFilterLock, vector<CMediaType*> inAcceptableMediaTypes);
virtual ~SpeexDecodeOutputPin(void);
- virtual bool FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer);
-
+ //virtual bool FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer);
+protected:
+ virtual HRESULT CreateAndFillFormatBuffer(CMediaType* outMediaType, int inPosition);
};
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj 2004-11-23 17:42:56 UTC (rev 8270)
@@ -19,7 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
@@ -81,7 +81,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
OptimizeForProcessor="3"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="2"
@@ -144,7 +144,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
OptimizeForProcessor="3"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="2"
@@ -208,7 +208,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
OptimizeForProcessor="3"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="2"
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/speexdecoderdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/speexdecoderdllstuff.h 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/speexdecoderdllstuff.h 2004-11-23 17:42:56 UTC (rev 8270)
@@ -34,13 +34,13 @@
//#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
+//#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
#ifdef LIBOOOGG_EXPORTS
#define LIBOOOGG_API __declspec(dllexport)
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/stdafx.h 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/stdafx.h 2004-11-23 17:42:56 UTC (rev 8270)
@@ -42,9 +42,9 @@
// TODO: reference additional headers your program requires here
-#include "AbstractAudioDecodeFilter.h"
-#include "AbstractAudioDecodeInputPin.h"
-#include "AbstractAudioDecodeOutputPin.h"
+#include "AbstractTransformFilter.h"
+#include "AbstractTransformInputPin.h"
+#include "AbstractTransformOutputPin.h"
#include "SpeexDecodeInputPin.h"
#include "SpeexDecodeOutputPin.h"
#include "SpeexDecodeFilter.h"
Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp 2004-11-23 17:42:56 UTC (rev 8270)
@@ -66,12 +66,10 @@
bool VorbisDecodeFilter::ConstructPins()
{
-
- //TODO::: FIX THIS UP !!!
- DbgLog((LOG_TRACE,1,TEXT("Vorbis Constructor...")));
-
+ //Vector to hold our set of media types we want to accept.
vector<CMediaType*> locAcceptableTypes;
+ //Setup the media types for the output pin.
CMediaType* locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio); //Deleted in pin destructor
locAcceptMediaType->subtype = MEDIASUBTYPE_PCM;
locAcceptMediaType->formattype = FORMAT_WaveFormatEx;
@@ -81,22 +79,18 @@
//Output pin must be done first because it's passed to the input pin.
mOutputPin = new VorbisDecodeOutputPin(this, m_pLock, locAcceptableTypes); //Deleted in base class destructor
+ //Clear out the vector, now we've already passed it to the output pin.
locAcceptableTypes.clear();
+
+ //Setup the media Types for the input pin.
locAcceptMediaType = NULL;
locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio); //Deleted by pin
locAcceptMediaType->subtype = MEDIASUBTYPE_Vorbis;
locAcceptMediaType->formattype = FORMAT_Vorbis;
-
-
-
-
locAcceptableTypes.push_back(locAcceptMediaType);
-
-
-
mInputPin = new VorbisDecodeInputPin(this, m_pLock, mOutputPin, locAcceptableTypes); //Deleted in base class filter destructor.
return true;
}
Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h 2004-11-23 17:42:56 UTC (rev 8270)
@@ -57,16 +57,14 @@
//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:
+ //VIRTUAL FUNCTIONS - AbstractTransformFilter
+ virtual bool ConstructPins();
+
//Format Block
sVorbisFormatBlock* mVorbisFormatInfo;
};
Modified: trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformFilter.h 2004-11-23 16:53:54 UTC (rev 8269)
+++ trunk/oggdsf/src/lib/core/directshow/libDirectshowAbstracts/AbstractTransformFilter.h 2004-11-23 17:42:56 UTC (rev 8270)
@@ -65,11 +65,12 @@
CBasePin* GetPin(int inPinNo);
int GetPinCount(void);
- //Pin Creation Method.
- virtual bool ConstructPins() = 0;
+
protected:
- //Pin destruction method.
+ //Pin Creation Methods
+ virtual bool ConstructPins() = 0;
+
virtual void DestroyPins();
//Pin Member Data
More information about the commits
mailing list