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

Method GetFrame

tests/Timeline.cpp:185–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 void Close() override { is_open = false; }
184
185 std::shared_ptr<openshot::Frame> GetFrame(int64_t number) override {
186 const int sample_count = Frame::GetSamplesPerFrame(number, info.fps, info.sample_rate, info.channels);
187 auto frame = std::make_shared<Frame>(number, info.width, info.height, "#000000", sample_count, info.channels);
188 std::vector<float> samples(sample_count, sample_value);
189 for (int channel = 0; channel < info.channels; ++channel)
190 frame->AddAudio(true, channel, 0, samples.data(), sample_count, 1.0f);
191 return frame;
192 }
193
194 std::string Json() const override { return JsonValue().toStyledString(); }
195 Json::Value JsonValue() const override {

Callers

nothing calls this directly

Calls 1

AddAudioMethod · 0.80

Tested by

no test coverage detected