[xiph-commits] r10340 - in branches/oggdsf_new_demux/src/lib/codecs/speex/filters: dsfSpeexDecoder dsfSpeexEncoder

illiminable at svn.xiph.org illiminable at svn.xiph.org
Sat Nov 5 04:51:16 PST 2005


Author: illiminable
Date: 2005-11-05 04:51:07 -0800 (Sat, 05 Nov 2005)
New Revision: 10340

Modified:
   branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp
   branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h
   branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj
   branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexEncoder/dsfSpeexEncoder.vcproj
Log:
* Add the intermediate buffer to speex decoder

Modified: branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp	2005-11-05 12:37:23 UTC (rev 10339)
+++ branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp	2005-11-05 12:51:07 UTC (rev 10340)
@@ -43,10 +43,16 @@
 	,	mUptoFrame(0)
 
 	,	mDecodedByteCount(0)
+	,	mDecodedBuffer(NULL)
+	,	mRateNumerator(RATE_DENOMINATOR)
 
+	,	mSetupState(VSS_SEEN_NOTHING)
+
 	,	mBegun(false)
 {
 	ConstructCodec();
+
+	mDecodedBuffer = new unsigned char[DECODED_BUFFER_SIZE];
 }
 
 bool SpeexDecodeInputPin::ConstructCodec() {
@@ -67,6 +73,8 @@
 SpeexDecodeInputPin::~SpeexDecodeInputPin(void)
 {
 	DestroyCodec();
+
+	delete mDecodedBuffer;
 }
 
 STDMETHODIMP SpeexDecodeInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)

Modified: branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h	2005-11-05 12:37:23 UTC (rev 10339)
+++ branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h	2005-11-05 12:51:07 UTC (rev 10340)
@@ -63,6 +63,8 @@
 
 	virtual STDMETHODIMP GetAllocatorRequirements(ALLOCATOR_PROPERTIES *outRequestedProps);
 
+	virtual STDMETHODIMP Receive(IMediaSample* inSample);
+
 	//IOggDecoder Interface
 	virtual LOOG_INT64 convertGranuleToTime(LOOG_INT64 inGranule);
 	virtual LOOG_INT64 mustSeekBefore(LOOG_INT64 inGranule);
@@ -72,6 +74,7 @@
 
 
 protected:
+	static const unsigned long DECODED_BUFFER_SIZE = 1<<20;		//1 Meg buffer
 	static const unsigned long SPEEX_IDENT_HEADER_SIZE = 80;
 	static const unsigned long SPEEX_NUM_BUFFERS = 75;
 	static const unsigned long SPEEX_BUFFER_SIZE = 65536;
@@ -91,6 +94,23 @@
 
 	bool mBegun;
 
+	unsigned char* mDecodedBuffer;
+
 	unsigned long mDecodedByteCount;
 
+	enum eSpeexSetupState {
+		VSS_SEEN_NOTHING,
+		VSS_SEEN_BOS,
+		VSS_SEEN_COMMENT,
+		VSS_ALL_HEADERS_SEEN,
+		VSS_ERROR
+	};
+
+	eSpeexSetupState mSetupState;
+
+	__int64 mRateNumerator;
+	static const __int64 RATE_DENOMINATOR = 65536;
+
+
+
 };

Modified: branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj	2005-11-05 12:37:23 UTC (rev 10339)
+++ branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj	2005-11-05 12:51:07 UTC (rev 10340)
@@ -19,7 +19,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
@@ -81,7 +81,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -144,7 +144,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -208,7 +208,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"

Modified: branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexEncoder/dsfSpeexEncoder.vcproj
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexEncoder/dsfSpeexEncoder.vcproj	2005-11-05 12:37:23 UTC (rev 10339)
+++ branches/oggdsf_new_demux/src/lib/codecs/speex/filters/dsfSpeexEncoder/dsfSpeexEncoder.vcproj	2005-11-05 12:51:07 UTC (rev 10340)
@@ -19,7 +19,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFSPEEXENCODER_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\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXENCODER_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\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXENCODER_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\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXENCODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"



More information about the commits mailing list