修复编译错误

PtzNew
Matthew 3 months ago
parent 6f56bf0fe3
commit d206a59d9a

@ -2,9 +2,12 @@
// Created by Matthew on 2025/3/4.
//
#include "YuShiCtrl.h"
#include "HangYuCtrl.h"
#include "netcamera.h"
#include "httpclient.h"
#include <cstring>
HangYuCtrl::~HangYuCtrl()
{
@ -17,7 +20,7 @@ bool HangYuCtrl::SetOsd()
void HangYuCtrl::EnableOsd(bool enable)
{
return false;
// return false;
}
std::string HangYuCtrl::GetStreamingUrl(uint8_t channel)
@ -35,7 +38,7 @@ std::string HangYuCtrl::GetStreamingUrl(uint8_t channel)
}
resData.push_back(0);
const char* start = strstr(&resData[0], "<RTSPURI>");
const char* start = strstr((const char*)&resData[0], "<RTSPURI>");
if (start == NULL)
{
return "";
@ -84,4 +87,9 @@ bool HangYuCtrl::UpdateTime(time_t ts)
bool HangYuCtrl::TakePhoto(std::vector<uint8_t>& img)
{
return false;
}
bool HangYuCtrl::TakeVideo(uint32_t duration, std::string path)
{
}

@ -3,7 +3,7 @@
//
#include "VendorCtrl.h"
VendorCtrl::VendorCtrl(const std::string& ip, const std::string& userName, const std::string& password) :
VendorCtrl::VendorCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle) :
m_ip(ip), m_userName(userName), m_password(password), m_channel(channel), m_netHandle(netHandle)
{
}

@ -12,7 +12,7 @@
class VendorCtrl {
public:
VendorCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle);
virtual ~VendorCtrl() = 0;
virtual ~VendorCtrl() {}
virtual bool SetOsd() = 0;
virtual void EnableOsd(bool enable) = 0;

@ -17,10 +17,10 @@ bool YuShiCtrl::SetOsd()
void YuShiCtrl::EnableOsd(bool enable)
{
return false;
// return false;
}
std::string GetStreamingUrl(uint8_t channel)
std::string YuShiCtrl::GetStreamingUrl(uint8_t channel)
{
// /LAPI/V1.0/Channels/<ID>/Media/Video/Streams/<ID>/LiveStreamURL?TransType=<Tran
// sType>&TransProtocol=<TransProtocol>
@ -29,12 +29,12 @@ std::string GetStreamingUrl(uint8_t channel)
bool YuShiCtrl::UpdateTime(time_t ts)
{
/LAPI/V1.0/System/Time
// /LAPI/V1.0/System/Time
Json::Value jsonData(Json::objectValue);
jsonData["TimeZone"] = "GMT+08:00";
jsonData["DeviceTime"] = ts;
jsonData["DeviceTime"] = (int64_t)ts;
jsonData["DateFormat"] = 0; // YYYY-MM-DD
jsonData["HourFormat"] = 1; // 24H
@ -44,4 +44,9 @@ bool YuShiCtrl::UpdateTime(time_t ts)
bool YuShiCtrl::TakePhoto(std::vector<uint8_t>& img)
{
return false;
}
bool YuShiCtrl::TakeVideo(uint32_t duration, std::string path)
{
}
Loading…
Cancel
Save