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

Method apply_effects

src/Clip.cpp:1297–1315  ·  view source on GitHub ↗

Apply effects to the source frame (if any)

Source from the content-addressed store, hash-verified

1295
1296// Apply effects to the source frame (if any)
1297void Clip::apply_effects(std::shared_ptr<Frame> frame, int64_t timeline_frame_number, TimelineInfoStruct* options, bool before_keyframes)
1298{
1299 for (auto effect : effects)
1300 {
1301 // Apply the effect to this frame
1302 if (effect->info.apply_before_clip && before_keyframes) {
1303 effect->ProcessFrame(frame, frame->number);
1304 } else if (!effect->info.apply_before_clip && !before_keyframes) {
1305 effect->ProcessFrame(frame, frame->number);
1306 }
1307 }
1308
1309 if (timeline != NULL && options != NULL) {
1310 // Apply global timeline effects (i.e. transitions & masks... if any)
1311 Timeline* timeline_instance = static_cast<Timeline*>(timeline);
1312 options->is_before_clip_keyframes = before_keyframes;
1313 timeline_instance->apply_effects(frame, timeline_frame_number, Layer(), options);
1314 }
1315}
1316
1317// Compare 2 floating point numbers for equality
1318bool Clip::isNear(double a, double b)

Callers

nothing calls this directly

Calls 1

ProcessFrameMethod · 0.80

Tested by

no test coverage detected