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.
50 lines
1.1 KiB
50 lines
1.1 KiB
#ifndef SCREEN_RECORDER_OBS_MANAGER_HPP
|
|
#define SCREEN_RECORDER_OBS_MANAGER_HPP
|
|
|
|
#include <list>
|
|
#include <gdkmm/display.h>
|
|
#include <glibmm/ustring.h>
|
|
#include <gdk/gdkx.h>
|
|
#include <X11/X.h>
|
|
#include <obs/obs.h>
|
|
#include "settings-manager.hpp"
|
|
|
|
using namespace Glib;
|
|
using namespace std;
|
|
|
|
class OBSManager
|
|
{
|
|
public:
|
|
OBSManager();
|
|
virtual ~OBSManager();
|
|
ustring GetVersion();
|
|
void Initialize();
|
|
void SetPreviewWindow(XID wid, Display *wdisplay);
|
|
void StartRecording();
|
|
void StopRecording();
|
|
obs_source_t *CreateScreenSource();
|
|
obs_source_t *CreateWebcamSource();
|
|
obs_source_t *CreateAudioSource();
|
|
void Cleanup();
|
|
void LoadSettings(SettingsManager *settings);
|
|
int PreviewWidth = 1280;
|
|
int PreviewHeight = 720;
|
|
|
|
private:
|
|
bool isInitialized = false;
|
|
bool isRecording = false;
|
|
obs_display_t *display;
|
|
obs_output_t *output;
|
|
list<obs_source_t*> sources;
|
|
ustring mPluginDir;
|
|
ustring mOutputDir;
|
|
ustring mWebcamDeviceID;
|
|
void printTypes();
|
|
|
|
// Plugins
|
|
list<ustring> mPlugins;
|
|
void loadPlugin(ustring name);
|
|
void loadPlugins();
|
|
};
|
|
|
|
#endif
|