| 327 | } |
| 328 | |
| 329 | void Project::LoadVideo(agi::fs::path path) { |
| 330 | if (path.empty()) return; |
| 331 | if (!DoLoadVideo(path)) return; |
| 332 | if (OPT_GET("Video/Open Audio")->GetBool() && audio_file != video_file && video_provider->HasAudio()) |
| 333 | DoLoadAudio(video_file, true); |
| 334 | |
| 335 | double dar = video_provider->GetDAR(); |
| 336 | if (dar > 0) |
| 337 | context->videoController->SetAspectRatio(dar); |
| 338 | else |
| 339 | context->videoController->SetAspectRatio(AspectRatio::Default); |
| 340 | context->videoController->JumpToFrame(0); |
| 341 | } |
| 342 | |
| 343 | void Project::CloseVideo() { |
| 344 | AnnounceVideoProviderModified(nullptr); |
no test coverage detected