更新了缺省相机
This commit is contained in:
parent
9a04de43dc
commit
6ca2ad9ff1
@ -5,8 +5,8 @@
|
||||
#pragma once
|
||||
#include "DaHua.h"
|
||||
#include "HikVision.h"
|
||||
#include "YuShi.h"
|
||||
#include "None.h"
|
||||
#include "YuShi.h"
|
||||
#include <string>
|
||||
|
||||
namespace CC {
|
||||
@ -32,4 +32,9 @@ static Camera::Ptr make_yushi_camera(const std::string &ip,
|
||||
return std::static_pointer_cast<Camera>(camera);
|
||||
}
|
||||
|
||||
static Camera::Ptr make_no_sdk_camera() {
|
||||
None::Ptr camera = None::make();
|
||||
return std::static_pointer_cast<Camera>(camera);
|
||||
}
|
||||
|
||||
} // namespace CC
|
||||
|
@ -18,21 +18,20 @@ private:
|
||||
public:
|
||||
typedef std::shared_ptr<None> Ptr;
|
||||
|
||||
static Ptr make(const std::string &ip,
|
||||
const std::string &username,
|
||||
const std::string &password) {
|
||||
static Ptr make(const std::string &ip = "",
|
||||
const std::string &username = "",
|
||||
const std::string &password = "") {
|
||||
return std::make_shared<None>(ip, username, password);
|
||||
}
|
||||
|
||||
None() = delete;
|
||||
|
||||
None(std::string ip, std::string username, std::string password)
|
||||
explicit None(std::string ip = "", std::string username = "", std::string password = "")
|
||||
: ip_(std::move(ip)), username_(std::move(username)), password_(std::move(password)) {}
|
||||
|
||||
~None() override = default;
|
||||
|
||||
public:
|
||||
|
||||
bool usable() override {
|
||||
return false;
|
||||
}
|
||||
@ -103,19 +102,43 @@ public:
|
||||
|
||||
private:
|
||||
PTZ_INFO::Ptr _get_ptz_range() override {
|
||||
return nullptr;
|
||||
PTZ_INFO::Ptr ptz = PTZ_INFO::make();
|
||||
ptz->moving = false;
|
||||
ptz->pan->max = 0;
|
||||
ptz->pan->min = 0;
|
||||
ptz->tilt->max = 0;
|
||||
ptz->tilt->min = 0;
|
||||
ptz->zoom->max = 0;
|
||||
ptz->zoom->min = 0;
|
||||
return ptz;
|
||||
}
|
||||
|
||||
PTZ_INFO::Ptr _get_ptz() override {
|
||||
return nullptr;
|
||||
PTZ_INFO::Ptr ptz = PTZ_INFO::make();
|
||||
ptz->moving = false;
|
||||
ptz->pan->data = 0;
|
||||
ptz->tilt->data = 0;
|
||||
ptz->zoom->data = 0;
|
||||
return ptz;
|
||||
}
|
||||
|
||||
FOV_INFO::Ptr _get_fov_range() override {
|
||||
return nullptr;
|
||||
FOV_INFO::Ptr fov = FOV_INFO::make();
|
||||
fov->horizontal->max = 60;
|
||||
fov->horizontal->min = 60;
|
||||
fov->vertical->max = 45;
|
||||
fov->vertical->min = 45;
|
||||
fov->diagonal->max = 75;
|
||||
fov->diagonal->min = 75;
|
||||
return fov;
|
||||
}
|
||||
|
||||
FOV_INFO::Ptr _get_fov() override {
|
||||
return nullptr;
|
||||
FOV_INFO::Ptr fov = FOV_INFO::make();
|
||||
fov->horizontal->data = 60;
|
||||
fov->vertical->data = 45;
|
||||
fov->diagonal->data = 75;
|
||||
return fov;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user