Msptrmvc.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:2k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4.     msptrmvc.cpp
  5. Abstract:
  6.     MSP base classes: declaration of video capture terminal.
  7. --*/
  8. #ifndef _MSPTRMVC_H_
  9. #define _MSPTRMVC_H_
  10.     
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CVideoCaptureTerminal
  13. class CVideoCaptureTerminal : 
  14.     public CSingleFilterStaticTerminal
  15. {
  16. public:
  17.     CVideoCaptureTerminal();
  18.     virtual ~CVideoCaptureTerminal();
  19. public:
  20.     static HRESULT CreateTerminal(
  21.         IN    CComPtr<IMoniker>    pMoniker,
  22.         IN    MSP_HANDLE           htAddress,
  23.         OUT   ITTerminal         **ppTerm
  24.         );
  25. // If we add any additional interfaces to this class then
  26. // we must uncomment and expand the following.
  27. //
  28. // BEGIN_COM_MAP(CVideoCaptureTerminal)
  29. //    COM_INTERFACE_ENTRY_CHAIN(CSingleFilterStaticTerminal)
  30. // END_COM_MAP()
  31. DECLARE_LOG_ADDREF_RELEASE(CVideoCaptureTerminal);
  32. private:
  33.     // CBaseTerminal required overrides 
  34.     virtual HRESULT AddFiltersToGraph();
  35.     virtual LONG CountOfMediaTypes()
  36.     {
  37.         return 1;
  38.     }
  39.     virtual DWORD GetSupportedMediaTypes(void)
  40.     {
  41.         return (DWORD) TAPIMEDIATYPE_VIDEO;
  42.     }
  43.     // Helper methods.
  44.     HRESULT CreateFilters();
  45.     HRESULT FindCapturePin();
  46. };
  47. inline 
  48. CVideoCaptureTerminal::CVideoCaptureTerminal(
  49.     )                                   
  50. {
  51.     m_TerminalDirection = TD_CAPTURE;
  52.     m_TerminalType = TT_STATIC;
  53. }
  54. #endif // _MSPTRMVC_H_