| 56 | } |
| 57 | |
| 58 | std::shared_ptr<streamfx::ui::obs_browser_cef> streamfx::ui::obs_browser_cef::instance() |
| 59 | { |
| 60 | static std::weak_ptr<obs_browser_cef> ptr; |
| 61 | static std::mutex lock; |
| 62 | |
| 63 | std::lock_guard<decltype(lock)> lg(lock); |
| 64 | if (!ptr.expired()) { |
| 65 | return ptr.lock(); |
| 66 | } |
| 67 | |
| 68 | std::shared_ptr<obs_browser_cef> sintance{new obs_browser_cef()}; |
| 69 | ptr = sintance; |
| 70 | return sintance; |
| 71 | } |
| 72 | |
| 73 | streamfx::ui::obs_browser_widget::obs_browser_widget(QUrl url, QWidget* parent) : QWidget(parent) |
| 74 | { |