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.

56 lines
1.4 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: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: DirectShowStream.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of DirectShowStream.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __DIRECT__SHOW__STREAM__H__INCLUDED__
  15. #define __DIRECT__SHOW__STREAM__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "..\Thread.h"
  20. #include "..\Templ.h"
  21. #include "..\LgLink.h"
  22. class CDirectShowSampleGrabberCB;
  23. class CDirectShowVideo;
  24. class CDirectShowStream :
  25. public CLgLinkP<CDirectShowStream,CDirectShowVideo>,
  26. public CLgLinkSP<CDirectShowStream,CDirectShowSampleGrabberCB>
  27. {
  28. protected:
  29. CDirectShowStream();
  30. virtual ~CDirectShowStream();
  31. protected:
  32. BOOL Create( ISampleGrabber *pSampleGrabber );
  33. void Destroy();
  34. protected:
  35. friend class CDirectShowSampleGrabberCB;
  36. virtual void OnVideoSample( double SampleTime, BYTE *pBuffer, long BufferLen ) = 0;
  37. public:
  38. BOOL Link( CDirectShowVideo *pDirectShowVideo, INT nSource );
  39. protected:
  40. BOOL InitCapturer();
  41. protected:
  42. ISampleGrabber *m_pSampleGrabber;
  43. CDirectShowSampleGrabberCB *m_pDirectShowSampleGrabberCB;
  44. BITMAPINFOHEADER *m_pBitmapInfoHeader;
  45. };
  46. #endif