| 66 | } |
| 67 | |
| 68 | void 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 | |
| 85 | void VideoController::OnActiveLineChanged(AssDialogue *line) { |
| 86 | if (line && provider && OPT_GET("Video/Subtitle Sync")->GetBool()) { |
nothing calls this directly
no test coverage detected