5c5d0ba9e5
If the user hits the "stop stream" button it'll transition in to "stopping stream..." and will continue to output until the stream reaches the timing in which "stop" was pressed. However, if there is significant congestion, stopping the stream can take far longer than the user may like. So there needs to be an option to forcibly stop the stream in that case; pushing the "stop" button a second time should allow the user to tell the stream/recording to stop right away instead of waiting for the precise stop timing.
42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
#pragma once
|
|
|
|
class OBSBasic;
|
|
|
|
struct BasicOutputHandler {
|
|
OBSOutput fileOutput;
|
|
OBSOutput streamOutput;
|
|
bool streamingActive = false;
|
|
bool recordingActive = false;
|
|
bool delayActive = false;
|
|
OBSBasic *main;
|
|
|
|
OBSSignal startRecording;
|
|
OBSSignal stopRecording;
|
|
OBSSignal startStreaming;
|
|
OBSSignal stopStreaming;
|
|
OBSSignal streamDelayStarting;
|
|
OBSSignal streamStopping;
|
|
OBSSignal recordStopping;
|
|
|
|
inline BasicOutputHandler(OBSBasic *main_) : main(main_) {}
|
|
|
|
virtual ~BasicOutputHandler() {};
|
|
|
|
virtual bool StartStreaming(obs_service_t *service) = 0;
|
|
virtual bool StartRecording() = 0;
|
|
virtual void StopStreaming(bool force = false) = 0;
|
|
virtual void StopRecording(bool force = false) = 0;
|
|
virtual bool StreamingActive() const = 0;
|
|
virtual bool RecordingActive() const = 0;
|
|
|
|
virtual void Update() = 0;
|
|
|
|
inline bool Active() const
|
|
{
|
|
return streamingActive || recordingActive || delayActive;
|
|
}
|
|
};
|
|
|
|
BasicOutputHandler *CreateSimpleOutputHandler(OBSBasic *main);
|
|
BasicOutputHandler *CreateAdvancedOutputHandler(OBSBasic *main);
|