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.

67 lines
1.9 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __OBJECT_CAMERA_PTZ_HEADERS__
  2. #ifndef NO_PTZ_CAMERAS
  3. #define __OBJECT_CAMERA_PTZ_HEADERS__
  4. #ifndef __linux__
  5. #include <WinSock2.h>
  6. #endif
  7. #include "../base/basicCameraPTZ.h"
  8. #ifndef NO_VIDEO_FILTERS
  9. #include "../../alg/video/bdetect/blobDetector.h"
  10. #include "../../alg/video/optical/opticalFlow.h"
  11. #include "../../alg/video/surf/surf.h"
  12. #include "../../alg/video/vlfeat/vlfeat.h"
  13. #include "../../alg/video/vmd/motionDetector.h"
  14. #endif
  15. #include "../../data/media/video/videoAVLIBSource.h"
  16. #ifndef NO_GUI
  17. #include "../../data/media/mediaVideoSourceManager.h"
  18. #endif
  19. #include "../../data/protocol/protocolPTZ_PELCO.h"
  20. #include "../../data/protocol/protocolPTZ_VISCA.h"
  21. #include "../../hardware/uart/serialPort.h"
  22. #ifndef NO_ONVIF_CAMERAS
  23. #include "../../data/protocol/protocolPTZ_ONVIF.h"
  24. #endif
  25. #include <libconfig.h>
  26. #define PELCO_ADTER_PACK_DELAY 60 // Milliseconds
  27. class objectCameraPTZ : public basicCameraPTZ
  28. {
  29. private:
  30. basicLogCollection * m_pLog;
  31. uint32_t m_nActivityCounter;
  32. protected:
  33. void m_fThreadProc(void);
  34. public:
  35. explicit objectCameraPTZ(config_setting_t * Settings = NULL);
  36. virtual ~objectCameraPTZ();
  37. bool create(void);
  38. bool stop(void);
  39. bool create(SOURCE_INFO * SI);
  40. void cmdBeginPanLeft(float Speed = 0.f);
  41. void cmdBeginPanRight(float Speed = 0.f);
  42. void cmdEndManualPan(void);
  43. void cmdBeginTiltUp(float Speed = 0.f);
  44. void cmdBeginTiltDown(float Speed = 0.f);
  45. void cmdEndManualTilt(void);
  46. void cmdBeginZoomWide(float Speed = 0.f);
  47. void cmdBeginZoomTele(float Speed = 0.f);
  48. void cmdEndManualZoom(void);
  49. void cmdGoPTZ(float Pan, float Tilt, float Zoom, float Speed = 1.f);
  50. void cmdGoWGS84PTZ(float Lon, float Lat, float Range, float Speed = 1.f);
  51. void cmdGoAbsolutePTZ(float Tetta, float Fi, float Range, float Speed = 1.f);
  52. virtual void dispatchEvent(basicEvent * Evt);
  53. virtual void updateSettings(void);
  54. };
  55. #endif
  56. #endif