return card_index;
}
+ void set_url(const std::string &url);
+ void reload();
+ void set_max_fps(int max_fps);
+ void execute_javascript_async(const std::string &js);
+
void OnPaint(const void *buffer, int width, int height);
// CaptureInterface.
uint32_t get_current_audio_input() const override { return 0; }
private:
+ void post_to_cef_ui_thread(std::function<void()> &&func);
+
CefRefPtr<NageruCEFClient> cef_client;
unsigned width, height;
int card_index = -1;
bmusb::frame_callback_t frame_callback = nullptr;
std::string description, start_url;
+ std::atomic<int> max_fps{60};
+
+ std::mutex browser_mutex;
+ CefRefPtr<CefBrowser> browser; // Under <browser_mutex>.
+
+ // Tasks waiting for <browser> to get ready. Under <browser_mutex>.
+ std::vector<std::function<void()>> deferred_tasks;
int timecode = 0;
};