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.3 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: LgHWSiteVideoInput.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgHWSiteVideoInput.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "LgHWSiteVideoInput.h"
  16. #include "..\HWVideo\LgHWVideoSwitch.h"
  17. #include "..\HWVideo\LgHWVideoPin.h"
  18. CLgHWSiteVideoInput::CLgHWSiteVideoInput()
  19. {
  20. m_nSampleID = 0;
  21. m_bNeedSample = FALSE;
  22. }
  23. CLgHWSiteVideoInput::~CLgHWSiteVideoInput()
  24. {
  25. // importent to call for prevent pure functions call
  26. CLgHWVideoCapture::Destroy();
  27. CDirectShowVideo::Unlink();
  28. }
  29. void CLgHWSiteVideoInput::OnVideoSample( double SampleTime )
  30. {
  31. m_nSampleID++;
  32. if( !m_bNeedSample )
  33. return;
  34. m_bNeedSample = FALSE;
  35. // send sample
  36. OnHWVideoInputSample( &GetDirectShowDIB(), m_nSampleID );
  37. }
  38. BOOL CLgHWSiteVideoInput::HWVideoInputSampleGet( INT nSampleID )
  39. {
  40. if( nSampleID == m_nSampleID )
  41. {
  42. m_bNeedSample = TRUE;
  43. return TRUE;
  44. }
  45. // send sample
  46. OnHWVideoInputSample( &GetDirectShowDIB(), m_nSampleID );
  47. return TRUE;
  48. }