yolobs-studio/UI/window-basic-main-outputs.hpp

55 lines
1.7 KiB
C++
Raw Normal View History

2016-02-23 23:16:51 +00:00
#pragma once
2018-02-19 19:54:37 +00:00
#include <string>
2016-02-23 23:16:51 +00:00
class OBSBasic;
struct BasicOutputHandler {
OBSOutput fileOutput;
OBSOutput streamOutput;
2017-04-19 19:54:15 +00:00
OBSOutput replayBuffer;
2016-02-23 23:16:51 +00:00
bool streamingActive = false;
bool recordingActive = false;
bool delayActive = false;
2017-04-19 19:54:15 +00:00
bool replayBufferActive = false;
2016-02-23 23:16:51 +00:00
OBSBasic *main;
2018-02-19 19:54:37 +00:00
std::string outputType;
2016-02-23 23:16:51 +00:00
OBSSignal startRecording;
OBSSignal stopRecording;
2017-04-19 19:54:15 +00:00
OBSSignal startReplayBuffer;
OBSSignal stopReplayBuffer;
2016-02-23 23:16:51 +00:00
OBSSignal startStreaming;
OBSSignal stopStreaming;
OBSSignal streamDelayStarting;
2016-08-28 12:07:43 +00:00
OBSSignal streamStopping;
OBSSignal recordStopping;
2017-04-19 19:54:15 +00:00
OBSSignal replayBufferStopping;
2016-02-23 23:16:51 +00:00
inline BasicOutputHandler(OBSBasic *main_) : main(main_) {}
virtual ~BasicOutputHandler() {};
virtual bool StartStreaming(obs_service_t *service) = 0;
virtual bool StartRecording() = 0;
2017-04-19 19:54:15 +00:00
virtual bool StartReplayBuffer() {return false;}
2016-10-10 19:01:40 +00:00
virtual void StopStreaming(bool force = false) = 0;
virtual void StopRecording(bool force = false) = 0;
2017-04-19 19:54:15 +00:00
virtual void StopReplayBuffer(bool force = false) {(void)force;}
2016-02-23 23:16:51 +00:00
virtual bool StreamingActive() const = 0;
virtual bool RecordingActive() const = 0;
2017-04-19 19:54:15 +00:00
virtual bool ReplayBufferActive() const {return false;}
2016-02-23 23:16:51 +00:00
virtual void Update() = 0;
inline bool Active() const
{
2017-04-19 19:54:15 +00:00
return streamingActive || recordingActive || delayActive ||
replayBufferActive;
2016-02-23 23:16:51 +00:00
}
};
BasicOutputHandler *CreateSimpleOutputHandler(OBSBasic *main);
BasicOutputHandler *CreateAdvancedOutputHandler(OBSBasic *main);