X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=cef_capture.h;fp=cef_capture.h;h=8dc053dddf9bfc1e37ecb0e62dd8954b1a3ac617;hp=dc74b30d527c4c28d6d54cb2ec1431ed77039fde;hb=cd48c8ab6d7425d4b4d9fdb2493da69b44848c9e;hpb=b68d8a25951faf5b967b7a35fa0a363b4b68fbc0 diff --git a/cef_capture.h b/cef_capture.h index dc74b30..8dc053d 100644 --- a/cef_capture.h +++ b/cef_capture.h @@ -69,6 +69,8 @@ public: return card_index; } + void set_url(const std::string &url); + void OnPaint(const void *buffer, int width, int height); // CaptureInterface. @@ -145,6 +147,8 @@ public: uint32_t get_current_audio_input() const override { return 0; } private: + void post_to_cef_ui_thread(std::function &&func); + CefRefPtr cef_client; unsigned width, height; int card_index = -1; @@ -159,6 +163,12 @@ private: std::string description, start_url; + std::mutex browser_mutex; + CefRefPtr browser; // Under . + + // Tasks waiting for to get ready. Under . + std::vector> deferred_tasks; + int timecode = 0; };