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 #include "abstractVideodllstuff.h"
00034 #include "BasicSeekable.h"
00035 #include <fstream>
00036 using namespace std;
00037 class AbstractVideoDecodeFilter;
00038
00039 class ABS_VIDEO_DEC_API AbstractVideoDecodeOutputPin
00040 : public CBaseOutputPin
00041 , public BasicSeekable
00042 {
00043 public:
00044
00045 DECLARE_IUNKNOWN
00046 STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
00047 friend class AbstractVideoDecodeInputPin;
00048 AbstractVideoDecodeOutputPin(AbstractVideoDecodeFilter* inParentFilter, CCritSec* inFilterLock, CHAR* inObjectName, LPCWSTR inPinDisplayName);
00049 virtual ~AbstractVideoDecodeOutputPin(void);
00050
00051 virtual HRESULT DecideBufferSize(IMemAllocator* inAllocator, ALLOCATOR_PROPERTIES *inReqAllocProps);
00052 virtual HRESULT CheckMediaType(const CMediaType *inMediaType);
00053
00054
00055 virtual bool FillVideoInfoHeader(VIDEOINFOHEADER* inFormatBuffer) = 0;
00056
00057 virtual HRESULT GetMediaType(int inPosition, CMediaType *outMediaType);
00058
00059
00060 virtual HRESULT InitAllocator(IMemAllocator **ppAlloc);
00061 virtual HRESULT SetMediaType(const CMediaType *pmt);
00062
00063
00064 virtual HRESULT BreakConnect(void);
00065
00066
00067 virtual HRESULT CompleteConnect (IPin *inReceivePin);
00068 virtual HRESULT DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
00069 virtual HRESULT DeliverEndOfStream(void);
00070 virtual HRESULT DeliverEndFlush(void);
00071 virtual HRESULT DeliverBeginFlush(void);
00072
00073
00074
00075 COutputQueue* mDataQueue;
00076 protected:
00077 HRESULT mHR;
00078 AbstractVideoDecodeFilter* mParentFilter;
00079 void FillMediaType(CMediaType* inMediaType);
00080
00082
00083
00084
00085 static const int BUFF_SIZE = 65536;
00086 static const int BUFF_COUNT = 5;
00087
00088 };
00089
00090