Old fashion design for PC-104
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.

64 lines
1.7 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 01/12/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: LgDirectShowCaptureGraph.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of LgDirectShowCaptureGraph.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__DIRECT__SHOW__CAPTURE__GRAPH__H__INCLUDED__
  15. #define __LG__DIRECT__SHOW__CAPTURE__GRAPH__H__INCLUDED__
  16. #include "DirectShowStreamVideo.h"
  17. #define REGISTER_FILTERGRAPH
  18. class CLgDirectShowCaptureGraph
  19. {
  20. public:
  21. CLgDirectShowCaptureGraph();
  22. virtual ~CLgDirectShowCaptureGraph();
  23. public:
  24. BOOL Create();
  25. void Destroy();
  26. CDirectShowStreamVideo *CreateStream( LPWSTR pDisplayName );
  27. BOOL CreateStreamAll();
  28. public:
  29. BOOL SelectBestResolution( IBaseFilter *pFilter );
  30. public:
  31. BOOL Stop();
  32. BOOL Start();
  33. INT GetDirectShowStreamCount();
  34. CDirectShowStreamVideo *GetDirectShowStream( INT nStream );
  35. private:
  36. typedef struct VIDEO_STREAM_INFO
  37. {
  38. CDirectShowStreamVideo* pStream;
  39. WCHAR pDisplayName[MAX_PATH];
  40. }VIDEO_STREAM_INFO, *PVIDEO_STREAM_INFO;
  41. CLgArray<VIDEO_STREAM_INFO> m_StreamArray;
  42. private:
  43. ICaptureGraphBuilder2 *m_pCaptureGraphBuilder;
  44. IGraphBuilder *m_pGraphBuilder;
  45. IMediaControl *m_pMediaControl;
  46. #ifdef REGISTER_FILTERGRAPH
  47. private:
  48. static HRESULT AddGraphToRot( IUnknown *pUnkGraph, DWORD *pdwRegister );
  49. static void RemoveGraphFromRot( DWORD pdwRegister );
  50. private:
  51. DWORD m_dwGraphRegister;
  52. #endif
  53. };
  54. #endif