| 22 | namespace openshot { |
| 23 | |
| 24 | const Crop* FindResizingCropEffect(Clip* clip) { |
| 25 | if (!clip) { |
| 26 | return nullptr; |
| 27 | } |
| 28 | |
| 29 | for (auto effect : clip->Effects()) { |
| 30 | if (auto crop_effect = dynamic_cast<Crop*>(effect)) { |
| 31 | if (crop_effect->resize) { |
| 32 | return crop_effect; |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | return nullptr; |
| 38 | } |
| 39 | |
| 40 | void ApplyCropResizeScale(Clip* clip, int source_width, int source_height, int& max_width, int& max_height) { |
| 41 | const Crop* crop_effect = FindResizingCropEffect(clip); |
no test coverage detected