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.

79 lines
2.6 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Dr.Frucht Systems Ltd.
  3. // Copyright � 2000-2017. All Rights Reserved.
  4. // Version 2.0 6/11/2019
  5. // Last modification: 6/11/2019
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: rgooseIPCamera.h
  9. // AUTHOR: gagua
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of rgooseIPCamera.h
  13. //----------------------------------------------------------------------------
  14. //
  15. #ifndef __ARGUS_PTZ_CAMERA_CTRL_HEADER__
  16. #define __ARGUS_PTZ_CAMERA_CTRL_HEADER__
  17. #include <vector>
  18. #include <queue>
  19. #include "rgooseCamera.h"
  20. #include "../components/base/basicThread.h"
  21. #include "../components/base/basicMutex.h"
  22. #include "../data/protocol/protocolPTZ.h"
  23. //https://www.ebay.com/itm/Professional-Rolling-Makeup-Case-Bulb-Mirror-Cosmetic-Artist-Dressing-Train-Case/233264525474
  24. //ffmpeg -i input.mp4 -af loudnorm=I=-23:LRA=7:tp=-2:print_format=json -f null -
  25. //ffmpeg -i input.mp4 -af loudnorm=I=-23:LRA=7:tp=-2:measured_I=-30:measured_LRA=1.1:measured_tp=-11 04:measured_thresh=-40.21:offset=-0.47 -ar 48k -y output.mp4
  26. typedef struct S_CAM_PTZ_CMD{
  27. uint8_t CMD;
  28. float PAN;
  29. float TILT;
  30. float ZOOM;
  31. }CAM_PTZ_CMD;
  32. typedef std::queue<CAM_PTZ_CMD *> CAM_PTZ_CMD_QUEUE;
  33. typedef enum E_CAM_WORKING_STATE{
  34. CAM_WS_INIIT = 0,
  35. CAM_WS_WHITE_BALLANCE = 1,
  36. CAM_WS_BACKLIGHT = 2,
  37. CAM_WS_AUTO_FOCUS = 3,
  38. CAM_WS_READY = 128,
  39. CAM_WS_END = 255
  40. }CAM_WORK_STATE;
  41. typedef enum E_CAM_PTZ_CMD{
  42. PTZ_STOP = 0,
  43. PTZ_MOVE = 1,
  44. PTZ_ABSOLUTE = 2
  45. }PTZ_CMD;
  46. class ARGUS_PTZCAM: public ARGUS_Camera, public basicThread {
  47. private:
  48. basicLogCollection * m_pLog;
  49. protocolPTZ * m_pProtocol;
  50. uint8_t m_bState;
  51. CAM_PTZ_CMD_QUEUE m_qCAM_CMD;
  52. basicMutex m_mQPROTECTOR;
  53. protected:
  54. virtual bool relativeMove( float PanSPD, float TiltSPD, float ZoomSPD );
  55. virtual bool relativeStop();
  56. virtual bool absoluteMove( float PanPOS, float TiltPOS, float ZoomPOS );
  57. virtual void m_fThreadProc( void );
  58. public:
  59. explicit ARGUS_PTZCAM( uint32_t id );
  60. ~ARGUS_PTZCAM();
  61. //bool create( );// CSTR ip, CSTR username, CSTR password );
  62. //virtual void dispatchEvent( EVENT_CONTAINER *Evt );
  63. virtual bool startService();
  64. //virtual bool stopService();
  65. };
  66. #endif