// // Created by Matthew on 2025/3/4. // #ifndef MICROPHOTO_VENDORCTRL_H #define MICROPHOTO_VENDORCTRL_H #include #include #include #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& 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