- // ccdView.h : interface of the CCcdView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_CCDVIEW_H__0584CDAB_19F1_4561_8463_C7F39EA17A47__INCLUDED_)
- #define AFX_CCDVIEW_H__0584CDAB_19F1_4561_8463_C7F39EA17A47__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include <dshow.h>
- #include "EnumFilterDlg.h"
- #define ID_TIMER1 WM_USER+128
- #define WCBUFSIZE 20
- extern "C" const IID IID_DIVX;
- class CCcdView : public CView
- {
- protected: // create from serialization only
- CCcdView();
- DECLARE_DYNCREATE(CCcdView)
- // Attributes
- public:
- CCcdDoc* GetDocument();
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CCcdView)
- public:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CCcdView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CCcdView)
- afx_msg void OnUpdateMenuitemstart(CCmdUI* pCmdUI);
- afx_msg void OnUpdateMenuitemdmic(CCmdUI* pCmdUI);
- afx_msg void OnUpdateMenuitemdvideo(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemdmic();
- afx_msg void OnMenuitemdvideo();
- afx_msg void OnUpdateMenuitemstop(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemstop();
- afx_msg void OnMenuitemstart();
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnDestroy();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnMenuitemmsav();
- afx_msg void OnUpdateMenuitemmsav(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemmpeg3();
- afx_msg void OnUpdateMenuitemmpeg3(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemdivx();
- afx_msg void OnUpdateMenuitemdivx(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemshowfilter();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- HMENU m_hmApp;
- void ShowFilterProperPage(IBaseFilter *bfFilter);
- DWORD m_dwSenderThreadID;
- HANDLE m_hSenderThread;
- static DWORD __stdcall Sender(void *pParameter);
- WCHAR m_wcFName[WCBUFSIZE];
- int m_nCounter;
- bool m_bmsavCom;
- bool m_bdivmp4Com;
- bool m_baudioCom;
- IBaseFilter *m_piBFmsavCom;
- IBaseFilter *m_piBFdivmp4Com;
- IBaseFilter *m_piBFaudioCom;
- IFileSinkFilter *m_piFSFFile;
- IBaseFilter *m_piBFFile;
- void SetVideoWindow();
- int RetreiveFilter();
- bool CreateGraph();
- bool DestroyGraph();
- IGraphBuilder *m_piGBGraph;
- ICaptureGraphBuilder2 *m_piCGB2Builder;
- IBaseFilter *m_piBFCaptureSource;
- IBaseFilter *m_piBFAudioSource;
- IMediaControl *m_piMCCtrl;
- bool m_bVideo;
- bool m_bMIC;
- bool m_bStart;
- };
- #ifndef _DEBUG // debug version in ccdView.cpp
- inline CCcdDoc* CCcdView::GetDocument()
- { return (CCcdDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_CCDVIEW_H__0584CDAB_19F1_4561_8463_C7F39EA17A47__INCLUDED_)