[xiph-commits] r8271 - in trunk/oggdsf: docs sln/oggdsf_all
src/lib/codecs/flac/filters/dsfFLACDecoder
src/lib/codecs/speex/filters/dsfSpeexDecoder
src/lib/codecs/vorbis/filters/dsfVorbisDecoder
illiminable at motherfish-iii.xiph.org
illiminable at motherfish-iii.xiph.org
Tue Nov 23 10:34:42 PST 2004
Author: illiminable
Date: 2004-11-23 10:34:42 -0800 (Tue, 23 Nov 2004)
New Revision: 8271
Added:
trunk/oggdsf/docs/refactor.txt
Modified:
trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.cpp
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.cpp
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.cpp
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACdecoderdllstuff.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/dsfFLACDecoder.vcproj
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.cpp
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp
trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
Log:
* Switched the FLAC Decoder to the new Abstract filters.
Added: trunk/oggdsf/docs/refactor.txt
===================================================================
--- trunk/oggdsf/docs/refactor.txt 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/docs/refactor.txt 2004-11-23 18:34:42 UTC (rev 8271)
@@ -0,0 +1,5 @@
+Filters crash if you try to right click and view props in graphedit on the output pin
+
+Fix the hardcoded buffer parameters in the decoders
+
+Fix the leaks caused by the accept media types.
\ No newline at end of file
Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln 2004-11-23 18:34:42 UTC (rev 8271)
@@ -77,7 +77,7 @@
{7F213248-16F2-4AAE-B941-C402670082BC} = {7F213248-16F2-4AAE-B941-C402670082BC}
{A882A968-3013-4A27-B653-E18CF5C791FE} = {A882A968-3013-4A27-B653-E18CF5C791FE}
{4CBC0173-27E6-4218-AE06-5EFDCA7B2547} = {4CBC0173-27E6-4218-AE06-5EFDCA7B2547}
- {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/flac/filters/dsfFLACDecoder/FLACDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.cpp 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.cpp 2004-11-23 18:34:42 UTC (rev 8271)
@@ -30,7 +30,7 @@
//===========================================================================
#include "StdAfx.h"
-#include "flacdecodefilter.h"
+#include "FLACDecodeFilter.h"
//COM Factory Template
@@ -50,7 +50,7 @@
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
FLACDecodeFilter::FLACDecodeFilter(void)
- : AbstractAudioDecodeFilter(NAME("FLAC Audio Decoder"), CLSID_FLACDecodeFilter, FLAC)
+ : AbstractTransformFilter(NAME("FLAC Audio Decoder"), CLSID_FLACDecodeFilter)
, mFLACFormatBlock(NULL)
{
bool locWasConstructed = ConstructPins();
@@ -58,21 +58,40 @@
FLACDecodeFilter::~FLACDecodeFilter(void)
{
- //DestroyPins();
delete mFLACFormatBlock;
mFLACFormatBlock = NULL;
}
bool FLACDecodeFilter::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 FLACDecodeOutputPin(this, m_pLock); //Deleted in destroy pins in base class.
+ mOutputPin = new FLACDecodeOutputPin(this, m_pLock, locAcceptableTypes); //Deleted in base class destructor
- CMediaType* locAcceptMediaType = new CMediaType(&MEDIATYPE_Audio); //Given to Input pin... it's responsible (deletes in base constructor of pin)
+ //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_FLAC;
locAcceptMediaType->formattype = FORMAT_FLAC;
- mInputPin = new FLACDecodeInputPin(this, m_pLock, mOutputPin, locAcceptMediaType); //Pin destroyed in base class, media type destroyed in base.
+
+ locAcceptableTypes.push_back(locAcceptMediaType);
+
+ mInputPin = new FLACDecodeInputPin(this, m_pLock, mOutputPin, locAcceptableTypes); //Deleted in base class filter destructor.
return true;
+
}
CUnknown* WINAPI FLACDecodeFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr)
Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.h 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.h 2004-11-23 18:34:42 UTC (rev 8271)
@@ -30,30 +30,32 @@
//===========================================================================
#pragma once
+//Local Includes
#include "FLACdecoderdllstuff.h"
+
+//External INcludes
#include "FLAC++/decoder.h"
+
class FLACDecodeFilter
- : public AbstractAudioDecodeFilter
+ //Base Classes
+ : public AbstractTransformFilter
{
public:
+ //Friend Classes
+ friend class FLACDecodeInputPin;
+ friend class FLACDecodeOutputPin;
+
+ //Constructors
FLACDecodeFilter(void);
virtual ~FLACDecodeFilter(void);
-
- friend class FLACDecodeInputPin;
- friend class FLACDecodeOutputPin;
-
//COM Creator Function
static CUnknown* WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
- //VIRTUAL FUNCTIONS - AbstractAudioDecodeFilter
- virtual bool ConstructPins();
-
- //Should really be here
-
void FLACDecodeFilter::setFLACFormatBlock(sFLACFormatBlock* inFormatBlock) ;
sFLACFormatBlock* FLACDecodeFilter::getFLACFormatBlock();
protected:
+ //Implemenation of Pue Virtuals from AbstractTransformFilter
+ virtual bool ConstructPins();
sFLACFormatBlock* mFLACFormatBlock;
-
};
Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.cpp 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.cpp 2004-11-23 18:34:42 UTC (rev 8271)
@@ -32,12 +32,13 @@
#include "StdAfx.h"
#include "flacdecodeinputpin.h"
-FLACDecodeInputPin::FLACDecodeInputPin(AbstractAudioDecodeFilter* inParentFilter, CCritSec* inFilterLock, AbstractAudioDecodeOutputPin* inOutputPin, CMediaType* inAcceptMediaType)
- : AbstractAudioDecodeInputPin(inParentFilter, inFilterLock, inOutputPin, NAME("FLACDecodeInputPin"), L"FLAC In", inAcceptMediaType)
+FLACDecodeInputPin::FLACDecodeInputPin(AbstractTransformFilter* inParentFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, vector<CMediaType*> inAcceptableMediaTypes)
+ : AbstractTransformInputPin(inParentFilter, inFilterLock, inOutputPin, NAME("FLACDecodeInputPin"), L"FLAC In", inAcceptableMediaTypes)
, mGotMetaData(false)
, mCodecLock(NULL)
-
- //, mNumPacksBuffered(0)
+
+ , mUptoFrame(0)
+
{
//debugLog.open("G:\\logs\\flacfilter.log", ios_base::out);
mCodecLock = new CCritSec; //Deleted in destructor.
@@ -63,19 +64,24 @@
}
bool FLACDecodeInputPin::ConstructCodec()
{
- //mFLACDecoder = new FLAC__StreamDecoder;
mFLACDecoder.initCodec();
return true;
}
void FLACDecodeInputPin::DestroyCodec()
{
- //delete mFLACDecoder;
- //mFLACDecoder = NULL;
+
}
-
-long FLACDecodeInputPin::decodeData(BYTE* inBuf, long inNumBytes)
+STDMETHODIMP FLACDecodeInputPin::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);
+
+}
+HRESULT FLACDecodeInputPin::TransformData(BYTE* inBuf, long inNumBytes)
+{
//TODO::: Locks ???
@@ -107,7 +113,7 @@
//debugLog<<"Write_Callback : Get deliverybuffer failed. returning abort code."<<endl;
// //We get here when the application goes into stop mode usually.
delete locStamped;
- return -1;
+ return S_FALSE;
}
@@ -118,23 +124,19 @@
locSample->GetPointer(&locBuffer);
-
-
if (locSample->GetSize() >= locStamped->packetSize()) {
- // //ADDING TIMEBASE INFO.
- REFERENCE_TIME locTimeBase = ((mLastSeenStartGranPos * UNITS) / mFLACDecoder.mSampleRate) - mSeekTimeBase;
- REFERENCE_TIME locFrameStart = locTimeBase + (((__int64)(mUptoFrame * UNITS)) / mFLACDecoder.mSampleRate);
+ REFERENCE_TIME locFrameStart = (((__int64)(mUptoFrame * UNITS)) / mFLACDecoder.mSampleRate);
- //Increment the frame counter
+ //Increment the frame counter - note the returned packet is stamped 0-numSamples
mUptoFrame += locStamped->endTime();
// //Make the end frame counter
- REFERENCE_TIME locFrameEnd = locTimeBase + (((__int64)(mUptoFrame * UNITS)) / mFLACDecoder.mSampleRate);
+ REFERENCE_TIME locFrameEnd = (((__int64)(mUptoFrame * UNITS)) / mFLACDecoder.mSampleRate);
memcpy((void*)locBuffer, (const void*)locStamped->packetData(), locStamped->packetSize());
SetSampleParams(locSample, locStamped->packetSize(), &locFrameStart, &locFrameEnd);
- HRESULT locHR = mOutputPin->mDataQueue->Receive(locSample);
+ HRESULT locHR = ((FLACDecodeOutputPin*)(mOutputPin))->mDataQueue->Receive(locSample);
if (locHR != S_OK) {
} else {
@@ -147,9 +149,9 @@
delete locStamped;
- return 0;
+ return S_OK;
} else {
- return -1;
+ return S_FALSE;
}
} else {
@@ -158,9 +160,9 @@
mGotMetaData = mFLACDecoder.acceptMetadata(locPacket); //Accepts the packet.
}
if (mGotMetaData) {
- return 0;
+ return S_OK;
} else {
- return -1;
+ return S_FALSE;
}
@@ -169,10 +171,10 @@
//debugLog<<"decodeData : Successful return."<<endl;
//Should be impossible to get here.
- return 0;
+ return S_OK;
} else {
//debugLog<<"decodeData : Filter flushing... bad things !!!"<<endl;
- return -1;
+ return S_FALSE;
}
@@ -184,7 +186,7 @@
//debugLog<<"BeginFlush : Calling flush on the codec."<<endl;
- HRESULT locHR = AbstractAudioDecodeInputPin::BeginFlush();
+ HRESULT locHR = AbstractTransformInputPin::BeginFlush();
{ //PROTECT CODEC FROM IMPLODING
CAutoLock locCodecLock(mCodecLock);
mFLACDecoder.flushCodec();
@@ -200,7 +202,7 @@
mFLACDecoder.flushCodec();
} //END CRITICAL SECTION
- return AbstractAudioDecodeInputPin::EndOfStream();
+ return AbstractTransformInputPin::EndOfStream();
}
HRESULT FLACDecodeInputPin::SetMediaType(const CMediaType* inMediaType) {
Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.h 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.h 2004-11-23 18:34:42 UTC (rev 8271)
@@ -30,58 +30,55 @@
//===========================================================================
#pragma once
+
+//Local Includes
#include "FLACdecoderdllstuff.h"
-//#include "FLAC++/decoder.h"
+
+//External Includes
#include "FLACPushDecoder.h"
#include "OggPacket.h"
#include "StampedOggPacket.h"
-//#include <queue>
+//STL Includes
//debug only
#include <fstream>
//
-
using namespace std;
-//using namespace FLAC::Decoder;
+
class FLACDecodeInputPin
- : public AbstractAudioDecodeInputPin
- //, public Stream
+ //Base Classes
+ : public AbstractTransformInputPin
{
public:
-
+ //COM Initialisation
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
- FLACDecodeInputPin(AbstractAudioDecodeFilter* inFilter, CCritSec* inFilterLock, AbstractAudioDecodeOutputPin* inOutputPin, CMediaType* inAcceptMediaType);
+
+ //Constructors
+ FLACDecodeInputPin(AbstractTransformFilter* inFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, vector<CMediaType*> inAcceptableMediaTypes);
virtual ~FLACDecodeInputPin(void);
-
HRESULT SetMediaType(const CMediaType* inMediaType);
- //virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], unsigned *bytes);
- //virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
- //virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
- //virtual void error_callback(::FLAC__StreamDecoderErrorStatus status);
-
- //VIRTUAL FUNCTIONS - AbstractAudioDecodeInputPin
- //FIX:::These should be protected.
- virtual bool ConstructCodec();
- virtual void DestroyCodec();
- //virtual STDMETHODIMP EndFlush();
virtual STDMETHODIMP BeginFlush();
virtual STDMETHODIMP EndOfStream(void);
-
- long decodeData(unsigned char* inBuf, long inNumBytes);
-
+ virtual STDMETHODIMP NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate);
+
protected:
+ //Implementation of pure virtuals from AbstractTransformInputPin
+ virtual bool ConstructCodec();
+ virtual void DestroyCodec();
+ virtual HRESULT TransformData(unsigned char* inBuf, long inNumBytes);
+
+ //Member Data
bool mGotMetaData;
FLACPushDecoder mFLACDecoder;
+ CCritSec* mCodecLock;
+ unsigned long mUptoFrame;
//debug only
//fstream debugLog;
//
- CCritSec* mCodecLock;
- //queue<OggPacket*> mPendingPackets;
- //unsigned long mNumPacksBuffered;
};
Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.cpp 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.cpp 2004-11-23 18:34:42 UTC (rev 8271)
@@ -32,8 +32,8 @@
#include "StdAfx.h"
#include "flacdecodeoutputpin.h"
-FLACDecodeOutputPin::FLACDecodeOutputPin(FLACDecodeFilter* inParentFilter, CCritSec* inFilterLock)
- : AbstractAudioDecodeOutputPin(inParentFilter, inFilterLock, NAME("FLACDecodeOutputPin"), L"PCM Out")
+FLACDecodeOutputPin::FLACDecodeOutputPin(FLACDecodeFilter* inParentFilter, CCritSec* inFilterLock, vector<CMediaType*> inAcceptableMediaTypes)
+ : AbstractTransformOutputPin(inParentFilter, inFilterLock, NAME("FLACDecodeOutputPin"), L"PCM Out", 65536, 20, inAcceptableMediaTypes)
{
}
@@ -52,15 +52,21 @@
return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv);
}
-bool FLACDecodeOutputPin::FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer) {
- FLACDecodeFilter* locFilter = (FLACDecodeFilter*)mParentFilter;
+HRESULT FLACDecodeOutputPin::CreateAndFillFormatBuffer(CMediaType* outMediaType, int inPosition)
+{
+ if (inPosition == 0) {
+ WAVEFORMATEX* locWaveFormat = (WAVEFORMATEX*)outMediaType->AllocFormatBuffer(sizeof(WAVEFORMATEX));
+ FLACDecodeFilter* locFilter = (FLACDecodeFilter*)mParentFilter;
- inFormatBuffer->wFormatTag = WAVE_FORMAT_PCM;
- inFormatBuffer->nChannels = locFilter->getFLACFormatBlock()->numChannels;
- inFormatBuffer->nSamplesPerSec = locFilter->getFLACFormatBlock()->samplesPerSec;
- inFormatBuffer->wBitsPerSample = locFilter->getFLACFormatBlock()->numBitsPerSample;
- inFormatBuffer->nBlockAlign = (inFormatBuffer->nChannels) * (inFormatBuffer->wBitsPerSample >> 3);
- inFormatBuffer->nAvgBytesPerSec = ((inFormatBuffer->nChannels) * (inFormatBuffer->wBitsPerSample >> 3)) * inFormatBuffer->nSamplesPerSec;
- inFormatBuffer->cbSize = 0;
- return true;
+ locWaveFormat->wFormatTag = WAVE_FORMAT_PCM;
+ locWaveFormat->nChannels = locFilter->getFLACFormatBlock()->numChannels;
+ locWaveFormat->nSamplesPerSec = locFilter->getFLACFormatBlock()->samplesPerSec;
+ locWaveFormat->wBitsPerSample = locFilter->getFLACFormatBlock()->numBitsPerSample;
+ 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/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.h 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.h 2004-11-23 18:34:42 UTC (rev 8271)
@@ -30,18 +30,27 @@
//===========================================================================
#pragma once
+//Local Includes
#include "FLACdecoderdllstuff.h"
+//Forward Declarations
class FLACDecodeFilter;
class FLACDecodeOutputPin
- : public AbstractAudioDecodeOutputPin
+ : public AbstractTransformOutputPin
{
public:
+ //Friend Classes
+ friend class FLACDecodeInputPin;
+
+ //COM Initialisation
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
- FLACDecodeOutputPin(FLACDecodeFilter* inParentFilter, CCritSec* inFilterLock);
+
+ //Constructors
+ FLACDecodeOutputPin(FLACDecodeFilter* inParentFilter, CCritSec* inFilterLock, vector<CMediaType*> inAcceptableMediaTypes);
virtual ~FLACDecodeOutputPin(void);
-
- virtual bool FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer);
+protected:
+ virtual HRESULT CreateAndFillFormatBuffer(CMediaType* outMediaType, int inPosition);
+ //virtual bool FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer);
};
Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACdecoderdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACdecoderdllstuff.h 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACdecoderdllstuff.h 2004-11-23 18:34:42 UTC (rev 8271)
@@ -31,24 +31,23 @@
#pragma once
-#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
struct sFLACFormatBlock {
unsigned short numChannels;
unsigned long numBitsPerSample;
unsigned long samplesPerSec;
-
};
-#include "AbstractAudioDecodeFilter.h"
-#include "AbstractAudioDecodeInputPin.h"
-#include "AbstractAudioDecodeOutputPin.h"
+#include "AbstractTransformFilter.h"
+#include "AbstractTransformInputPin.h"
+#include "AbstractTransformOutputPin.h"
#include "FLACDecodeFilter.h"
#include "FLACDecodeInputPin.h"
#include "FLACDecodeOutputPin.h"
Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/dsfFLACDecoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/dsfFLACDecoder.vcproj 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/dsfFLACDecoder.vcproj 2004-11-23 18:34:42 UTC (rev 8271)
@@ -19,7 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\libs\libflac\include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore;..\..\libs\libFLACHelper"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\libs\libflac\include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore;..\..\libs\libFLACHelper"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFFLACDECODER_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;..\..\libs\libflac\include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore;..\..\libs\libFLACHelper"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\libs\libflac\include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore;..\..\libs\libFLACHelper"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFFLACDECODER_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;..\..\libs\libflac\include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore;..\..\libs\libFLACHelper"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\libs\libflac\include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore;..\..\libs\libFLACHelper"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFFLACDECODER_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;..\..\libs\libflac\include;..\..\..\..\core\directshow\dsfAbstractAudioDecoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore;..\..\libs\libFLACHelper"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\libs\libflac\include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg\libOOOgg;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper\libilliCore;..\..\libs\libFLACHelper"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFFLACDECODER_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="2"
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.cpp 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeFilter.cpp 2004-11-23 18:34:42 UTC (rev 8271)
@@ -93,7 +93,6 @@
SpeexDecodeFilter::~SpeexDecodeFilter(void)
{
- //DestroyPins();
delete 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 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp 2004-11-23 18:34:42 UTC (rev 8271)
@@ -182,10 +182,14 @@
-long SpeexDecodeInputPin::TransformData(BYTE* inBuf, long inNumBytes)
+HRESULT SpeexDecodeInputPin::TransformData(BYTE* inBuf, long inNumBytes)
{
long locErr = fish_sound_decode(mFishSound, inBuf, inNumBytes);
- return locErr;
+ if (locErr == 0) {
+ return S_OK;
+ } else {
+ return S_FALSE;
+ }
}
Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp 2004-11-23 17:42:56 UTC (rev 8270)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp 2004-11-23 18:34:42 UTC (rev 8271)
@@ -208,8 +208,10 @@
-long VorbisDecodeInputPin::TransformData(BYTE* inBuf, long inNumBytes)
+HRESULT VorbisDecodeInputPin::TransformData(BYTE* inBuf, long inNumBytes)
{
+ //TODO::: Return types !!!
+
//debugLog << "Decode called... Last Gran Pos : "<<mLastSeenStartGranPos<<endl;
DbgLog((LOG_TRACE,1,TEXT("decodeData")));
long locErr = fish_sound_decode(mFishSound, inBuf, inNumBytes);
More information about the commits
mailing list