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

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #ifndef SCREEN_RECORDER_OBS_MANAGER_HPP
  2. #define SCREEN_RECORDER_OBS_MANAGER_HPP
  3. #include <list>
  4. #include <gdkmm/display.h>
  5. #include <glibmm/ustring.h>
  6. #include <gdk/gdkx.h>
  7. #include <X11/X.h>
  8. #include <obs/obs.h>
  9. #include "settings-manager.hpp"
  10. using namespace Glib;
  11. using namespace std;
  12. class OBSManager
  13. {
  14. public:
  15. OBSManager();
  16. virtual ~OBSManager();
  17. ustring GetVersion();
  18. void Initialize();
  19. void SetPreviewWindow(XID wid, Display *wdisplay);
  20. void StartRecording();
  21. void StopRecording();
  22. obs_source_t *CreateScreenSource();
  23. obs_source_t *CreateWebcamSource();
  24. obs_source_t *CreateAudioSource();
  25. void Cleanup();
  26. void LoadSettings(SettingsManager *settings);
  27. int PreviewWidth = 1280;
  28. int PreviewHeight = 720;
  29. private:
  30. bool isInitialized = false;
  31. bool isRecording = false;
  32. obs_display_t *display;
  33. obs_output_t *output;
  34. list<obs_source_t*> sources;
  35. ustring mPluginDir;
  36. ustring mOutputDir;
  37. ustring mWebcamDeviceID;
  38. void printTypes();
  39. // Plugins
  40. list<ustring> mPlugins;
  41. void loadPlugin(ustring name);
  42. void loadPlugins();
  43. };
  44. #endif