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.
112 lines
3.5 KiB
112 lines
3.5 KiB
//----------------------------------------------------------------------------
|
|
// Dr.Frucht Systems Ltd.
|
|
// Copyright © 2000-2017. All Rights Reserved.
|
|
// Version 2.0 6/11/2019
|
|
// Last modification: 6/11/2019
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: rgooseIPCamera.h
|
|
// AUTHOR: gagua
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of rgooseIPCamera.h
|
|
//----------------------------------------------------------------------------
|
|
//
|
|
#ifndef __ARGUS_CAMERA_HEADER__
|
|
#define __ARGUS_CAMERA_HEADER__
|
|
|
|
#include <vector>
|
|
#include <queue>
|
|
#include "../components/base/basicThread.h"
|
|
#include "../components/base/basicMutex.h"
|
|
#include "../data/protocol/protocolPTZ.h"
|
|
#include "../components/base/basicEventHeap.h"
|
|
#include "rgooseDBConnector.h"
|
|
|
|
//https://www.ebay.com/itm/Professional-Rolling-Makeup-Case-Bulb-Mirror-Cosmetic-Artist-Dressing-Train-Case/233264525474
|
|
|
|
//ffmpeg -i input.mp4 -af loudnorm=I=-23:LRA=7:tp=-2:print_format=json -f null -
|
|
//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
|
|
|
|
#define CAM_CTRL_PROTO_VISCA 1
|
|
#define CAM_CTRL_PROTO_PELCO 2
|
|
#define CAM_CTRL_PROTO_ONVIF 3
|
|
#define CAM_CTRL_PROTO_PSIA 4
|
|
#define CAM_CTRL_PROTO_T28181 5
|
|
|
|
#define UART_TYPE_HARDWARE 1
|
|
#define UART_TYPE_SOL 2
|
|
|
|
typedef struct S_CAM_PTZ_CMD{
|
|
uint8_t CMD;
|
|
float PAN;
|
|
float TILT;
|
|
float ZOOM;
|
|
}CAM_PTZ_CMD;
|
|
|
|
typedef enum E_CAM_PTZ_CMD{
|
|
PTZ_STOP = 0,
|
|
PTZ_MOVE = 1,
|
|
PTZ_ABSOLUTE = 2
|
|
}PTZ_CMD;
|
|
|
|
typedef std::queue<CAM_PTZ_CMD *> CAM_PTZ_CMD_QUEUE;
|
|
|
|
typedef enum E_CAM_WORKING_STATE{
|
|
CAM_WS_INIT = 0,
|
|
CAM_WS_WHITE_BALLANCE = 1,
|
|
CAM_WS_BACKLIGHT = 2,
|
|
CAM_WS_AUTO_FOCUS = 3,
|
|
CAM_WS_INIT_GO_HOME = 4,
|
|
|
|
CAM_WS_READY = 128,
|
|
CAM_WS_END = 255
|
|
}CAM_WORK_STATE;
|
|
|
|
class ARGUS_Camera: public basicThread {
|
|
private:
|
|
basicLogCollection * m_pLog;
|
|
DBC_CAM_DATA m_sCamData;
|
|
basicPosition * m_pPosition;
|
|
basicEventHeap * m_pEvtHeap;
|
|
argusDBC * m_pDBC;
|
|
time_t m_tTimeTSeconds;
|
|
|
|
uint8_t m_bState;
|
|
bool m_bBusy;
|
|
|
|
float m_fMaxRange;
|
|
float m_fMinHFov;
|
|
float m_fMaxHFov;
|
|
float m_fMinVFov;
|
|
float m_fMaxVFov;
|
|
|
|
protocolPTZ * m_pProtocol;
|
|
basicTransport * m_pTransport;
|
|
|
|
CAM_PTZ_CMD_QUEUE m_qCAM_CMD;
|
|
basicMutex m_mQPROTECTOR;
|
|
|
|
|
|
/* Methotds Sutable to Control Camera */
|
|
bool relativeMove( float PanSPD, float TiltSPD, float ZoomSPD );
|
|
bool relativeStop();
|
|
bool absoluteMove( float PanPOS, float TiltPOS, float ZoomPOS );
|
|
|
|
protected:
|
|
bool inTheFOV( float lat, float lon, float alt );
|
|
bool lookAtWGS84( uint32_t TargetRefID, float lat, float lon, float alt );
|
|
|
|
|
|
void setBusy( bool Status );
|
|
|
|
virtual void m_fThreadProc( void );
|
|
public:
|
|
ARGUS_Camera();
|
|
~ARGUS_Camera();
|
|
bool create( uint32_t id );
|
|
};
|
|
|
|
typedef std::vector<ARGUS_Camera *> vectorARGUS_Cameras;
|
|
|
|
#endif
|