00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include <atlbase.h>
00025 #include <atlcoll.h>
00026 #include <afxtempl.h>
00027 #include "..\BaseSplitter\BaseSplitter.h"
00028
00029 class CAviFile;
00030
00031 class CAviSplitterOutputPin : public CBaseSplitterOutputPin
00032 {
00033 public:
00034 CAviSplitterOutputPin(CArray<CMediaType>& mts, LPCWSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr);
00035
00036 HRESULT CheckConnect(IPin* pPin);
00037 };
00038
00039 [uuid("9736D831-9D6C-4E72-B6E7-560EF9181001")]
00040 class CAviSplitterFilter : public CBaseSplitterFilter
00041 {
00042 CAutoVectorPtr<DWORD> m_tFrame;
00043
00044 protected:
00045 CAutoPtr<CAviFile> m_pFile;
00046 HRESULT CreateOutputs(IAsyncReader* pAsyncReader);
00047
00048 bool DemuxInit();
00049 void DemuxSeek(REFERENCE_TIME rt);
00050 bool DemuxLoop();
00051
00052 HRESULT ReIndex(__int64 end, UINT64* pSize);
00053
00054 public:
00055 CAviSplitterFilter(LPUNKNOWN pUnk, HRESULT* phr);
00056
00057 DECLARE_IUNKNOWN;
00058 STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
00059
00060
00061
00062 STDMETHODIMP GetDuration(LONGLONG* pDuration);
00063
00064
00065 GUID m_timeformat;
00066 STDMETHODIMP IsFormatSupported(const GUID* pFormat);
00067 STDMETHODIMP GetTimeFormat(GUID* pFormat);
00068 STDMETHODIMP IsUsingTimeFormat(const GUID* pFormat);
00069 STDMETHODIMP SetTimeFormat(const GUID* pFormat);
00070 STDMETHODIMP GetStopPosition(LONGLONG* pStop);
00071 STDMETHODIMP ConvertTimeFormat(LONGLONG* pTarget, const GUID* pTargetFormat, LONGLONG Source, const GUID* pSourceFormat);
00072 STDMETHODIMP GetPositions(LONGLONG* pCurrent, LONGLONG* pStop);
00073
00074 HRESULT SetPositionsInternal(void* id, LONGLONG* pCurrent, DWORD dwCurrentFlags, LONGLONG* pStop, DWORD dwStopFlags);
00075
00076
00077
00078 STDMETHODIMP GetKeyFrameCount(UINT& nKFs);
00079 STDMETHODIMP GetKeyFrames(const GUID* pFormat, REFERENCE_TIME* pKFs, UINT& nKFs);
00080 };
00081
00082 [uuid("CEA8DEFF-0AF7-4DB9-9A38-FB3C3AEFC0DE")]
00083 class CAviSourceFilter : public CAviSplitterFilter
00084 {
00085 public:
00086 CAviSourceFilter(LPUNKNOWN pUnk, HRESULT* phr);
00087 };