The new cutoff timing fix means that streaming/recording has to remain active for bit until the stream/recording has reached the expecting stop timestamp. This means that the buttons would continue to say "Stop streaming/recording" while waiting for the output to stop itself at the appropriate timing. So instead of letting it do that and confusing the user, the buttons will now say "stopping" when the button is pressed to indicate to the user that the stream/recording is in the process of stopping.
43 lines
1.2 KiB
C++
43 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() = 0;
|
|
virtual void ForceStopStreaming() = 0;
|
|
virtual void StopRecording() = 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);
|