Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.1 KiB

  1. /*****************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 2000
  4. *
  5. * TITLE: CWiaVideo.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: OrenR
  10. *
  11. * DATE: 2000/10/25
  12. *
  13. * DESCRIPTION: Implements preview graph for capture still images
  14. *
  15. *****************************************************************************/
  16. #ifndef _CWIAVIDEO_H_
  17. #define _CWIAVIDEO_H_
  18. #include "prvgrph.h"
  19. #include "resource.h" // main symbols
  20. class CWiaVideo :
  21. public IWiaVideo,
  22. public CComObjectRoot,
  23. public CComCoClass<CWiaVideo,&CLSID_WiaVideo>
  24. {
  25. public:
  26. BEGIN_COM_MAP(CWiaVideo)
  27. COM_INTERFACE_ENTRY(IWiaVideo)
  28. END_COM_MAP()
  29. //DECLARE_NOT_AGGREGATABLE(CWiaVideo)
  30. // Remove the comment from the line above if you don't want your object to
  31. // support aggregation.
  32. DECLARE_REGISTRY_RESOURCEID(IDR_WiaVideo)
  33. CWiaVideo();
  34. virtual ~CWiaVideo();
  35. //
  36. // IWiaVideo Properties and Methods.
  37. //
  38. // Properties
  39. //
  40. STDMETHOD(get_PreviewVisible)(BOOL *pPreviewVisible);
  41. STDMETHOD(put_PreviewVisible)(BOOL bPreviewVisible);
  42. STDMETHOD(get_ImagesDirectory)(BSTR *pbstrImageDirectory);
  43. STDMETHOD(put_ImagesDirectory)(BSTR bstrImageDirectory);
  44. //
  45. // Methods
  46. //
  47. STDMETHOD(CreateVideoByWiaDevID)(BSTR bstrWiaDeviceID,
  48. HWND hwndParent,
  49. BOOL bStretchToFitParent,
  50. BOOL bAutoBeginPlayback);
  51. STDMETHOD(CreateVideoByDevNum)(UINT uiDeviceNumber,
  52. HWND hwndParent,
  53. BOOL bStretchToFitParent,
  54. BOOL bAutoBeginPlayback);
  55. STDMETHOD(CreateVideoByName)(BSTR bstrFriendlyName,
  56. HWND hwndParent,
  57. BOOL bStretchToFitParent,
  58. BOOL bAutoBeginPlayback);
  59. STDMETHOD(DestroyVideo)();
  60. STDMETHOD(Play)();
  61. STDMETHOD(Pause)();
  62. STDMETHOD(TakePicture)(BSTR *pbstrNewImageFilename);
  63. STDMETHOD(ResizeVideo)(BOOL bStretchToFitParent);
  64. STDMETHOD(GetCurrentState)(WIAVIDEO_STATE *pbCurrentState);
  65. //
  66. // Misc Functions
  67. //
  68. ///////////////////////////////
  69. // ProcessAsyncImage
  70. //
  71. // Called by CPreviewGraph
  72. // when user presses hardware
  73. // button and it is delivered to
  74. // Still Pin.
  75. //
  76. HRESULT ProcessAsyncImage(const CSimpleString *pNewImage);
  77. private:
  78. //
  79. // Preview Graph object that does all video related activities.
  80. //
  81. CPreviewGraph m_PreviewGraph;
  82. //
  83. // WiaLink object that handles all the WIA related activities
  84. // enabling this object to communicate with WIA
  85. //
  86. CWiaLink m_WiaLink;
  87. CRITICAL_SECTION m_csLock;
  88. BOOL m_bInited;
  89. };
  90. #endif // _CWIAVIDEO_H_