8b2614ddc2
Adds an 'advanced' mode to the output settings to allow more powerful and complex streaming and recording options: - Optionally use a different encoder for recording than for streaming to allow the recording to use a different encoder or encoder settings if desired (though at the cost if increased CPU usage depending on the encoders being used) - Use encoders other than x264 - Rescale the recording or streaming encoders in case the user wishes to stream and record at different resolutions - Select the specific mixer to use for recording and for streaming, allowing the stream and recording to use separate mixers (to for example allow a user to stream the game/mic audio but only record the game audio) - Use FFmpeg output for the recording button instead of only recording h264/aac to FLV, allowing the user to output to various different types of file formats or remote URLs, as well as allowing the user to select and use different encoders and encoder settings that are available in the FFmpeg library - Optionally allow the use of multiple audio tracks in a single output if the file formats or stream services support it
29 lines
766 B
C++
29 lines
766 B
C++
#pragma once
|
|
|
|
class OBSBasic;
|
|
|
|
struct BasicOutputHandler {
|
|
OBSOutput fileOutput;
|
|
OBSOutput streamOutput;
|
|
int activeRefs = 0;
|
|
OBSBasic *main;
|
|
|
|
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 StopRecording() = 0;
|
|
virtual bool StreamingActive() const = 0;
|
|
virtual bool RecordingActive() const = 0;
|
|
|
|
virtual void Update() = 0;
|
|
|
|
inline bool Active() const {return !!activeRefs;}
|
|
};
|
|
|
|
BasicOutputHandler *CreateSimpleOutputHandler(OBSBasic *main);
|
|
BasicOutputHandler *CreateAdvancedOutputHandler(OBSBasic *main);
|