-
Notifications
You must be signed in to change notification settings - Fork 2
/
avplumber.hpp
50 lines (44 loc) · 1.18 KB
/
avplumber.hpp
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
48
49
50
#pragma once
#include <cstdint>
#include <string>
class ControlImpl;
#ifdef EMBED_IN_OBS
struct obs_source;
typedef struct obs_source obs_source_t;
#endif
/*
* Usage #1: (as in standalone application)
* mainLoop()
* will return after any node with restart=panic finishes or you call
* stopMainLoop()
* from a different thread or from interrupt
*
* Usage #2: (as in obs-avplumber-source)
* setReady()
* will make avplumber usable, working in background threads. When you want it to stop working, call:
* shutdown()
* you may want to call
* heartbeat()
* periodically to make avplumber print some status information to the log
*/
class AVPlumber {
private:
ControlImpl* impl_;
public:
AVPlumber();
~AVPlumber();
void enableControlServer(const uint16_t tcp_port);
#ifdef EMBED_IN_OBS
void setObsSource(obs_source_t* obssrc);
void unsetObsSourceAndWait();
void obsTick();
#endif
void executeCommandsFromFile(const std::string path);
void executeCommandsFromString(const std::string script);
void setLogFile(const std::string path);
void setReady();
void shutdown();
void mainLoop();
void stopMainLoop();
void heartbeat();
};