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.

83 lines
2.1 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: VideoPin.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of VideoPin.h
  13. //----------------------------------------------------------------------------
  14. // VideoPin.h: interface for the CVideoPin class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #if !defined(AFX_VIDEOPIN_H__609B3AE9_84DA_4F9E_9070_415C86E9DB2E__INCLUDED_)
  18. #define AFX_VIDEOPIN_H__609B3AE9_84DA_4F9E_9070_415C86E9DB2E__INCLUDED_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. class CVideoPin
  23. {
  24. public:
  25. CVideoPin();
  26. virtual ~CVideoPin();
  27. public:
  28. BOOL WayLock( CVideoPin *pEPin );
  29. BOOL WayCheck();
  30. void WayUnlock();
  31. private:
  32. void GraphClear();
  33. BOOL GraphSearch( CVideoPin* pEPin, int nCost );
  34. void GraphLock();
  35. public:
  36. virtual BOOL Connect( CVideoPin *pPin );
  37. protected:
  38. friend class CVideoDevice;
  39. void SetPinDir( int nPinDir ) { m_nPinDir = nPinDir; }
  40. int GetIndex() { return m_nIndex; }
  41. void SetVideoDevice( CVideoDevice *pVideoDevice, int nIndex ) { m_pVideoDevice = pVideoDevice; m_nIndex = nIndex; }
  42. public:
  43. void GetVideoDevice( CVideoDevice **ppVideoDevice, PINT pIndex ) { *ppVideoDevice = m_pVideoDevice; *pIndex = m_nIndex; }
  44. public:
  45. CVideoPin* GetCPin() { return m_pCPin; }
  46. virtual BOOL Associate( CVideoPin *pPin );
  47. CVideoPin* GetAPin() { return m_pAPin; }
  48. protected:
  49. void Lock() { m_bLock = TRUE; }
  50. void Unlock() { m_bLock = FALSE; }
  51. public:
  52. int TestConnection( CVideoPin *pOutputPin );
  53. BOOL IsLocked() { return m_bLock; }
  54. protected:
  55. int GetCost() { return m_nCost; }
  56. void SetCost( int nCost ) { m_nCost = nCost; }
  57. private:
  58. CVideoPin *m_pCPin;
  59. CVideoPin *m_pAPin;
  60. enum{ PD_INPUT, PD_OUTPUT };
  61. int m_nPinDir;
  62. BOOL m_bLock;
  63. int m_nCost;
  64. int m_nIndex;
  65. private:
  66. CVideoDevice *m_pVideoDevice;
  67. };
  68. #endif