-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathQtGuiModifications.h
More file actions
47 lines (36 loc) · 912 Bytes
/
QtGuiModifications.h
File metadata and controls
47 lines (36 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include <mutex>
#include <thread>
#include <vector>
#include <obs.h>
#include <json11/json11.hpp>
class QPushButton;
class QtGuiModifications
{
public:
static QtGuiModifications &instance()
{
static QtGuiModifications a;
return a;
}
public:
void stop();
void outsideInvokeClickStreamButton();
void setJavascriptToCallOnStreamClick(const std::string& str);
static void handle_obs_frontend_event(enum obs_frontend_event event, void *data);
private:
QtGuiModifications();
~QtGuiModifications();
void init();
void onStartStreamingRequest();
void copyStylesOfObsButton();
void workerThread();
QPushButton *m_obs_streamButton = nullptr;
QPushButton *m_sl_streamButton = nullptr;
size_t m_streamingHotkeyId = 0;
std::string m_jsToCallOnStreamClick = "";
std::recursive_mutex m_mutex;
std::thread m_workerThread;
std::string m_streamKeyCache;
bool m_closing = false;
};