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.
 
 

68 lines
1.6 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 LoadSettings(SettingsManager *settings);
void Initialize(Gdk::Rectangle rect);
void StartPreview(XID wid, Display *wdisplay);
void StopPreview();
void StartRecording();
void StopRecording();
bool IsRecording();
void Cleanup();
OBSSource CreateScreenSource();
OBSSource CreateWebcamSource();
OBSSource CreateAudioSource();
const int PreviewWidth = 1280;
const int PreviewHeight = 720;
// Signals
sigc::signal<void()> sigStartPreview;
sigc::signal<void()> sigStopPreview;
sigc::signal<void()> sigStartRecording;
sigc::signal<void()> sigStopRecording;
sigc::signal<void()> sigCleanup;
private:
void printTypes();
bool isInitialized = false;
bool isRecording = false;
int mScreenWidth = 0;
int mScreenHeight = 0;
bool mScreenEnabled = false;
bool mWebcamEnabled = false;
bool mAudioEnabled = false;
string mPluginDir;
string mOutputDir;
string mWebcamDeviceID;
string mAudioDeviceID;
OBSDisplay mDisplay;
OBSOutput mOutput;
OBSSignal obsStartRecording;
OBSSignal obsStopRecording;
// Plugins
void loadPlugin(string name);
void loadPlugins();
list<string> mPlugins;
};
#endif