| 125 | } |
| 126 | |
| 127 | void AssTransformFramerateFilter::LoadSettings(bool is_default, agi::Context *c) { |
| 128 | this->c = c; |
| 129 | |
| 130 | if (is_default) { |
| 131 | auto provider = c->project->VideoProvider(); |
| 132 | Output = c->project->Timecodes(); |
| 133 | Input = provider ? provider->GetFPS() : Output; |
| 134 | } |
| 135 | else { |
| 136 | double temp; |
| 137 | InputFramerate->GetValue().ToDouble(&temp); |
| 138 | Input = temp; |
| 139 | if (RadioOutputCFR->GetValue()) { |
| 140 | OutputFramerate->GetValue().ToDouble(&temp); |
| 141 | Output = temp; |
| 142 | } |
| 143 | else Output = c->project->Timecodes(); |
| 144 | |
| 145 | if (Reverse->IsChecked()) |
| 146 | std::swap(Input, Output); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | /// Truncate a time to centisecond precision |
| 151 | static int trunc_cs(int time) { |
nothing calls this directly
no test coverage detected