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.

55 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: LgHWVideoCapture.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgHWVideoInput.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "LgHWVideoCamera.h"
  16. #include "LgHWVideoEngine.h"
  17. #include "LgHWVideoCapture.h"
  18. #include "LgHWVideoPin.h"
  19. #include "LgHWVideoSwitch.h"
  20. #include "LgHWVideoJob.h"
  21. CLgHWVideoCapture::CLgHWVideoCapture()
  22. {
  23. }
  24. CLgHWVideoCapture::~CLgHWVideoCapture()
  25. {
  26. Destroy();
  27. }
  28. BOOL CLgHWVideoCapture::Create()
  29. {
  30. // create video device with one video input
  31. return CLgHWVideoSwitch::Create( 1, 0 );
  32. }
  33. void CLgHWVideoCapture::Destroy()
  34. {
  35. // nessesary to call for prevent pure functions call
  36. CLgHWVideoSwitch::Destroy();
  37. }
  38. void CLgHWVideoCapture::OnHWVideoInputSample( CLgImageDIB* pDIB, INT nSampleID )
  39. {
  40. // lock connection
  41. CLgLocker Locker( &CaptureToCameraLinkSP::GetLock() );
  42. CLgHWVideoCamera *pCamera = *this;
  43. if( !pCamera )
  44. return;
  45. // pass sample to connected camera
  46. pCamera->OnHWVideoCameraSample( pDIB, nSampleID );
  47. }