You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.2 KiB
57 lines
1.2 KiB
#ifndef SCREEN_RECORDER_OBS_MANAGER_HPP
|
|
#define SCREEN_RECORDER_OBS_MANAGER_HPP
|
|
|
|
#include "settings-manager.hpp"
|
|
|
|
#include <list>
|
|
#include <gdkmm/display.h>
|
|
#include <gdk/gdkx.h>
|
|
#include <X11/X.h>
|
|
#include <obs/obs.hpp>
|
|
|
|
using namespace std;
|
|
|
|
class OBSManager
|
|
{
|
|
public:
|
|
OBSManager();
|
|
virtual ~OBSManager();
|
|
string GetVersion();
|
|
void Initialize();
|
|
void SetPreviewWindow(XID wid, Display *wdisplay);
|
|
void StartRecording();
|
|
void StopRecording();
|
|
OBSSource CreateScreenSource();
|
|
OBSSource CreateWebcamSource();
|
|
OBSSource CreateAudioSource();
|
|
void Cleanup();
|
|
void LoadSettings(SettingsManager *settings);
|
|
bool IsRecording();
|
|
int PreviewWidth = 1280;
|
|
int PreviewHeight = 720;
|
|
|
|
// Signals
|
|
sigc::signal<void()> startRecording;
|
|
sigc::signal<void()> stopRecording;
|
|
|
|
private:
|
|
void printTypes();
|
|
|
|
bool isInitialized = false;
|
|
bool isRecording = false;
|
|
OBSDisplay mDisplay;
|
|
OBSOutput mOutput;
|
|
OBSSignal obsStartRecording;
|
|
OBSSignal obsStopRecording;
|
|
list<OBSSource> mSources;
|
|
string mPluginDir;
|
|
string mOutputDir;
|
|
string mWebcamDeviceID;
|
|
|
|
// Plugins
|
|
void loadPlugin(string name);
|
|
void loadPlugins();
|
|
list<string> mPlugins;
|
|
};
|
|
|
|
#endif
|