MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / LoadVideo

Method LoadVideo

src/project.cpp:329–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329void 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
343void Project::CloseVideo() {
344 AnnounceVideoProviderModified(nullptr);

Callers 3

video_openClass · 0.45
operator()Function · 0.45
recent_video_entryClass · 0.45

Calls 4

SetAspectRatioMethod · 0.80
JumpToFrameMethod · 0.80
HasAudioMethod · 0.45
GetDARMethod · 0.45

Tested by

no test coverage detected