home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / msptrmvc.h < prev    next >
C/C++ Source or Header  |  2000-02-01  |  2KB  |  84 lines

  1. /*++
  2.  
  3. Copyright (c) 1998-1999 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     msptrmvc.cpp
  8.  
  9. Abstract:
  10.  
  11.     MSP base classes: declaration of video capture terminal.
  12.  
  13. --*/
  14.  
  15.  
  16. #ifndef _MSPTRMVC_H_
  17. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  18. #define _MSPTRMVC_H_
  19.     
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CVideoCaptureTerminal
  22.  
  23. class CVideoCaptureTerminal : 
  24.     public CSingleFilterTerminal
  25. {
  26. public:
  27.  
  28.     CVideoCaptureTerminal();
  29.     virtual ~CVideoCaptureTerminal();
  30.  
  31. public:
  32.  
  33.     static HRESULT CreateTerminal(
  34.         IN    CComPtr<IMoniker>    pMoniker,
  35.         IN    MSP_HANDLE           htAddress,
  36.         OUT   ITTerminal         **ppTerm
  37.         );
  38.  
  39. // If we add any additional interfaces to this class then
  40. // we must uncomment and expand the following.
  41. //
  42. // BEGIN_COM_MAP(CVideoCaptureTerminal)
  43. //    COM_INTERFACE_ENTRY_CHAIN(CSingleFilterTerminal)
  44. // END_COM_MAP()
  45.  
  46. DECLARE_LOG_ADDREF_RELEASE(CVideoCaptureTerminal);
  47.  
  48. public:
  49.     CComPtr<IMoniker> m_pMoniker;
  50.  
  51. private:
  52.  
  53.     // CBaseTerminal required overrides 
  54.  
  55.     virtual HRESULT AddFiltersToGraph();
  56.  
  57.     virtual LONG CountOfMediaTypes()
  58.     {
  59.         return 1;
  60.     }
  61.  
  62.     virtual DWORD GetSupportedMediaTypes(void)
  63.     {
  64.         return (DWORD) TAPIMEDIATYPE_VIDEO;
  65.     }
  66.  
  67.     // Helper methods.
  68.     HRESULT CreateFilters();
  69.     HRESULT FindCapturePin();
  70. };
  71.  
  72.  
  73.  
  74. inline 
  75. CVideoCaptureTerminal::CVideoCaptureTerminal(
  76.     )                                   
  77. {
  78.     m_TerminalDirection = TD_CAPTURE;
  79.     m_TerminalType = TT_STATIC;
  80. }
  81.  
  82. #pragma option pop /*P_O_Pop*/
  83. #endif // _MSPTRMVC_H_
  84.