//------------------------------------------------------------------------------ // Fichero: VMRCapture.h // //------------------------------------------------------------------------------ #ifndef VMRCAPTURE_H #define VMRCAPTURE_H #include "Base.h" #include "VMRAllocator.h" #include "Control.h" class CVMRCapture { public: CVMRCapture() { m_bOk = false; } virtual ~CVMRCapture() { End(); } bool Init (); void End (); bool IsOk () const { return m_bOk; } void Draw (CDisplayDevice *pDD); private: bool BindFilter (IBaseFilter **pFilter); HRESULT StartGraph (); HRESULT SetAllocatorPresenter(CComPtr filter); void CloseGraph (); private: bool m_bOk; CAllocator *m_pAllocator; DWORD_PTR m_userId; // DirectShow interfaces CComPtr m_graph; CComPtr m_filter; CComPtr m_filterCapture; CComPtr m_mediaControl; CComPtr m_allocator; CComPtr m_pCamOutPin; }; #endif