Apply effects to the source frame (if any)
| 1295 | |
| 1296 | // Apply effects to the source frame (if any) |
| 1297 | void 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 |
| 1318 | bool Clip::isNear(double a, double b) |
nothing calls this directly
no test coverage detected