You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TermApp/app/src/main/cpp/netcamera/VendorCtrl.h

44 lines
1.2 KiB
C++

//
// Created by Matthew on 2025/3/4.
//
#ifndef MICROPHOTO_VENDORCTRL_H
#define MICROPHOTO_VENDORCTRL_H
#include <string>
#include <json/json.h>
#include <android/multinetwork.h>
#define LEFT_TOP 0
#define RIGHT_TOP 1
#define LEFT_BOTTOM 2
#define RIGHT_BOTTOM 3
class VendorCtrl {
public:
VendorCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
virtual ~VendorCtrl() {}
virtual bool SetOsd(uint8_t channel, std::string osd, uint8_t pos) = 0;
virtual void EnableOsd(bool enable, uint8_t channel) = 0;
virtual std::string GetStreamingUrl(uint8_t channel) = 0;
virtual bool UpdateTime(time_t ts) = 0;
virtual bool TakePhoto(std::vector<uint8_t>& img) = 0;
virtual bool TakeVideo(uint32_t duration, std::string path) = 0;
virtual bool HasAuthOnStreaming() const { return false; }
protected:
std::string CvtJSONToString(const Json::Value& data);
protected:
std::string m_ip;
std::string m_userName;
std::string m_password;
uint8_t m_channel;
net_handle_t m_netHandle;
};
#endif //MICROPHOTO_VENDORCTRL_H