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

Method Frame

src/Frame.cpp:44–55  ·  view source on GitHub ↗

Constructor - image & audio

Source from the content-addressed store, hash-verified

42
43// Constructor - image & audio
44Frame::Frame(int64_t number, int width, int height, std::string color, int samples, int channels)
45 : audio(std::make_shared<juce::AudioBuffer<float>>(channels, samples)),
46 number(number), width(width), height(height),
47 pixel_ratio(1,1), color(color),
48 channels(channels), channel_layout(LAYOUT_STEREO),
49 sample_rate(44100),
50 has_audio_data(false), has_image_data(false),
51 max_audio_sample(0), audio_is_increasing(true)
52{
53 // zero (fill with silence) the audio buffer
54 audio->clear();
55}
56
57// Delegating Constructor - blank frame
58Frame::Frame() : Frame::Frame(1, 1, 1, "#000000", 0, 2) {}

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected