MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / TimelineSolidColorReader

Method TimelineSolidColorReader

tests/Timeline.cpp:112–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110
111public:
112 TimelineSolidColorReader(int width,
113 int height,
114 int fps_num,
115 int fps_den,
116 int64_t length_frames,
117 const QColor& fill_color)
118 : color(fill_color) {
119 info.has_video = true;
120 info.has_audio = false;
121 info.width = width;
122 info.height = height;
123 info.fps = Fraction(fps_num, fps_den);
124 info.video_length = length_frames;
125 info.duration = static_cast<float>(length_frames / info.fps.ToDouble());
126 info.sample_rate = 48000;
127 info.channels = 2;
128 info.audio_stream_index = -1;
129 }
130
131 openshot::CacheBase* GetCache() override { return &cache; }
132 bool IsOpen() override { return is_open; }

Callers

nothing calls this directly

Calls 2

FractionClass · 0.85
ToDoubleMethod · 0.80

Tested by

no test coverage detected