16#include "SubComponent.h"
23class Recorder final :
public SubComponent,
public Inspectable<RecorderInfo> {
25 Descriptions descriptions = {{
28 .description =
"Screen Recorder"
31 ConfigOptions options = {
41 RecorderConfig config = { };
70 isize samplesPerFrame = 0;
73 struct { isize x1; isize y1; isize x2; isize y2; } cutout;
87 Recorder& operator= (
const Recorder& other) {
return *
this; }
96 template <
class T>
void serialize(T& worker) { } SERIALIZERS(serialize);
105 const Descriptions &getDescriptions()
const override {
return descriptions; }
109 void _dump(Category category, std::ostream& os)
const override;
110 void _initialize()
override;
119 const RecorderConfig &getConfig()
const {
return config; }
120 const ConfigOptions &getOptions()
const override {
return options; }
121 i64 getOption(Option opt)
const override;
122 void checkOption(Option opt, i64 value)
override;
123 void setOption(Option opt, i64 value)
override;
132 void cacheInfo(RecorderInfo &result)
const override;
140 string videoPipePath();
141 string audioPipePath();
144 string videoStreamPath();
145 string audioStreamPath();
148 const string loglevel() {
return REC_DEBUG ?
"verbose" :
"warning"; }
153 util::Time getDuration()
const;
166 void startRecording(isize x1, isize y1, isize x2, isize y2);
169 void stopRecording();
172 bool exportAs(
const fs::path &path);
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
@ REC_STATE_WAIT
The recorder is ready.
Definition RecorderTypes.h:26
@ OPT_REC_ASPECT_X
Numerator of the video's aspect ratio.
Definition OptionTypes.h:173
@ OPT_REC_BIT_RATE
Bit rate of the recorded video.
Definition OptionTypes.h:171
@ OPT_REC_SAMPLE_RATE
Audio sample rate of the recorded video.
Definition OptionTypes.h:172
@ OPT_REC_ASPECT_Y
Denumerator of the video's aspect ratio.
Definition OptionTypes.h:174
@ OPT_REC_FRAME_RATE
Frame rate of the recorded video.
Definition OptionTypes.h:170