00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #pragma once
00033
00034 #include "BasicSeekable.h"
00035 class AbstractAudioEncodeFilter;
00036
00037 class ABS_AUDIO_ENC_API AbstractAudioEncodeOutputPin
00038 : public CBaseOutputPin
00039 , public BasicSeekable
00040
00041 {
00042 public:
00043
00044 DECLARE_IUNKNOWN
00045 STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
00046
00047 AbstractAudioEncodeOutputPin(AbstractAudioEncodeFilter* inParentFilter, CCritSec* inFilterLock, CHAR* inObjectName, LPCWSTR inPinDisplayName, CMediaType* inOutputMediaType);
00048 virtual ~AbstractAudioEncodeOutputPin(void);
00049
00050 virtual HRESULT DecideBufferSize(IMemAllocator* inAllocator, ALLOCATOR_PROPERTIES *inReqAllocProps);
00051 virtual HRESULT CheckMediaType(const CMediaType *inMediaType);
00052
00053
00054 virtual bool FillFormatBuffer(BYTE* inFormatBuffer) = 0;
00055 virtual unsigned long FormatBufferSize() = 0;
00056
00057 virtual HRESULT GetMediaType(int inPosition, CMediaType *outMediaType);
00058
00059
00060
00061 virtual HRESULT CompleteConnect (IPin *inReceivePin);
00062 virtual HRESULT DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
00063 virtual HRESULT DeliverEndOfStream(void);
00064 virtual HRESULT DeliverEndFlush(void);
00065 virtual HRESULT DeliverBeginFlush(void);
00066
00067 COutputQueue* mDataQueue;
00068 protected:
00069 HRESULT mHR;
00070 AbstractAudioEncodeFilter* mParentFilter;
00071 void FillMediaType(CMediaType* inMediaType);
00072
00073 CMediaType* mOutputMediaType;
00074
00075 static const int BUFF_SIZE = 65536;
00076 static const int BUFF_COUNT = 5;
00077
00078 };