2015-02-06 03:17:33 -08:00
|
|
|
#pragma once
|
|
|
|
|
2017-07-13 03:57:42 -07:00
|
|
|
#include <string>
|
|
|
|
|
2015-02-06 03:17:33 -08:00
|
|
|
class OBSBasic;
|
|
|
|
|
|
|
|
struct BasicOutputHandler {
|
|
|
|
OBSOutput fileOutput;
|
|
|
|
OBSOutput streamOutput;
|
2016-12-09 14:40:04 -08:00
|
|
|
OBSOutput replayBuffer;
|
2015-09-06 16:07:45 -07:00
|
|
|
bool streamingActive = false;
|
|
|
|
bool recordingActive = false;
|
2015-09-06 16:19:53 -07:00
|
|
|
bool delayActive = false;
|
2016-12-09 14:40:04 -08:00
|
|
|
bool replayBufferActive = false;
|
2015-02-06 03:17:33 -08:00
|
|
|
OBSBasic *main;
|
2019-06-22 22:13:45 -07:00
|
|
|
|
2017-07-13 03:57:42 -07:00
|
|
|
std::string outputType;
|
2018-12-12 15:20:48 -08:00
|
|
|
std::string lastError;
|
2019-06-22 22:13:45 -07:00
|
|
|
|
2015-07-04 08:00:21 +02:00
|
|
|
OBSSignal startRecording;
|
|
|
|
OBSSignal stopRecording;
|
2016-12-09 14:40:04 -08:00
|
|
|
OBSSignal startReplayBuffer;
|
|
|
|
OBSSignal stopReplayBuffer;
|
2015-07-04 08:00:21 +02:00
|
|
|
OBSSignal startStreaming;
|
|
|
|
OBSSignal stopStreaming;
|
2015-09-06 16:19:53 -07:00
|
|
|
OBSSignal streamDelayStarting;
|
2016-06-22 01:47:08 -07:00
|
|
|
OBSSignal streamStopping;
|
|
|
|
OBSSignal recordStopping;
|
2016-12-09 14:40:04 -08:00
|
|
|
OBSSignal replayBufferStopping;
|
2015-07-04 08:00:21 +02:00
|
|
|
|
2015-02-06 03:17:33 -08:00
|
|
|
inline BasicOutputHandler(OBSBasic *main_) : main(main_) {}
|
|
|
|
|
|
|
|
virtual ~BasicOutputHandler(){};
|
|
|
|
|
|
|
|
virtual bool StartStreaming(obs_service_t *service) = 0;
|
|
|
|
virtual bool StartRecording() = 0;
|
2016-12-09 14:40:04 -08:00
|
|
|
virtual bool StartReplayBuffer() { return false; }
|
2016-09-09 07:37:54 -07:00
|
|
|
virtual void StopStreaming(bool force = false) = 0;
|
|
|
|
virtual void StopRecording(bool force = false) = 0;
|
2016-12-09 14:40:04 -08:00
|
|
|
virtual void StopReplayBuffer(bool force = false) { (void)force; }
|
2015-02-06 03:17:33 -08:00
|
|
|
virtual bool StreamingActive() const = 0;
|
|
|
|
virtual bool RecordingActive() const = 0;
|
2016-12-09 14:40:04 -08:00
|
|
|
virtual bool ReplayBufferActive() const { return false; }
|
2015-02-06 03:17:33 -08:00
|
|
|
|
|
|
|
virtual void Update() = 0;
|
|
|
|
|
2015-09-06 16:07:45 -07:00
|
|
|
inline bool Active() const
|
|
|
|
{
|
2016-12-09 14:40:04 -08:00
|
|
|
return streamingActive || recordingActive || delayActive ||
|
|
|
|
replayBufferActive;
|
2015-09-06 16:07:45 -07:00
|
|
|
}
|
2015-02-06 03:17:33 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
BasicOutputHandler *CreateSimpleOutputHandler(OBSBasic *main);
|
2015-01-26 13:41:22 -08:00
|
|
|
BasicOutputHandler *CreateAdvancedOutputHandler(OBSBasic *main);
|