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.

89 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: 31/10/2001
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: DSVideoProcessor.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of DSVideoProcessor.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __VIDEO__PROCESSOR__H__INCLUDED__
  15. #define __VIDEO__PROCESSOR__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include <dshow.h>
  20. #include <Qedit.h>
  21. #include "DSSampleGrabberCB.h"
  22. #include "DDVideoWnd.h"
  23. #include "SymbolData.h"
  24. #include "..\..\LgLib\Thread.h"
  25. #include <afxmt.h>
  26. class CDSVideoProcessor : public CThread
  27. {
  28. friend class CDSConfiguration;
  29. friend class CDSVideoWnd;
  30. friend class CDDVideoWnd;
  31. friend class CDSSampleGrabberCB;
  32. public:
  33. CDSVideoProcessor();
  34. virtual ~CDSVideoProcessor();
  35. public:
  36. BOOL Create( CDSConfiguration* pDirectShow );
  37. void Destroy();
  38. public:
  39. BOOL Capture( LPBITMAPINFO pBitmapInfo, LPBYTE pBytes );
  40. BOOL SetVideoStandart( long VideoStandard );
  41. HBITMAP CaptureDIB();
  42. BOOL SwitchVideo( int nInputPin );
  43. BOOL GetDirectInput( PLONG pInput );
  44. BOOL SetDirectOutput( LONG nIndex, BOOL bOn );
  45. void ActivateWnd( LONG nIndex );
  46. protected:
  47. void FindMembers( IBaseFilter* );
  48. BOOL InitSwitch();
  49. BOOL ConnectVideoWnd( IVideoWindow** ppVideoWindow );
  50. BOOL ConnectVideoWnd( CDDVideoWnd *pVideoWnd, int nInput = -1 );
  51. // BOOL DrawText( LPCTSTR pText, LPBITMAPINFO pBitmapInfo, LPBYTE pBytes, COLORREF dwColor );
  52. protected:
  53. void OnVideoSample();
  54. virtual DWORD ThreadProc();
  55. protected:
  56. void ProcessVideoSample();
  57. IVideoWindow *m_pVideoWindow;
  58. IAMCrossbar *m_pAMCrossbar;
  59. IAMVideoProcAmp *m_pAMVideoProcAmp;
  60. IAMAnalogVideoDecoder *m_pAMAnalogVideoDecoder;
  61. ISampleGrabber *m_pSampleGrabber;
  62. CDSSampleGrabberCB *m_pSampleGrabberCB;
  63. VIDEOINFOHEADER *m_pVideoHeader;
  64. LONG *m_pInputPin;
  65. LONG m_nInputPinCount;
  66. LONG m_nOutputPin;
  67. enum { VT_NONE_VIDEO, VT_LIVE_VIDEO, VT_MULTIPLEX_VIDEO } m_nVideoType;
  68. CDDVideoWnd **m_ppPseudoVideoWnd;
  69. BOOL *m_pbPseudoVideoWnd;
  70. LONG m_nPseudoVideoWnd;
  71. LONG m_nPseudoCaptureLoop;
  72. LONG m_nPseudoLastInput;
  73. DWORD m_dwPseudoLastTime;
  74. CCriticalSection m_CriticalSection;
  75. HANDLE m_hEventVideoSample;
  76. };
  77. #endif