128 lines
3.3 KiB
C
128 lines
3.3 KiB
C
|
|
#ifndef CCAMINFO_H
|
|||
|
|
#define CCAMINFO_H
|
|||
|
|
|
|||
|
|
#include <string>
|
|||
|
|
#include <map>
|
|||
|
|
#include <vector>
|
|||
|
|
#include "CPresetInfo.h"
|
|||
|
|
class CCamInfo
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
enum PtzCmd {
|
|||
|
|
Left,
|
|||
|
|
Right,
|
|||
|
|
//open/read/seek network stream error. value must be less then ResourceError because of correct_error_by_ffmpeg
|
|||
|
|
NetworkError, // all above and before NoError are NetworkError
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
CCamInfo();
|
|||
|
|
|
|||
|
|
std::string pointTag() const;
|
|||
|
|
void setPointTag(const std::string &pointTag);
|
|||
|
|
|
|||
|
|
std::string camTag() const;
|
|||
|
|
void setCamTag(const std::string &camTag);
|
|||
|
|
|
|||
|
|
std::string presetTag() const;
|
|||
|
|
void setPresetTag(const std::string &presetTag);
|
|||
|
|
|
|||
|
|
std::string ip() const;
|
|||
|
|
void setIp(const std::string &ip);
|
|||
|
|
|
|||
|
|
int getChan_no() const;
|
|||
|
|
void setChan_no(int chan_no);
|
|||
|
|
|
|||
|
|
std::string description() const;
|
|||
|
|
void setDescription(const std::string &description);
|
|||
|
|
|
|||
|
|
std::string username() const;
|
|||
|
|
void setUsername(const std::string &username);
|
|||
|
|
|
|||
|
|
std::string password() const;
|
|||
|
|
void setPassword(const std::string &password);
|
|||
|
|
|
|||
|
|
std::string serviceAddr() const;
|
|||
|
|
|
|||
|
|
std::string mediaAddr() const;
|
|||
|
|
void setMediaAddr(const std::string &mediaAddr);
|
|||
|
|
|
|||
|
|
std::string ptzAddr() const;
|
|||
|
|
void setPtzAddr(const std::string &ptzAddr);
|
|||
|
|
|
|||
|
|
std::string recordSearchAddr() const;
|
|||
|
|
void setRecordSearchAddr(const std::string &recordSearchAddr);
|
|||
|
|
|
|||
|
|
std::string replayAddr() const;
|
|||
|
|
void setReplayAddr(const std::string &replayAddr);
|
|||
|
|
|
|||
|
|
bool isStreamEnabled() const;
|
|||
|
|
void setIsStreamEnabled(bool isStreamEnabled);
|
|||
|
|
|
|||
|
|
bool isPtzEnabled() const;
|
|||
|
|
void setIsPtzEnabled(bool isPtzEnabled);
|
|||
|
|
|
|||
|
|
bool isReplayEnabled() const;
|
|||
|
|
void setIsReplayEnabled(bool isReplayEnabled);
|
|||
|
|
|
|||
|
|
std::vector<CPresetInfo> presets() const;
|
|||
|
|
void setPresets(const std::vector<CPresetInfo> &presets);
|
|||
|
|
void addPreset(const std::string &presetTag_,
|
|||
|
|
const std::string &presetToken_,
|
|||
|
|
const std::string &presetDesc_);
|
|||
|
|
|
|||
|
|
bool getPresetToken(const std::string &preset_tag, std::string &outToken);
|
|||
|
|
bool getPresetDesc(const std::string &preset_tag, std::string &outDesc);
|
|||
|
|
//< onvif 相关的接口
|
|||
|
|
/**
|
|||
|
|
* @brief getOnvifArgs 通过onvif获取相关的参数
|
|||
|
|
*
|
|||
|
|
* 参数 m_streamRtspAddr和m_replayRtspAddr以及m_ptzAddr,和直播,回放和控制使能相关的信息。
|
|||
|
|
* @return 0 -成功 1-失败
|
|||
|
|
*/
|
|||
|
|
int getOnvifArgs();
|
|||
|
|
|
|||
|
|
std::string getStreamRtspAddr() const;
|
|||
|
|
std::string getReplayRtspAddr() const;
|
|||
|
|
|
|||
|
|
bool continuousMove(int cmd, double cmd_speed);
|
|||
|
|
bool stopMove();
|
|||
|
|
bool gotoPreset(const std::string & preset_tag);
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
void setServiceAddr(const std::string &serviceAddr);
|
|||
|
|
|
|||
|
|
|
|||
|
|
std::string m_pointTag;
|
|||
|
|
std::string m_camTag;
|
|||
|
|
std::string m_presetTag;
|
|||
|
|
std::vector<CPresetInfo> m_presets;
|
|||
|
|
int m_chan_no;
|
|||
|
|
std::string m_ip;
|
|||
|
|
std::string m_description;
|
|||
|
|
std::string m_username;
|
|||
|
|
std::string m_password;
|
|||
|
|
|
|||
|
|
std::string m_serviceAddr;
|
|||
|
|
std::string m_mediaAddr;
|
|||
|
|
std::string m_ptzAddr;
|
|||
|
|
std::string m_recordSearchAddr;
|
|||
|
|
std::string m_replayAddr;
|
|||
|
|
std::string m_mediaProfileToken;
|
|||
|
|
std::string m_recordToken;
|
|||
|
|
|
|||
|
|
std::string m_streamRtspAddr;
|
|||
|
|
std::string m_replayRtspAddr;
|
|||
|
|
|
|||
|
|
|
|||
|
|
bool m_isStreamEnabled= true;
|
|||
|
|
bool m_isPtzEnabled=true;
|
|||
|
|
bool m_isReplayEnabled=true;
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif // CCAMINFO_H
|