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.

74 lines
2.5 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: LgHWVideoCamera.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of LgHWVideoCamera.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__HW__VIDEO__CAMERA__H__INCLUDED__
  15. #define __LG__HW__VIDEO__CAMERA__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "..\Templ.h"
  20. #include "..\LgImageDIB.h"
  21. #include "LgHWVideoPin.h"
  22. #include "LgHWVideoSwitch.h"
  23. class CLgHWVideoJob;
  24. class CLgHWVideoEngine;
  25. class CLgHWVideoSwitch;
  26. class CLgHWVideoCapture;
  27. // video lines owner
  28. class CLgHWVideoCamera :
  29. public CLgHWVideoSwitch, // it is a switching device with one output
  30. public CLgLinkSP<CLgHWVideoCamera,CLgHWVideoCapture>, // for lock video capture during building and activating
  31. public CLgLinkP<CLgHWVideoCamera,CLgHWVideoPin>, // used for locking pins that are used in logical connection scheme
  32. public CLgLinkP<CLgHWVideoCamera,CLgHWVideoJob>, // holds all switching jobs
  33. public CLgLinkSP<CLgHWVideoCamera,CLgHWVideoEngine>
  34. {
  35. public:
  36. typedef CLgLinkSP<CLgHWVideoCamera,CLgHWVideoCapture> CameraToCaptureLinkSP;
  37. typedef CLgLinkP<CLgHWVideoCamera,CLgHWVideoPin> CameraToPinLinkP;
  38. typedef CLgLinkP<CLgHWVideoCamera,CLgHWVideoJob> CameraToJobLinkP;
  39. typedef CLgLinkSP<CLgHWVideoCamera,CLgHWVideoEngine> CameraToEngineLinkSP;
  40. public:
  41. CLgHWVideoCamera();
  42. virtual ~CLgHWVideoCamera();
  43. public:
  44. BOOL Create();
  45. void Destroy();
  46. public:
  47. // external access methods/events
  48. virtual BOOL HWVideoCameraActivate( BOOL bActivate );
  49. virtual void OnHWVideoCameraActivate( BOOL bActivate ) = 0;
  50. virtual BOOL HWVideoCameraSampleGet( INT nSampleID );
  51. virtual void OnHWVideoCameraSample( CLgImageDIB*, INT nSampleID ) = 0;
  52. public:
  53. CLgHWVideoPin *GetVideoPinOutput() { return SwitchToOutputLinkP::GetCount() ? SwitchToOutputLinkP::GetAt(0)->GetThis() : NULL; }
  54. private:
  55. BOOL GraphClear( CLgHWVideoPin *pPinInput, CLgHWVideoPin *pPinOutput );
  56. BOOL GraphSetCost( CLgHWVideoPin *pPinInput, CLgHWVideoPin *pPinOutput, INT nCost );
  57. BOOL GraphWayLock( CLgHWVideoPin *pPinInput, CLgHWVideoPin *pPinOutput );
  58. BOOL GraphWayUnlock();
  59. public:
  60. // no switching capabilities
  61. virtual BOOL HWVideoSwitchDeviceSwitch( INT nInput, INT nOutput ) { return FALSE; }
  62. };
  63. #endif