| 130 | } |
| 131 | |
| 132 | void EncodeWindow::update_config() |
| 133 | { |
| 134 | if (context->config.dumpfile.empty()) { |
| 135 | encodePath->setText(context->gamepath.c_str()); |
| 136 | } |
| 137 | else { |
| 138 | encodePath->setText(context->config.dumpfile.c_str()); |
| 139 | } |
| 140 | |
| 141 | /* Set video codec and bitrate */ |
| 142 | videoChoice->setCurrentIndex(context->config.sc.video_codec); |
| 143 | videoBitrate->setValue(context->config.sc.video_bitrate); |
| 144 | |
| 145 | /* Set audio codec and bitrate */ |
| 146 | audioChoice->setCurrentIndex(context->config.sc.audio_codec); |
| 147 | audioBitrate->setValue(context->config.sc.audio_bitrate); |
| 148 | |
| 149 | /* Set ffmpeg options */ |
| 150 | ffmpegOptions->setText(context->config.ffmpegoptions.c_str()); |
| 151 | |
| 152 | /* Set video framerate */ |
| 153 | framerateGroupBox->setChecked(context->config.sc.video_framerate); |
| 154 | if (context->config.sc.video_framerate) |
| 155 | videoFramerate->setValue(context->config.sc.video_framerate); |
| 156 | else |
| 157 | videoFramerate->setValue(context->config.sc.initial_framerate_num / context->config.sc.initial_framerate_den); |
| 158 | |
| 159 | if (context->config.ffmpegoptions.empty()) { |
| 160 | slotUpdate(); |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | void EncodeWindow::slotUpdate() |
| 165 | { |
no test coverage detected