[xiph-commits] r6981 - in trunk/oggdsf/src/lib:
illiminable at dactyl.lonelymoon.com
illiminable
Sun Jul 4 12:49:18 PDT 2004
codecs/speex/filters/dsfSpeexEncoder
codecs/vorbis/filters/dsfVorbisEncoder
core/directshow/dsfAbstractAudioDecoder
core/directshow/dsfAbstractAudioEncoder
Message-ID: <20040704194918.50A359AAAB at dactyl.lonelymoon.com>
Author: illiminable
Date: Sun Jul 4 12:49:18 2004
New Revision: 6981
Modified:
trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexEncoder/dsfSpeexEncoder.vcproj
trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.vcproj
trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeInputPin.h
trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.h
trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/dsfAbstractAudioEncoder.vcproj
Log:
* Added the seeking interfaces to the audio encoders.
Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexEncoder/dsfSpeexEncoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexEncoder/dsfSpeexEncoder.vcproj 2004-07-04 19:25:52 UTC (rev 6980)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexEncoder/dsfSpeexEncoder.vcproj 2004-07-04 19:49:17 UTC (rev 6981)
@@ -19,7 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioEncoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioEncoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32;..\..\..\..\core\directshow\dsfSeeking"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFSPEEXENCODER_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
@@ -74,7 +74,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioEncoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioEncoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32;..\..\..\..\core\directshow\dsfSeeking"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXENCODER_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="2"
Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.vcproj 2004-07-04 19:25:52 UTC (rev 6980)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.vcproj 2004-07-04 19:49:17 UTC (rev 6981)
@@ -19,7 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioEncoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioEncoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32;..\..\..\..\core\directshow\dsfSeeking"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFVORBISENCODER_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
@@ -74,7 +74,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioEncoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\..\..\core\directshow\dsfAbstractAudioEncoder;..\..\..\..\core\ogg\libOOOgg;..\..\..\helper\libfishsound\include;..\..\..\helper\libfishsound\win32;..\..\..\..\core\directshow\dsfSeeking"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFVORBISENCODER_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="2"
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeInputPin.cpp 2004-07-04 19:25:52 UTC (rev 6980)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeInputPin.cpp 2004-07-04 19:49:17 UTC (rev 6981)
@@ -49,10 +49,9 @@
//aadDebug.open("c:\\aadec.log", ios_base::out);
mAcceptableMediaType = inAcceptMediaType;
mStreamLock = new CCritSec;
+
IMediaSeeking* locSeeker = NULL;
this->NonDelegatingQueryInterface(IID_IMediaSeeking, (void**)&locSeeker);
-
-
mOutputPin->SetDelegate(locSeeker);
}
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeInputPin.cpp 2004-07-04 19:25:52 UTC (rev 6980)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeInputPin.cpp 2004-07-04 19:49:17 UTC (rev 6981)
@@ -43,9 +43,33 @@
{
//debugLog.open("C:\\temp\\aaein.log", ios_base::out);
//ConstructCodec();
+
+ //Set the seek delegate... make the outpin pin send stuff to this pin.
+ IMediaSeeking* locSeeker = NULL;
+ this->NonDelegatingQueryInterface(IID_IMediaSeeking, (void**)&locSeeker);
+ mOutputPin->SetDelegate(locSeeker);
+
+}
+
+STDMETHODIMP AbstractAudioEncodeInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+{
+ if (riid == IID_IMediaSeeking) {
+ *ppv = (IMediaSeeking*)this;
+ ((IUnknown*)*ppv)->AddRef();
+ return NOERROR;
+ }
+
+ return CBaseInputPin::NonDelegatingQueryInterface(riid, ppv);
+}
+
+HRESULT AbstractAudioEncodeInputPin::CompleteConnect (IPin *inReceivePin) {
+ //CAutoLock locLock(mFilterLock);
+ IMediaSeeking* locSeeker = NULL;
+ inReceivePin->QueryInterface(IID_IMediaSeeking, (void**)&locSeeker);
+ SetDelegate(locSeeker);
+ return CBaseInputPin::CompleteConnect(inReceivePin);
}
-
AbstractAudioEncodeInputPin::~AbstractAudioEncodeInputPin(void)
{
//debugLog.close();
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeInputPin.h 2004-07-04 19:25:52 UTC (rev 6980)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeInputPin.h 2004-07-04 19:49:17 UTC (rev 6981)
@@ -37,13 +37,14 @@
//#include <fstream>
//
//using namespace std;
+#include "BasicSeekable.h"
class AbstractAudioEncodeOutputPin;
class AbstractAudioEncodeFilter;
class ABS_AUDIO_ENC_API AbstractAudioEncodeInputPin
: public CBaseInputPin
- //, public BasicSeekable
+ , public BasicSeekable
{
public:
@@ -55,8 +56,10 @@
static const signed short SINT_MAX = 32767;
static const signed short SINT_MIN = -32768;
+ //COM Setup
+ DECLARE_IUNKNOWN
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
-
//PURE VIRTUALS
virtual long encodeData(unsigned char* inBuf, long inNumBytes) = 0;
@@ -64,6 +67,7 @@
virtual void DestroyCodec() = 0;
+ virtual HRESULT CompleteConnect (IPin *inReceivePin);
STDMETHODIMP Receive(IMediaSample *pSample);
virtual HRESULT CheckMediaType(const CMediaType *inMediaType);
virtual HRESULT GetMediaType(int inPosition, CMediaType *outMediaType);
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp 2004-07-04 19:25:52 UTC (rev 6980)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp 2004-07-04 19:49:17 UTC (rev 6981)
@@ -48,7 +48,15 @@
delete mDataQueue;
}
+STDMETHODIMP AbstractAudioEncodeOutputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv) {
+ if (riid == IID_IMediaSeeking) {
+ *ppv = (IMediaSeeking*)this;
+ ((IUnknown*)*ppv)->AddRef();
+ return NOERROR;
+ }
+ return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv);
+}
HRESULT AbstractAudioEncodeOutputPin::DecideBufferSize(IMemAllocator* inAllocator, ALLOCATOR_PROPERTIES* inPropertyRequest) {
//FIX::: Abstract this out properly
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.h 2004-07-04 19:25:52 UTC (rev 6980)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.h 2004-07-04 19:49:17 UTC (rev 6981)
@@ -31,13 +31,18 @@
#pragma once
+#include "BasicSeekable.h"
class AbstractAudioEncodeFilter;
class ABS_AUDIO_ENC_API AbstractAudioEncodeOutputPin
: public CBaseOutputPin
+ , public BasicSeekable
{
public:
+ //COM Setup
+ DECLARE_IUNKNOWN
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
AbstractAudioEncodeOutputPin(AbstractAudioEncodeFilter* inParentFilter, CCritSec* inFilterLock, CHAR* inObjectName, LPCWSTR inPinDisplayName, CMediaType* inOutputMediaType);
virtual ~AbstractAudioEncodeOutputPin(void);
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/dsfAbstractAudioEncoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/dsfAbstractAudioEncoder.vcproj 2004-07-04 19:25:52 UTC (rev 6980)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/dsfAbstractAudioEncoder.vcproj 2004-07-04 19:49:17 UTC (rev 6981)
@@ -19,7 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\dsfSeeking"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFABSTRACTAUDIOENCODER_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
@@ -73,7 +73,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
- AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\dsfSeeking"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFABSTRACTAUDIOENCODER_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="2"
More information about the commits
mailing list