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

Method OnSubtitlesCommit

src/video_controller.cpp:68–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void VideoController::OnSubtitlesCommit(int type, const AssDialogue *changed) {
69 if (!provider) return;
70
71 if ((type & AssFile::COMMIT_SCRIPTINFO) || type == AssFile::COMMIT_NEW) {
72 auto new_matrix = context->ass->GetScriptInfo("YCbCr Matrix");
73 if (!new_matrix.empty() && new_matrix != color_matrix) {
74 color_matrix = new_matrix;
75 provider->SetColorSpace(new_matrix);
76 }
77 }
78
79 if (!changed)
80 provider->LoadSubtitles(context->ass.get());
81 else
82 provider->UpdateSubtitles(context->ass.get(), changed);
83}
84
85void VideoController::OnActiveLineChanged(AssDialogue *line) {
86 if (line && provider && OPT_GET("Video/Subtitle Sync")->GetBool()) {

Callers

nothing calls this directly

Calls 5

GetScriptInfoMethod · 0.80
UpdateSubtitlesMethod · 0.80
SetColorSpaceMethod · 0.45
LoadSubtitlesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected