feat: support camera capture to livekit
This commit is contained in:
@ -5,6 +5,8 @@
|
||||
#include <thread>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
#include <cstdint>
|
||||
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/queue.h>
|
||||
@ -39,6 +41,10 @@ private:
|
||||
std::string explain_url_;
|
||||
std::string explain_token_;
|
||||
std::thread encoder_thread_;
|
||||
std::mutex frame_mutex_;
|
||||
int64_t foreground_capture_protected_until_us_ = 0;
|
||||
|
||||
bool CaptureFrame(bool show_preview);
|
||||
|
||||
public:
|
||||
EspVideo(const esp_video_init_config_t& config);
|
||||
@ -46,6 +52,8 @@ public:
|
||||
|
||||
virtual void SetExplainUrl(const std::string& url, const std::string& token);
|
||||
virtual bool Capture();
|
||||
virtual bool CaptureBackground() override;
|
||||
virtual bool CaptureToJpeg(std::string& jpeg_data, bool show_preview = false) override;
|
||||
// 翻转控制函数
|
||||
virtual bool SetHMirror(bool enabled) override;
|
||||
virtual bool SetVFlip(bool enabled) override;
|
||||
|
||||
Reference in New Issue
Block a user