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

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