2015-02-06 03:17:33 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class OBSBasic;
|
|
|
|
|
|
|
|
struct BasicOutputHandler {
|
|
|
|
OBSOutput fileOutput;
|
|
|
|
OBSOutput streamOutput;
|
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;
|
2015-02-06 03:17:33 -08:00
|
|
|
OBSBasic *main;
|
|
|
|
|
2015-07-03 23:00:21 -07:00
|
|
|
OBSSignal startRecording;
|
|
|
|
OBSSignal stopRecording;
|
|
|
|
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;
|
2015-07-03 23:00:21 -07: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;
|
|
|
|
virtual void StopStreaming() = 0;
|
2015-09-06 16:19:53 -07:00
|
|
|
virtual void ForceStopStreaming() = 0;
|
2015-02-06 03:17:33 -08:00
|
|
|
virtual void StopRecording() = 0;
|
|
|
|
virtual bool StreamingActive() const = 0;
|
|
|
|
virtual bool RecordingActive() const = 0;
|
|
|
|
|
|
|
|
virtual void Update() = 0;
|
|
|
|
|
2015-09-06 16:07:45 -07:00
|
|
|
inline bool Active() const
|
|
|
|
{
|
2015-09-06 16:19:53 -07:00
|
|
|
return streamingActive || recordingActive || delayActive;
|
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);
|