[93] | 1 | /* smplayer, GUI front-end for mplayer.
|
---|
[188] | 2 | Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
[93] | 3 |
|
---|
| 4 | This program is free software; you can redistribute it and/or modify
|
---|
| 5 | it under the terms of the GNU General Public License as published by
|
---|
| 6 | the Free Software Foundation; either version 2 of the License, or
|
---|
| 7 | (at your option) any later version.
|
---|
| 8 |
|
---|
| 9 | This program is distributed in the hope that it will be useful,
|
---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 12 | GNU General Public License for more details.
|
---|
| 13 |
|
---|
| 14 | You should have received a copy of the GNU General Public License
|
---|
| 15 | along with this program; if not, write to the Free Software
|
---|
| 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 17 | */
|
---|
| 18 |
|
---|
| 19 |
|
---|
| 20 | #include "prefgeneral.h"
|
---|
| 21 | #include "preferences.h"
|
---|
| 22 | #include "filedialog.h"
|
---|
| 23 | #include "images.h"
|
---|
| 24 | #include "mediasettings.h"
|
---|
| 25 | #include "paths.h"
|
---|
[119] | 26 | #include "vdpauproperties.h"
|
---|
[176] | 27 | #include "playerid.h"
|
---|
[93] | 28 |
|
---|
[188] | 29 | #if USE_ALSA_DEVICES || USE_PULSEAUDIO_DEVICES || USE_XV_ADAPTORS || USE_DSOUND_DEVICES
|
---|
[93] | 30 | #include "deviceinfo.h"
|
---|
| 31 | #endif
|
---|
| 32 |
|
---|
[176] | 33 | #ifdef MPLAYER_MPV_SELECTION
|
---|
| 34 | #define PLAYER_COMBO_MPLAYER 0
|
---|
| 35 | #define PLAYER_COMBO_MPV 1
|
---|
| 36 | #define PLAYER_COMBO_OTHER 2
|
---|
| 37 |
|
---|
| 38 | #ifdef Q_OS_WIN
|
---|
| 39 | #define PLAYER_COMBO_MPLAYER_PATH "mplayer/mplayer.exe"
|
---|
| 40 | #define PLAYER_COMBO_MPV_PATH "mpv/mpv.exe"
|
---|
| 41 | #elif defined Q_OS_OS2
|
---|
| 42 | #define PLAYER_COMBO_MPLAYER_PATH "mplayer.exe"
|
---|
| 43 | #define PLAYER_COMBO_MPV_PATH "mpv.exe"
|
---|
| 44 | #else
|
---|
| 45 | #define PLAYER_COMBO_MPLAYER_PATH "mplayer"
|
---|
| 46 | #define PLAYER_COMBO_MPV_PATH "mpv"
|
---|
| 47 | #endif
|
---|
| 48 | #endif
|
---|
| 49 |
|
---|
[93] | 50 | PrefGeneral::PrefGeneral(QWidget * parent, Qt::WindowFlags f)
|
---|
| 51 | : PrefWidget(parent, f )
|
---|
| 52 | {
|
---|
| 53 | setupUi(this);
|
---|
| 54 |
|
---|
| 55 | mplayerbin_edit->setDialogType(FileChooser::GetFileName);
|
---|
| 56 | screenshot_edit->setDialogType(FileChooser::GetDirectory);
|
---|
| 57 |
|
---|
| 58 | // Read driver info from InfoReader:
|
---|
| 59 | InfoReader * i = InfoReader::obj();
|
---|
[176] | 60 | i->getInfo();
|
---|
[93] | 61 | vo_list = i->voList();
|
---|
| 62 | ao_list = i->aoList();
|
---|
| 63 |
|
---|
| 64 | #if USE_DSOUND_DEVICES
|
---|
| 65 | dsound_devices = DeviceInfo::dsoundDevices();
|
---|
| 66 | #endif
|
---|
| 67 |
|
---|
| 68 | #if USE_ALSA_DEVICES
|
---|
| 69 | alsa_devices = DeviceInfo::alsaDevices();
|
---|
| 70 | #endif
|
---|
[188] | 71 | #if USE_MPV_ALSA_DEVICES
|
---|
| 72 | mpv_alsa_devices = DeviceInfo::mpvAlsaDevices();
|
---|
| 73 | #endif
|
---|
| 74 | #if USE_PULSEAUDIO_DEVICES
|
---|
| 75 | pa_devices = DeviceInfo::paDevices();
|
---|
| 76 | #endif
|
---|
[93] | 77 | #if USE_XV_ADAPTORS
|
---|
| 78 | xv_adaptors = DeviceInfo::xvAdaptors();
|
---|
| 79 | #endif
|
---|
| 80 |
|
---|
| 81 | // Screensaver
|
---|
[182] | 82 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
[93] | 83 | screensaver_check->hide();
|
---|
[165] | 84 | #ifndef SCREENSAVER_OFF
|
---|
| 85 | turn_screensaver_off_check->hide();
|
---|
| 86 | #endif
|
---|
| 87 | #ifndef AVOID_SCREENSAVER
|
---|
| 88 | avoid_screensaver_check->hide();
|
---|
| 89 | #endif
|
---|
[93] | 90 | #else
|
---|
| 91 | screensaver_group->hide();
|
---|
| 92 | #endif
|
---|
| 93 |
|
---|
| 94 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
[119] | 95 | vdpau_button->hide();
|
---|
[93] | 96 | #endif
|
---|
| 97 |
|
---|
[170] | 98 | #ifndef AUTO_SHUTDOWN_PC
|
---|
| 99 | shutdown_widget->hide();
|
---|
| 100 | #endif
|
---|
| 101 |
|
---|
[188] | 102 | #ifndef ADD_BLACKBORDERS_FS
|
---|
| 103 | blackborders_on_fs_check->hide();
|
---|
| 104 | #endif
|
---|
| 105 |
|
---|
| 106 | #ifndef INITIAL_BLACKBORDERS
|
---|
| 107 | blackborders_check->hide();
|
---|
| 108 | #endif
|
---|
| 109 |
|
---|
[176] | 110 | #ifdef MPV_SUPPORT
|
---|
| 111 | screenshot_format_combo->addItems(QStringList() << "png" << "ppm" << "pgm" << "pgmyuv" << "tga" << "jpg" << "jpeg");
|
---|
| 112 | #else
|
---|
| 113 | screenshot_template_label->hide();
|
---|
| 114 | screenshot_template_edit->hide();
|
---|
| 115 | screenshot_format_label->hide();
|
---|
| 116 | screenshot_format_combo->hide();
|
---|
| 117 | #endif
|
---|
| 118 |
|
---|
[93] | 119 | // Channels combo
|
---|
| 120 | channels_combo->addItem( "2", MediaSettings::ChStereo );
|
---|
| 121 | channels_combo->addItem( "4", MediaSettings::ChSurround );
|
---|
| 122 | channels_combo->addItem( "6", MediaSettings::ChFull51 );
|
---|
[139] | 123 | channels_combo->addItem( "7", MediaSettings::ChFull61 );
|
---|
| 124 | channels_combo->addItem( "8", MediaSettings::ChFull71 );
|
---|
[93] | 125 |
|
---|
[176] | 126 | #ifdef MPLAYER_MPV_SELECTION
|
---|
| 127 | connect(player_combo, SIGNAL(currentIndexChanged(int)),
|
---|
| 128 | this, SLOT(player_combo_changed(int)));
|
---|
| 129 | #else
|
---|
| 130 | player_combo->hide();
|
---|
| 131 | player_spacer->changeSize(0, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
|
---|
| 132 | #endif
|
---|
| 133 |
|
---|
[93] | 134 | connect(vo_combo, SIGNAL(currentIndexChanged(int)),
|
---|
| 135 | this, SLOT(vo_combo_changed(int)));
|
---|
| 136 | connect(ao_combo, SIGNAL(currentIndexChanged(int)),
|
---|
| 137 | this, SLOT(ao_combo_changed(int)));
|
---|
| 138 |
|
---|
| 139 | retranslateStrings();
|
---|
| 140 | }
|
---|
| 141 |
|
---|
| 142 | PrefGeneral::~PrefGeneral()
|
---|
| 143 | {
|
---|
| 144 | }
|
---|
| 145 |
|
---|
| 146 | QString PrefGeneral::sectionName() {
|
---|
| 147 | return tr("General");
|
---|
| 148 | }
|
---|
| 149 |
|
---|
| 150 | QPixmap PrefGeneral::sectionIcon() {
|
---|
[181] | 151 | return Images::icon("pref_general");
|
---|
[93] | 152 | }
|
---|
| 153 |
|
---|
| 154 | void PrefGeneral::retranslateStrings() {
|
---|
| 155 | retranslateUi(this);
|
---|
| 156 |
|
---|
[176] | 157 | #ifdef MPLAYER_MPV_SELECTION
|
---|
| 158 | int player_item = player_combo->currentIndex();
|
---|
| 159 | player_combo->clear();
|
---|
| 160 | player_combo->addItem("mplayer", PLAYER_COMBO_MPLAYER);
|
---|
| 161 | player_combo->addItem("mpv", PLAYER_COMBO_MPV);
|
---|
| 162 | player_combo->addItem(tr("Other..."), PLAYER_COMBO_OTHER);
|
---|
| 163 | player_combo->setCurrentIndex(player_item);
|
---|
| 164 | #endif
|
---|
| 165 |
|
---|
[93] | 166 | channels_combo->setItemText(0, tr("2 (Stereo)") );
|
---|
| 167 | channels_combo->setItemText(1, tr("4 (4.0 Surround)") );
|
---|
| 168 | channels_combo->setItemText(2, tr("6 (5.1 Surround)") );
|
---|
[139] | 169 | channels_combo->setItemText(3, tr("7 (6.1 Surround)") );
|
---|
| 170 | channels_combo->setItemText(4, tr("8 (7.1 Surround)") );
|
---|
[93] | 171 |
|
---|
| 172 | int deinterlace_item = deinterlace_combo->currentIndex();
|
---|
| 173 | deinterlace_combo->clear();
|
---|
| 174 | deinterlace_combo->addItem( tr("None"), MediaSettings::NoDeinterlace );
|
---|
| 175 | deinterlace_combo->addItem( tr("Lowpass5"), MediaSettings::L5 );
|
---|
| 176 | deinterlace_combo->addItem( tr("Yadif (normal)"), MediaSettings::Yadif );
|
---|
| 177 | deinterlace_combo->addItem( tr("Yadif (double framerate)"), MediaSettings::Yadif_1 );
|
---|
| 178 | deinterlace_combo->addItem( tr("Linear Blend"), MediaSettings::LB );
|
---|
| 179 | deinterlace_combo->addItem( tr("Kerndeint"), MediaSettings::Kerndeint );
|
---|
| 180 | deinterlace_combo->setCurrentIndex(deinterlace_item);
|
---|
| 181 |
|
---|
| 182 | int filesettings_method_item = filesettings_method_combo->currentIndex();
|
---|
| 183 | filesettings_method_combo->clear();
|
---|
| 184 | filesettings_method_combo->addItem( tr("one ini file"), "normal");
|
---|
| 185 | filesettings_method_combo->addItem( tr("multiple ini files"), "hash");
|
---|
| 186 | filesettings_method_combo->setCurrentIndex(filesettings_method_item);
|
---|
| 187 |
|
---|
| 188 | updateDriverCombos();
|
---|
| 189 |
|
---|
| 190 | // Icons
|
---|
| 191 | /*
|
---|
| 192 | resize_window_icon->setPixmap( Images::icon("resize_window") );
|
---|
| 193 | volume_icon->setPixmap( Images::icon("speaker") );
|
---|
| 194 | */
|
---|
| 195 |
|
---|
[176] | 196 | mplayerbin_edit->setCaption(tr("Select the %1 executable").arg(PLAYER_NAME));
|
---|
[93] | 197 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
| 198 | mplayerbin_edit->setFilter(tr("Executables") +" (*.exe)");
|
---|
| 199 | #else
|
---|
| 200 | mplayerbin_edit->setFilter(tr("All files") +" (*)");
|
---|
| 201 | #endif
|
---|
| 202 | screenshot_edit->setCaption(tr("Select a directory"));
|
---|
| 203 |
|
---|
| 204 | preferred_desc->setText(
|
---|
| 205 | tr("Here you can type your preferred language for the audio "
|
---|
| 206 | "and subtitle streams. When a media with multiple audio or "
|
---|
| 207 | "subtitle streams is found, SMPlayer will try to use your "
|
---|
| 208 | "preferred language. This only will work with media that offer "
|
---|
| 209 | "info about the language of audio and subtitle streams, like DVDs "
|
---|
| 210 | "or mkv files.<br>These fields accept regular expressions. "
|
---|
| 211 | "Example: <b>es|esp|spa</b> will select the track if it matches with "
|
---|
| 212 | "<i>es</i>, <i>esp</i> or <i>spa</i>."));
|
---|
| 213 |
|
---|
[176] | 214 | #ifndef MPLAYER_MPV_SELECTION
|
---|
| 215 | executable_label->setText( tr("%1 &executable:").arg(PLAYER_NAME) );
|
---|
| 216 | #endif
|
---|
| 217 |
|
---|
[93] | 218 | createHelp();
|
---|
| 219 | }
|
---|
| 220 |
|
---|
| 221 | void PrefGeneral::setData(Preferences * pref) {
|
---|
| 222 | setMplayerPath( pref->mplayer_bin );
|
---|
| 223 |
|
---|
| 224 | setUseScreenshots( pref->use_screenshot );
|
---|
| 225 | setScreenshotDir( pref->screenshot_directory );
|
---|
[176] | 226 | #ifdef MPV_SUPPORT
|
---|
| 227 | screenshot_template_edit->setText( pref->screenshot_template );
|
---|
| 228 | setScreenshotFormat(pref->screenshot_format);
|
---|
| 229 | #endif
|
---|
[93] | 230 |
|
---|
[181] | 231 | setVO( pref->vo );
|
---|
| 232 | setAO( pref->ao );
|
---|
[93] | 233 |
|
---|
[181] | 234 | setRememberSettings( pref->remember_media_settings );
|
---|
| 235 | setRememberTimePos( pref->remember_time_pos );
|
---|
| 236 | remember_streams_check->setChecked(pref->remember_stream_settings);
|
---|
[93] | 237 |
|
---|
| 238 | setFileSettingsMethod( pref->file_settings_method );
|
---|
| 239 | setAudioLang( pref->audio_lang );
|
---|
| 240 | setSubtitleLang( pref->subtitle_lang );
|
---|
| 241 | setAudioTrack( pref->initial_audio_track );
|
---|
| 242 | setSubtitleTrack( pref->initial_subtitle_track );
|
---|
| 243 | setCloseOnFinish( pref->close_on_finish );
|
---|
| 244 | setPauseWhenHidden( pref->pause_when_hidden );
|
---|
[170] | 245 | #ifdef AUTO_SHUTDOWN_PC
|
---|
| 246 | shutdown_check->setChecked( pref->auto_shutdown_pc );
|
---|
| 247 | #endif
|
---|
[93] | 248 |
|
---|
| 249 | setEq2( pref->use_soft_video_eq );
|
---|
| 250 | setUseAudioEqualizer( pref->use_audio_equalizer );
|
---|
[165] | 251 | global_audio_equalizer_check->setChecked(pref->global_audio_equalizer);
|
---|
[93] | 252 | setGlobalVolume( pref->global_volume );
|
---|
| 253 | setSoftVol( pref->use_soft_vol );
|
---|
| 254 | setAc3DTSPassthrough( pref->use_hwac3 );
|
---|
| 255 | setInitialVolNorm( pref->initial_volnorm );
|
---|
| 256 | setAmplification( pref->softvol_max );
|
---|
| 257 | setInitialPostprocessing( pref->initial_postprocessing );
|
---|
| 258 | setInitialDeinterlace( pref->initial_deinterlace );
|
---|
| 259 | setInitialZoom( pref->initial_zoom_factor );
|
---|
| 260 | setDirectRendering( pref->use_direct_rendering );
|
---|
| 261 | setDoubleBuffer( pref->use_double_buffer );
|
---|
| 262 | setUseSlices( pref->use_slices );
|
---|
| 263 | setStartInFullscreen( pref->start_in_fullscreen );
|
---|
[188] | 264 |
|
---|
| 265 | #ifdef ADD_BLACKBORDERS_FS
|
---|
[93] | 266 | setBlackbordersOnFullscreen( pref->add_blackborders_on_fullscreen );
|
---|
[188] | 267 | #endif
|
---|
| 268 |
|
---|
| 269 | #ifdef INITIAL_BLACKBORDERS
|
---|
| 270 | blackborders_check->setChecked(pref->initial_blackborders);
|
---|
| 271 | #endif
|
---|
| 272 |
|
---|
[93] | 273 | setAutoq( pref->autoq );
|
---|
| 274 |
|
---|
[182] | 275 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
[165] | 276 | #ifdef SCREENSAVER_OFF
|
---|
| 277 | setTurnScreensaverOff( pref->turn_screensaver_off );
|
---|
| 278 | #endif
|
---|
| 279 | #ifdef AVOID_SCREENSAVER
|
---|
[93] | 280 | setAvoidScreensaver( pref->avoid_screensaver );
|
---|
[165] | 281 | #endif
|
---|
[93] | 282 | #else
|
---|
| 283 | setDisableScreensaver( pref->disable_screensaver );
|
---|
| 284 | #endif
|
---|
| 285 |
|
---|
| 286 | #if !defined(Q_OS_WIN) && !defined(Q_OS_OS2)
|
---|
[119] | 287 | vdpau = pref->vdpau;
|
---|
[93] | 288 | #endif
|
---|
| 289 |
|
---|
| 290 | setAudioChannels( pref->initial_audio_channels );
|
---|
| 291 | setScaleTempoFilter( pref->use_scaletempo );
|
---|
| 292 |
|
---|
| 293 | setAutoSyncActivated( pref->autosync );
|
---|
| 294 | setAutoSyncFactor( pref->autosync_factor );
|
---|
| 295 |
|
---|
| 296 | setMcActivated( pref->use_mc );
|
---|
| 297 | setMc( pref->mc_value );
|
---|
| 298 | }
|
---|
| 299 |
|
---|
| 300 | void PrefGeneral::getData(Preferences * pref) {
|
---|
| 301 | requires_restart = false;
|
---|
| 302 | filesettings_method_changed = false;
|
---|
| 303 |
|
---|
| 304 | if (pref->mplayer_bin != mplayerPath()) {
|
---|
| 305 | requires_restart = true;
|
---|
| 306 | pref->mplayer_bin = mplayerPath();
|
---|
| 307 |
|
---|
| 308 | qDebug("PrefGeneral::getData: mplayer binary has changed, getting version number");
|
---|
| 309 | // Forces to get info from mplayer to update version number
|
---|
[176] | 310 | InfoReader * i = InfoReader::obj();
|
---|
| 311 | i->getInfo();
|
---|
[93] | 312 | // Update the drivers list at the same time
|
---|
[176] | 313 | vo_list = i->voList();
|
---|
| 314 | ao_list = i->aoList();
|
---|
[119] | 315 | updateDriverCombos();
|
---|
[93] | 316 | }
|
---|
| 317 |
|
---|
| 318 | TEST_AND_SET(pref->use_screenshot, useScreenshots());
|
---|
| 319 | TEST_AND_SET(pref->screenshot_directory, screenshotDir());
|
---|
[176] | 320 | #ifdef MPV_SUPPORT
|
---|
| 321 | TEST_AND_SET(pref->screenshot_template, screenshot_template_edit->text());
|
---|
| 322 | TEST_AND_SET(pref->screenshot_format, screenshotFormat());
|
---|
| 323 | #endif
|
---|
| 324 |
|
---|
[93] | 325 | TEST_AND_SET(pref->vo, VO());
|
---|
[176] | 326 | TEST_AND_SET(pref->ao, AO());
|
---|
[93] | 327 |
|
---|
[181] | 328 | TEST_AND_SET(pref->remember_media_settings, rememberSettings());
|
---|
| 329 | TEST_AND_SET(pref->remember_time_pos, rememberTimePos());
|
---|
| 330 | TEST_AND_SET(pref->remember_stream_settings, remember_streams_check->isChecked());
|
---|
[93] | 331 |
|
---|
| 332 | if (pref->file_settings_method != fileSettingsMethod()) {
|
---|
| 333 | pref->file_settings_method = fileSettingsMethod();
|
---|
| 334 | filesettings_method_changed = true;
|
---|
| 335 | }
|
---|
| 336 |
|
---|
| 337 | pref->audio_lang = audioLang();
|
---|
[176] | 338 | pref->subtitle_lang = subtitleLang();
|
---|
[93] | 339 |
|
---|
| 340 | pref->initial_audio_track = audioTrack();
|
---|
| 341 | pref->initial_subtitle_track = subtitleTrack();
|
---|
| 342 |
|
---|
| 343 | pref->close_on_finish = closeOnFinish();
|
---|
| 344 | pref->pause_when_hidden = pauseWhenHidden();
|
---|
| 345 |
|
---|
[170] | 346 | #ifdef AUTO_SHUTDOWN_PC
|
---|
| 347 | pref->auto_shutdown_pc = shutdown_check->isChecked();
|
---|
| 348 | #endif
|
---|
| 349 |
|
---|
[93] | 350 | TEST_AND_SET(pref->use_soft_video_eq, eq2());
|
---|
| 351 | TEST_AND_SET(pref->use_soft_vol, softVol());
|
---|
| 352 | pref->global_volume = globalVolume();
|
---|
| 353 | TEST_AND_SET(pref->use_audio_equalizer, useAudioEqualizer());
|
---|
[165] | 354 | pref->global_audio_equalizer = global_audio_equalizer_check->isChecked();
|
---|
[93] | 355 | TEST_AND_SET(pref->use_hwac3, Ac3DTSPassthrough());
|
---|
| 356 | pref->initial_volnorm = initialVolNorm();
|
---|
| 357 | TEST_AND_SET(pref->softvol_max, amplification());
|
---|
| 358 | pref->initial_postprocessing = initialPostprocessing();
|
---|
| 359 | pref->initial_deinterlace = initialDeinterlace();
|
---|
| 360 | pref->initial_zoom_factor = initialZoom();
|
---|
| 361 | TEST_AND_SET(pref->use_direct_rendering, directRendering());
|
---|
| 362 | TEST_AND_SET(pref->use_double_buffer, doubleBuffer());
|
---|
| 363 | TEST_AND_SET(pref->use_slices, useSlices());
|
---|
| 364 | pref->start_in_fullscreen = startInFullscreen();
|
---|
[188] | 365 |
|
---|
| 366 | #ifdef ADD_BLACKBORDERS_FS
|
---|
[93] | 367 | if (pref->add_blackborders_on_fullscreen != blackbordersOnFullscreen()) {
|
---|
| 368 | pref->add_blackborders_on_fullscreen = blackbordersOnFullscreen();
|
---|
| 369 | if (pref->fullscreen) requires_restart = true;
|
---|
| 370 | }
|
---|
[188] | 371 | #endif
|
---|
| 372 |
|
---|
| 373 | #ifdef INITIAL_BLACKBORDERS
|
---|
| 374 | pref->initial_blackborders = blackborders_check->isChecked();
|
---|
| 375 | #endif
|
---|
| 376 |
|
---|
[93] | 377 | TEST_AND_SET(pref->autoq, autoq());
|
---|
| 378 |
|
---|
[182] | 379 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
[165] | 380 | #ifdef SCREENSAVER_OFF
|
---|
| 381 | TEST_AND_SET(pref->turn_screensaver_off, turnScreensaverOff());
|
---|
| 382 | #endif
|
---|
| 383 | #ifdef AVOID_SCREENSAVER
|
---|
[93] | 384 | pref->avoid_screensaver = avoidScreensaver();
|
---|
[165] | 385 | #endif
|
---|
[93] | 386 | #else
|
---|
| 387 | TEST_AND_SET(pref->disable_screensaver, disableScreensaver());
|
---|
| 388 | #endif
|
---|
| 389 |
|
---|
| 390 | #if !defined(Q_OS_WIN) && !defined(Q_OS_OS2)
|
---|
[119] | 391 | pref->vdpau = vdpau;
|
---|
[93] | 392 | #endif
|
---|
| 393 |
|
---|
| 394 | pref->initial_audio_channels = audioChannels();
|
---|
| 395 | TEST_AND_SET(pref->use_scaletempo, scaleTempoFilter());
|
---|
| 396 |
|
---|
| 397 | TEST_AND_SET(pref->autosync, autoSyncActivated());
|
---|
| 398 | TEST_AND_SET(pref->autosync_factor, autoSyncFactor());
|
---|
| 399 |
|
---|
| 400 | TEST_AND_SET(pref->use_mc, mcActivated());
|
---|
| 401 | TEST_AND_SET(pref->mc_value, mc());
|
---|
| 402 | }
|
---|
| 403 |
|
---|
| 404 | void PrefGeneral::updateDriverCombos() {
|
---|
[176] | 405 | QString current_vo = VO();
|
---|
| 406 | QString current_ao = AO();
|
---|
[93] | 407 |
|
---|
| 408 | vo_combo->clear();
|
---|
| 409 | ao_combo->clear();
|
---|
| 410 |
|
---|
[181] | 411 | vo_combo->addItem(tr("Default"), "");
|
---|
| 412 | ao_combo->addItem(tr("Default"), "");
|
---|
[176] | 413 |
|
---|
[93] | 414 | QString vo;
|
---|
| 415 | for ( int n = 0; n < vo_list.count(); n++ ) {
|
---|
| 416 | vo = vo_list[n].name();
|
---|
[181] | 417 | #ifdef Q_OS_WIN
|
---|
[93] | 418 | if ( vo == "directx" ) {
|
---|
| 419 | vo_combo->addItem( "directx (" + tr("fast") + ")", "directx" );
|
---|
| 420 | vo_combo->addItem( "directx (" + tr("slow") + ")", "directx:noaccel" );
|
---|
| 421 | }
|
---|
| 422 | else
|
---|
[181] | 423 | #else
|
---|
| 424 | #ifdef Q_OS_OS2
|
---|
[119] | 425 | if ( vo == "kva") {
|
---|
| 426 | vo_combo->addItem( "kva (" + tr("fast") + ")", "kva" );
|
---|
[112] | 427 | vo_combo->addItem( "kva (" + tr("snap mode") + ")", "kva:snap" );
|
---|
| 428 | vo_combo->addItem( "kva (" + tr("slower dive mode") + ")", "kva:dive" );
|
---|
[119] | 429 | }
|
---|
| 430 | else
|
---|
[181] | 431 | #else
|
---|
[93] | 432 | /*
|
---|
| 433 | if (vo == "xv") vo_combo->addItem( "xv (" + tr("fastest") + ")", vo);
|
---|
| 434 | else
|
---|
| 435 | */
|
---|
[181] | 436 | #if USE_XV_ADAPTORS
|
---|
[93] | 437 | if ((vo == "xv") && (!xv_adaptors.isEmpty())) {
|
---|
| 438 | vo_combo->addItem(vo, vo);
|
---|
| 439 | for (int n=0; n < xv_adaptors.count(); n++) {
|
---|
| 440 | vo_combo->addItem( "xv (" + xv_adaptors[n].ID().toString() + " - " + xv_adaptors[n].desc() + ")",
|
---|
| 441 | "xv:adaptor=" + xv_adaptors[n].ID().toString() );
|
---|
| 442 | }
|
---|
| 443 | }
|
---|
| 444 | else
|
---|
[181] | 445 | #endif // USE_XV_ADAPTORS
|
---|
| 446 | #endif
|
---|
| 447 | #endif
|
---|
[93] | 448 | if (vo == "x11") vo_combo->addItem( "x11 (" + tr("slow") + ")", vo);
|
---|
| 449 | else
|
---|
| 450 | if (vo == "gl") {
|
---|
| 451 | vo_combo->addItem( vo, vo);
|
---|
| 452 | vo_combo->addItem( "gl (" + tr("fast") + ")", "gl:yuv=2:force-pbo");
|
---|
| 453 | vo_combo->addItem( "gl (" + tr("fast - ATI cards") + ")", "gl:yuv=2:force-pbo:ati-hack");
|
---|
| 454 | vo_combo->addItem( "gl (yuv)", "gl:yuv=3");
|
---|
| 455 | }
|
---|
| 456 | else
|
---|
| 457 | if (vo == "gl2") {
|
---|
| 458 | vo_combo->addItem( vo, vo);
|
---|
| 459 | vo_combo->addItem( "gl2 (yuv)", "gl2:yuv=3");
|
---|
| 460 | }
|
---|
| 461 | else
|
---|
[139] | 462 | if (vo == "gl_tiled") {
|
---|
| 463 | vo_combo->addItem( vo, vo);
|
---|
| 464 | vo_combo->addItem( "gl_tiled (yuv)", "gl_tiled:yuv=3");
|
---|
| 465 | }
|
---|
| 466 | else
|
---|
[93] | 467 | if (vo == "null" || vo == "png" || vo == "jpeg" || vo == "gif89a" ||
|
---|
| 468 | vo == "tga" || vo == "pnm" || vo == "md5sum" )
|
---|
| 469 | {
|
---|
| 470 | ; // Nothing to do
|
---|
| 471 | }
|
---|
| 472 | else
|
---|
| 473 | vo_combo->addItem( vo, vo );
|
---|
| 474 | }
|
---|
| 475 | vo_combo->addItem( tr("User defined..."), "user_defined" );
|
---|
| 476 |
|
---|
| 477 | QString ao;
|
---|
| 478 | for ( int n = 0; n < ao_list.count(); n++) {
|
---|
| 479 | ao = ao_list[n].name();
|
---|
[112] | 480 | ao_combo->addItem( ao, ao );
|
---|
[188] | 481 | /*
|
---|
[181] | 482 | #ifdef Q_OS_OS2
|
---|
[119] | 483 | if ( ao == "kai") {
|
---|
[112] | 484 | ao_combo->addItem( "kai (" + tr("uniaud mode") + ")", "kai:uniaud" );
|
---|
| 485 | ao_combo->addItem( "kai (" + tr("dart mode") + ")", "kai:dart" );
|
---|
[119] | 486 | }
|
---|
[181] | 487 | #endif
|
---|
[188] | 488 | */
|
---|
[181] | 489 | #if USE_ALSA_DEVICES
|
---|
[93] | 490 | if ((ao == "alsa") && (!alsa_devices.isEmpty())) {
|
---|
| 491 | for (int n=0; n < alsa_devices.count(); n++) {
|
---|
[188] | 492 | ao_combo->addItem( DeviceInfo::printableName("alsa", alsa_devices[n]), DeviceInfo::internalName("alsa", alsa_devices[n]) );
|
---|
[93] | 493 | }
|
---|
| 494 | }
|
---|
[181] | 495 | #endif
|
---|
[188] | 496 | #if USE_MPV_ALSA_DEVICES
|
---|
| 497 | if ((ao == "alsa") && (!mpv_alsa_devices.isEmpty())) {
|
---|
| 498 | for (int n=0; n < mpv_alsa_devices.count(); n++) {
|
---|
| 499 | ao_combo->addItem( DeviceInfo::printableName("alsa", mpv_alsa_devices[n]), DeviceInfo::internalName("alsa", mpv_alsa_devices[n]) );
|
---|
| 500 | }
|
---|
| 501 | }
|
---|
| 502 | #endif
|
---|
| 503 | #if USE_PULSEAUDIO_DEVICES
|
---|
| 504 | if ((ao == "pulse") && (!pa_devices.isEmpty())) {
|
---|
| 505 | for (int n=0; n < pa_devices.count(); n++) {
|
---|
| 506 | ao_combo->addItem( DeviceInfo::printableName("pulse", pa_devices[n]), DeviceInfo::internalName("pulse", pa_devices[n]) );
|
---|
| 507 | }
|
---|
| 508 | }
|
---|
| 509 | #endif
|
---|
[181] | 510 | #if USE_DSOUND_DEVICES
|
---|
[93] | 511 | if ((ao == "dsound") && (!dsound_devices.isEmpty())) {
|
---|
| 512 | for (int n=0; n < dsound_devices.count(); n++) {
|
---|
[188] | 513 | ao_combo->addItem( DeviceInfo::printableName("dsound", dsound_devices[n]), DeviceInfo::internalName("dsound", dsound_devices[n]) );
|
---|
[93] | 514 | }
|
---|
| 515 | }
|
---|
[181] | 516 | #endif
|
---|
[93] | 517 | }
|
---|
| 518 | ao_combo->addItem( tr("User defined..."), "user_defined" );
|
---|
| 519 |
|
---|
[176] | 520 | setVO(current_vo);
|
---|
| 521 | setAO(current_ao);
|
---|
[93] | 522 | }
|
---|
| 523 |
|
---|
| 524 | void PrefGeneral::setMplayerPath( QString path ) {
|
---|
[176] | 525 | mplayerbin_edit->setText( path );
|
---|
| 526 |
|
---|
| 527 | #ifdef MPLAYER_MPV_SELECTION
|
---|
| 528 | if (path == PLAYER_COMBO_MPLAYER_PATH) {
|
---|
| 529 | player_combo->setCurrentIndex(PLAYER_COMBO_MPLAYER);
|
---|
| 530 | }
|
---|
| 531 | else
|
---|
| 532 | if (path == PLAYER_COMBO_MPV_PATH) {
|
---|
| 533 | player_combo->setCurrentIndex(PLAYER_COMBO_MPV);
|
---|
| 534 | }
|
---|
| 535 | else {
|
---|
| 536 | player_combo->setCurrentIndex(PLAYER_COMBO_OTHER);
|
---|
| 537 | }
|
---|
| 538 | #endif
|
---|
[93] | 539 | }
|
---|
| 540 |
|
---|
| 541 | QString PrefGeneral::mplayerPath() {
|
---|
[176] | 542 | #ifdef MPLAYER_MPV_SELECTION
|
---|
| 543 | if (player_combo->currentIndex() == PLAYER_COMBO_MPLAYER) {
|
---|
| 544 | return PLAYER_COMBO_MPLAYER_PATH;
|
---|
| 545 | }
|
---|
| 546 | else
|
---|
| 547 | if (player_combo->currentIndex() == PLAYER_COMBO_MPV) {
|
---|
| 548 | return PLAYER_COMBO_MPV_PATH;
|
---|
| 549 | }
|
---|
| 550 | else
|
---|
| 551 | #endif
|
---|
[93] | 552 | return mplayerbin_edit->text();
|
---|
| 553 | }
|
---|
| 554 |
|
---|
| 555 | void PrefGeneral::setUseScreenshots(bool b) {
|
---|
| 556 | use_screenshots_check->setChecked(b);
|
---|
| 557 | }
|
---|
| 558 |
|
---|
| 559 | bool PrefGeneral::useScreenshots() {
|
---|
| 560 | return use_screenshots_check->isChecked();
|
---|
| 561 | }
|
---|
| 562 |
|
---|
| 563 | void PrefGeneral::setScreenshotDir( QString path ) {
|
---|
| 564 | screenshot_edit->setText( path );
|
---|
| 565 | }
|
---|
| 566 |
|
---|
| 567 | QString PrefGeneral::screenshotDir() {
|
---|
[188] | 568 | return screenshot_edit->text().trimmed();
|
---|
[93] | 569 | }
|
---|
| 570 |
|
---|
[176] | 571 | #ifdef MPV_SUPPORT
|
---|
| 572 | void PrefGeneral::setScreenshotFormat(const QString format) {
|
---|
| 573 | int i = screenshot_format_combo->findText(format);
|
---|
| 574 | if (i < 0) i = 0;
|
---|
| 575 | screenshot_format_combo->setCurrentIndex(i);
|
---|
| 576 | }
|
---|
| 577 |
|
---|
| 578 | QString PrefGeneral::screenshotFormat() {
|
---|
| 579 | return screenshot_format_combo->currentText();
|
---|
| 580 | }
|
---|
| 581 | #endif
|
---|
| 582 |
|
---|
[93] | 583 | void PrefGeneral::setVO( QString vo_driver ) {
|
---|
| 584 | int idx = vo_combo->findData( vo_driver );
|
---|
| 585 | if (idx != -1) {
|
---|
| 586 | vo_combo->setCurrentIndex(idx);
|
---|
| 587 | } else {
|
---|
| 588 | vo_combo->setCurrentIndex(vo_combo->findData("user_defined"));
|
---|
| 589 | vo_user_defined_edit->setText(vo_driver);
|
---|
| 590 | }
|
---|
| 591 | vo_combo_changed(vo_combo->currentIndex());
|
---|
| 592 | }
|
---|
| 593 |
|
---|
| 594 | void PrefGeneral::setAO( QString ao_driver ) {
|
---|
| 595 | int idx = ao_combo->findData( ao_driver );
|
---|
| 596 | if (idx != -1) {
|
---|
| 597 | ao_combo->setCurrentIndex(idx);
|
---|
| 598 | } else {
|
---|
| 599 | ao_combo->setCurrentIndex(ao_combo->findData("user_defined"));
|
---|
| 600 | ao_user_defined_edit->setText(ao_driver);
|
---|
| 601 | }
|
---|
| 602 | ao_combo_changed(ao_combo->currentIndex());
|
---|
| 603 | }
|
---|
| 604 |
|
---|
| 605 | QString PrefGeneral::VO() {
|
---|
| 606 | QString vo = vo_combo->itemData(vo_combo->currentIndex()).toString();
|
---|
| 607 | if (vo == "user_defined") {
|
---|
| 608 | vo = vo_user_defined_edit->text();
|
---|
| 609 | /*
|
---|
| 610 | if (vo.isEmpty()) {
|
---|
| 611 | vo = vo_combo->itemData(0).toString();
|
---|
| 612 | qDebug("PrefGeneral::VO: user defined vo is empty, using %s", vo.toUtf8().constData());
|
---|
| 613 | }
|
---|
| 614 | */
|
---|
| 615 | }
|
---|
| 616 | return vo;
|
---|
| 617 | }
|
---|
| 618 |
|
---|
| 619 | QString PrefGeneral::AO() {
|
---|
| 620 | QString ao = ao_combo->itemData(ao_combo->currentIndex()).toString();
|
---|
| 621 | if (ao == "user_defined") {
|
---|
| 622 | ao = ao_user_defined_edit->text();
|
---|
| 623 | /*
|
---|
| 624 | if (ao.isEmpty()) {
|
---|
| 625 | ao = ao_combo->itemData(0).toString();
|
---|
| 626 | qDebug("PrefGeneral::AO: user defined ao is empty, using %s", ao.toUtf8().constData());
|
---|
| 627 | }
|
---|
| 628 | */
|
---|
| 629 | }
|
---|
| 630 | return ao;
|
---|
| 631 | }
|
---|
| 632 |
|
---|
| 633 | void PrefGeneral::setRememberSettings(bool b) {
|
---|
| 634 | remember_all_check->setChecked(b);
|
---|
| 635 | //rememberAllButtonToggled(b);
|
---|
| 636 | }
|
---|
| 637 |
|
---|
| 638 | bool PrefGeneral::rememberSettings() {
|
---|
| 639 | return remember_all_check->isChecked();
|
---|
| 640 | }
|
---|
| 641 |
|
---|
| 642 | void PrefGeneral::setRememberTimePos(bool b) {
|
---|
| 643 | remember_time_check->setChecked(b);
|
---|
| 644 | }
|
---|
| 645 |
|
---|
| 646 | bool PrefGeneral::rememberTimePos() {
|
---|
| 647 | return remember_time_check->isChecked();
|
---|
| 648 | }
|
---|
| 649 |
|
---|
| 650 | void PrefGeneral::setFileSettingsMethod(QString method) {
|
---|
| 651 | int index = filesettings_method_combo->findData(method);
|
---|
| 652 | if (index < 0) index = 0;
|
---|
| 653 | filesettings_method_combo->setCurrentIndex(index);
|
---|
| 654 | }
|
---|
| 655 |
|
---|
| 656 | QString PrefGeneral::fileSettingsMethod() {
|
---|
| 657 | return filesettings_method_combo->itemData(filesettings_method_combo->currentIndex()).toString();
|
---|
| 658 | }
|
---|
| 659 |
|
---|
| 660 | void PrefGeneral::setAudioLang(QString lang) {
|
---|
| 661 | audio_lang_edit->setText(lang);
|
---|
| 662 | }
|
---|
| 663 |
|
---|
| 664 | QString PrefGeneral::audioLang() {
|
---|
| 665 | return audio_lang_edit->text();
|
---|
| 666 | }
|
---|
| 667 |
|
---|
| 668 | void PrefGeneral::setSubtitleLang(QString lang) {
|
---|
| 669 | subtitle_lang_edit->setText(lang);
|
---|
| 670 | }
|
---|
| 671 |
|
---|
| 672 | QString PrefGeneral::subtitleLang() {
|
---|
| 673 | return subtitle_lang_edit->text();
|
---|
| 674 | }
|
---|
| 675 |
|
---|
| 676 | void PrefGeneral::setAudioTrack(int track) {
|
---|
| 677 | audio_track_spin->setValue(track);
|
---|
| 678 | }
|
---|
| 679 |
|
---|
| 680 | int PrefGeneral::audioTrack() {
|
---|
| 681 | return audio_track_spin->value();
|
---|
| 682 | }
|
---|
| 683 |
|
---|
| 684 | void PrefGeneral::setSubtitleTrack(int track) {
|
---|
| 685 | subtitle_track_spin->setValue(track);
|
---|
| 686 | }
|
---|
| 687 |
|
---|
| 688 | int PrefGeneral::subtitleTrack() {
|
---|
| 689 | return subtitle_track_spin->value();
|
---|
| 690 | }
|
---|
| 691 |
|
---|
| 692 | void PrefGeneral::setCloseOnFinish(bool b) {
|
---|
| 693 | close_on_finish_check->setChecked(b);
|
---|
| 694 | }
|
---|
| 695 |
|
---|
| 696 | bool PrefGeneral::closeOnFinish() {
|
---|
| 697 | return close_on_finish_check->isChecked();
|
---|
| 698 | }
|
---|
| 699 |
|
---|
| 700 | void PrefGeneral::setPauseWhenHidden(bool b) {
|
---|
| 701 | pause_if_hidden_check->setChecked(b);
|
---|
| 702 | }
|
---|
| 703 |
|
---|
| 704 | bool PrefGeneral::pauseWhenHidden() {
|
---|
| 705 | return pause_if_hidden_check->isChecked();
|
---|
| 706 | }
|
---|
| 707 |
|
---|
| 708 |
|
---|
| 709 | void PrefGeneral::setEq2(bool b) {
|
---|
| 710 | eq2_check->setChecked(b);
|
---|
| 711 | }
|
---|
| 712 |
|
---|
| 713 | bool PrefGeneral::eq2() {
|
---|
| 714 | return eq2_check->isChecked();
|
---|
| 715 | }
|
---|
| 716 |
|
---|
| 717 | void PrefGeneral::setSoftVol(bool b) {
|
---|
| 718 | softvol_check->setChecked(b);
|
---|
| 719 | }
|
---|
| 720 |
|
---|
| 721 | void PrefGeneral::setGlobalVolume(bool b) {
|
---|
| 722 | global_volume_check->setChecked(b);
|
---|
| 723 | }
|
---|
| 724 |
|
---|
| 725 | bool PrefGeneral::globalVolume() {
|
---|
| 726 | return global_volume_check->isChecked();
|
---|
| 727 | }
|
---|
| 728 |
|
---|
| 729 | bool PrefGeneral::softVol() {
|
---|
| 730 | return softvol_check->isChecked();
|
---|
| 731 | }
|
---|
| 732 |
|
---|
| 733 | void PrefGeneral::setAutoSyncFactor(int factor) {
|
---|
| 734 | autosync_spin->setValue(factor);
|
---|
| 735 | }
|
---|
| 736 |
|
---|
| 737 | int PrefGeneral::autoSyncFactor() {
|
---|
| 738 | return autosync_spin->value();
|
---|
| 739 | }
|
---|
| 740 |
|
---|
| 741 | void PrefGeneral::setAutoSyncActivated(bool b) {
|
---|
| 742 | autosync_check->setChecked(b);
|
---|
| 743 | }
|
---|
| 744 |
|
---|
| 745 | bool PrefGeneral::autoSyncActivated() {
|
---|
| 746 | return autosync_check->isChecked();
|
---|
| 747 | }
|
---|
| 748 |
|
---|
| 749 | void PrefGeneral::setMc(double value) {
|
---|
| 750 | mc_spin->setValue(value);
|
---|
| 751 | }
|
---|
| 752 |
|
---|
| 753 | double PrefGeneral::mc() {
|
---|
| 754 | return mc_spin->value();
|
---|
| 755 | }
|
---|
| 756 |
|
---|
| 757 | void PrefGeneral::setMcActivated(bool b) {
|
---|
| 758 | use_mc_check->setChecked(b);
|
---|
| 759 | }
|
---|
| 760 |
|
---|
| 761 | bool PrefGeneral::mcActivated() {
|
---|
| 762 | return use_mc_check->isChecked();
|
---|
| 763 | }
|
---|
| 764 |
|
---|
| 765 | void PrefGeneral::setUseAudioEqualizer(bool b) {
|
---|
| 766 | audio_equalizer_check->setChecked(b);
|
---|
| 767 | }
|
---|
| 768 |
|
---|
| 769 | bool PrefGeneral::useAudioEqualizer() {
|
---|
| 770 | return audio_equalizer_check->isChecked();
|
---|
| 771 | }
|
---|
| 772 |
|
---|
| 773 | void PrefGeneral::setAc3DTSPassthrough(bool b) {
|
---|
| 774 | hwac3_check->setChecked(b);
|
---|
| 775 | }
|
---|
| 776 |
|
---|
| 777 | bool PrefGeneral::Ac3DTSPassthrough() {
|
---|
| 778 | return hwac3_check->isChecked();
|
---|
| 779 | }
|
---|
| 780 |
|
---|
| 781 | void PrefGeneral::setInitialVolNorm(bool b) {
|
---|
| 782 | volnorm_check->setChecked(b);
|
---|
| 783 | }
|
---|
| 784 |
|
---|
| 785 | bool PrefGeneral::initialVolNorm() {
|
---|
| 786 | return volnorm_check->isChecked();
|
---|
| 787 | }
|
---|
| 788 |
|
---|
| 789 | void PrefGeneral::setInitialPostprocessing(bool b) {
|
---|
| 790 | postprocessing_check->setChecked(b);
|
---|
| 791 | }
|
---|
| 792 |
|
---|
| 793 | bool PrefGeneral::initialPostprocessing() {
|
---|
| 794 | return postprocessing_check->isChecked();
|
---|
| 795 | }
|
---|
| 796 |
|
---|
| 797 | void PrefGeneral::setInitialDeinterlace(int ID) {
|
---|
| 798 | int pos = deinterlace_combo->findData(ID);
|
---|
| 799 | if (pos != -1) {
|
---|
| 800 | deinterlace_combo->setCurrentIndex(pos);
|
---|
| 801 | } else {
|
---|
| 802 | qWarning("PrefGeneral::setInitialDeinterlace: ID: %d not found in combo", ID);
|
---|
| 803 | }
|
---|
| 804 | }
|
---|
| 805 |
|
---|
| 806 | int PrefGeneral::initialDeinterlace() {
|
---|
| 807 | if (deinterlace_combo->currentIndex() != -1) {
|
---|
| 808 | return deinterlace_combo->itemData( deinterlace_combo->currentIndex() ).toInt();
|
---|
| 809 | } else {
|
---|
| 810 | qWarning("PrefGeneral::initialDeinterlace: no item selected");
|
---|
| 811 | return 0;
|
---|
| 812 | }
|
---|
| 813 | }
|
---|
| 814 |
|
---|
| 815 | void PrefGeneral::setInitialZoom(double v) {
|
---|
| 816 | zoom_spin->setValue(v);
|
---|
| 817 | }
|
---|
| 818 |
|
---|
| 819 | double PrefGeneral::initialZoom() {
|
---|
| 820 | return zoom_spin->value();
|
---|
| 821 | }
|
---|
| 822 |
|
---|
| 823 | void PrefGeneral::setDirectRendering(bool b) {
|
---|
| 824 | direct_rendering_check->setChecked(b);
|
---|
| 825 | }
|
---|
| 826 |
|
---|
| 827 | bool PrefGeneral::directRendering() {
|
---|
| 828 | return direct_rendering_check->isChecked();
|
---|
| 829 | }
|
---|
| 830 |
|
---|
| 831 | void PrefGeneral::setDoubleBuffer(bool b) {
|
---|
| 832 | double_buffer_check->setChecked(b);
|
---|
| 833 | }
|
---|
| 834 |
|
---|
| 835 | bool PrefGeneral::doubleBuffer() {
|
---|
| 836 | return double_buffer_check->isChecked();
|
---|
| 837 | }
|
---|
| 838 |
|
---|
| 839 | void PrefGeneral::setUseSlices(bool b) {
|
---|
| 840 | use_slices_check->setChecked(b);
|
---|
| 841 | }
|
---|
| 842 |
|
---|
| 843 | bool PrefGeneral::useSlices() {
|
---|
| 844 | return use_slices_check->isChecked();
|
---|
| 845 | }
|
---|
| 846 |
|
---|
| 847 | void PrefGeneral::setAmplification(int n) {
|
---|
| 848 | softvol_max_spin->setValue(n);
|
---|
| 849 | }
|
---|
| 850 |
|
---|
| 851 | int PrefGeneral::amplification() {
|
---|
| 852 | return softvol_max_spin->value();
|
---|
| 853 | }
|
---|
| 854 |
|
---|
| 855 | void PrefGeneral::setAudioChannels(int ID) {
|
---|
| 856 | int pos = channels_combo->findData(ID);
|
---|
| 857 | if (pos != -1) {
|
---|
| 858 | channels_combo->setCurrentIndex(pos);
|
---|
| 859 | } else {
|
---|
| 860 | qWarning("PrefGeneral::setAudioChannels: ID: %d not found in combo", ID);
|
---|
| 861 | }
|
---|
| 862 | }
|
---|
| 863 |
|
---|
| 864 | int PrefGeneral::audioChannels() {
|
---|
| 865 | if (channels_combo->currentIndex() != -1) {
|
---|
| 866 | return channels_combo->itemData( channels_combo->currentIndex() ).toInt();
|
---|
| 867 | } else {
|
---|
| 868 | qWarning("PrefGeneral::audioChannels: no item selected");
|
---|
| 869 | return 0;
|
---|
| 870 | }
|
---|
| 871 | }
|
---|
| 872 |
|
---|
| 873 | void PrefGeneral::setStartInFullscreen(bool b) {
|
---|
| 874 | start_fullscreen_check->setChecked(b);
|
---|
| 875 | }
|
---|
| 876 |
|
---|
| 877 | bool PrefGeneral::startInFullscreen() {
|
---|
| 878 | return start_fullscreen_check->isChecked();
|
---|
| 879 | }
|
---|
| 880 |
|
---|
[182] | 881 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
[165] | 882 | #ifdef AVOID_SCREENSAVER
|
---|
[93] | 883 | void PrefGeneral::setAvoidScreensaver(bool b) {
|
---|
| 884 | avoid_screensaver_check->setChecked(b);
|
---|
| 885 | }
|
---|
| 886 |
|
---|
| 887 | bool PrefGeneral::avoidScreensaver() {
|
---|
| 888 | return avoid_screensaver_check->isChecked();
|
---|
| 889 | }
|
---|
[165] | 890 | #endif
|
---|
[93] | 891 |
|
---|
[165] | 892 | #ifdef SCREENSAVER_OFF
|
---|
[93] | 893 | void PrefGeneral::setTurnScreensaverOff(bool b) {
|
---|
| 894 | turn_screensaver_off_check->setChecked(b);
|
---|
| 895 | }
|
---|
| 896 |
|
---|
| 897 | bool PrefGeneral::turnScreensaverOff() {
|
---|
| 898 | return turn_screensaver_off_check->isChecked();
|
---|
| 899 | }
|
---|
[165] | 900 | #endif
|
---|
| 901 |
|
---|
[93] | 902 | #else
|
---|
| 903 | void PrefGeneral::setDisableScreensaver(bool b) {
|
---|
| 904 | screensaver_check->setChecked(b);
|
---|
| 905 | }
|
---|
| 906 |
|
---|
| 907 | bool PrefGeneral::disableScreensaver() {
|
---|
| 908 | return screensaver_check->isChecked();
|
---|
| 909 | }
|
---|
| 910 | #endif
|
---|
| 911 |
|
---|
[188] | 912 | #ifdef ADD_BLACKBORDERS_FS
|
---|
[93] | 913 | void PrefGeneral::setBlackbordersOnFullscreen(bool b) {
|
---|
| 914 | blackborders_on_fs_check->setChecked(b);
|
---|
| 915 | }
|
---|
| 916 |
|
---|
| 917 | bool PrefGeneral::blackbordersOnFullscreen() {
|
---|
| 918 | return blackborders_on_fs_check->isChecked();
|
---|
| 919 | }
|
---|
[188] | 920 | #endif
|
---|
[93] | 921 |
|
---|
| 922 | void PrefGeneral::setAutoq(int n) {
|
---|
| 923 | autoq_spin->setValue(n);
|
---|
| 924 | }
|
---|
| 925 |
|
---|
| 926 | int PrefGeneral::autoq() {
|
---|
| 927 | return autoq_spin->value();
|
---|
| 928 | }
|
---|
| 929 |
|
---|
| 930 | void PrefGeneral::setScaleTempoFilter(Preferences::OptionState value) {
|
---|
| 931 | scaletempo_combo->setState(value);
|
---|
| 932 | }
|
---|
| 933 |
|
---|
| 934 | Preferences::OptionState PrefGeneral::scaleTempoFilter() {
|
---|
| 935 | return scaletempo_combo->state();
|
---|
| 936 | }
|
---|
| 937 |
|
---|
[176] | 938 | #ifdef MPLAYER_MPV_SELECTION
|
---|
| 939 | void PrefGeneral::player_combo_changed(int idx) {
|
---|
| 940 | qDebug("PrefGeneral::player_combo_changed: %d", idx);
|
---|
| 941 | int d = player_combo->itemData(idx).toInt();
|
---|
| 942 | if (d == PLAYER_COMBO_OTHER) {
|
---|
| 943 | player_spacer->changeSize(0, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
|
---|
| 944 | mplayerbin_edit->setVisible(true);
|
---|
| 945 | //mplayerbin_edit->setFocus();
|
---|
| 946 | } else {
|
---|
| 947 | player_spacer->changeSize(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
---|
| 948 | mplayerbin_edit->setVisible(false);
|
---|
| 949 | }
|
---|
| 950 | }
|
---|
| 951 | #endif
|
---|
| 952 |
|
---|
[93] | 953 | void PrefGeneral::vo_combo_changed(int idx) {
|
---|
| 954 | qDebug("PrefGeneral::vo_combo_changed: %d", idx);
|
---|
| 955 | bool visible = (vo_combo->itemData(idx).toString() == "user_defined");
|
---|
[165] | 956 | vo_user_defined_edit->setVisible(visible);
|
---|
[93] | 957 | vo_user_defined_edit->setFocus();
|
---|
[119] | 958 |
|
---|
| 959 | #ifndef Q_OS_WIN
|
---|
| 960 | bool vdpau_button_visible = (vo_combo->itemData(idx).toString() == "vdpau");
|
---|
[165] | 961 | vdpau_button->setVisible(vdpau_button_visible);
|
---|
[119] | 962 | #endif
|
---|
[93] | 963 | }
|
---|
| 964 |
|
---|
| 965 | void PrefGeneral::ao_combo_changed(int idx) {
|
---|
| 966 | qDebug("PrefGeneral::ao_combo_changed: %d", idx);
|
---|
| 967 | bool visible = (ao_combo->itemData(idx).toString() == "user_defined");
|
---|
[165] | 968 | ao_user_defined_edit->setVisible(visible);
|
---|
[93] | 969 | ao_user_defined_edit->setFocus();
|
---|
| 970 | }
|
---|
| 971 |
|
---|
[119] | 972 | #ifndef Q_OS_WIN
|
---|
| 973 | void PrefGeneral::on_vdpau_button_clicked() {
|
---|
| 974 | qDebug("PrefGeneral::on_vdpau_button_clicked");
|
---|
| 975 |
|
---|
| 976 | VDPAUProperties d(this);
|
---|
| 977 |
|
---|
| 978 | d.setffh264vdpau(vdpau.ffh264vdpau);
|
---|
| 979 | d.setffmpeg12vdpau(vdpau.ffmpeg12vdpau);
|
---|
| 980 | d.setffwmv3vdpau(vdpau.ffwmv3vdpau);
|
---|
| 981 | d.setffvc1vdpau(vdpau.ffvc1vdpau);
|
---|
| 982 | d.setffodivxvdpau(vdpau.ffodivxvdpau);
|
---|
| 983 |
|
---|
| 984 | d.setDisableFilters(vdpau.disable_video_filters);
|
---|
| 985 |
|
---|
| 986 | if (d.exec() == QDialog::Accepted) {
|
---|
| 987 | vdpau.ffh264vdpau = d.ffh264vdpau();
|
---|
| 988 | vdpau.ffmpeg12vdpau = d.ffmpeg12vdpau();
|
---|
| 989 | vdpau.ffwmv3vdpau = d.ffwmv3vdpau();
|
---|
| 990 | vdpau.ffvc1vdpau = d.ffvc1vdpau();
|
---|
| 991 | vdpau.ffodivxvdpau = d.ffodivxvdpau();
|
---|
| 992 |
|
---|
| 993 | vdpau.disable_video_filters = d.disableFilters();
|
---|
| 994 | }
|
---|
| 995 | }
|
---|
| 996 | #endif
|
---|
| 997 |
|
---|
[93] | 998 | void PrefGeneral::createHelp() {
|
---|
| 999 | clearHelp();
|
---|
| 1000 |
|
---|
| 1001 | addSectionTitle(tr("General"));
|
---|
| 1002 |
|
---|
[176] | 1003 | #ifdef MPLAYER_MPV_SELECTION
|
---|
| 1004 | setWhatsThis(player_combo, tr("Multimedia engine"),
|
---|
| 1005 | tr("Select which multimedia engine you want to use, either MPlayer or mpv.") +" "+
|
---|
| 1006 | tr("The option 'other' allows you to manually select the path of the executable.") );
|
---|
| 1007 | #endif
|
---|
| 1008 |
|
---|
| 1009 | setWhatsThis(mplayerbin_edit, tr("%1 executable").arg(PLAYER_NAME),
|
---|
| 1010 | tr("Here you must specify the %1 "
|
---|
| 1011 | "executable that SMPlayer will use.").arg(PLAYER_NAME) + "<br><b>" +
|
---|
[93] | 1012 | tr("If this setting is wrong, SMPlayer won't be able to play "
|
---|
| 1013 | "anything!") + "</b>");
|
---|
| 1014 |
|
---|
| 1015 | setWhatsThis(remember_all_check, tr("Remember settings"),
|
---|
| 1016 | tr("Usually SMPlayer will remember the settings for each file you "
|
---|
| 1017 | "play (audio track selected, volume, filters...). Disable this "
|
---|
| 1018 | "option if you don't like this feature.") );
|
---|
| 1019 |
|
---|
| 1020 | setWhatsThis(remember_time_check, tr("Remember time position"),
|
---|
| 1021 | tr("If you check this option, SMPlayer will remember the last position "
|
---|
| 1022 | "of the file when you open it again. This option works only with "
|
---|
| 1023 | "regular files (not with DVDs, CDs, URLs...).") );
|
---|
| 1024 |
|
---|
[181] | 1025 | setWhatsThis(remember_streams_check, tr("Remember settings for streams"),
|
---|
| 1026 | tr("When this option is enabled the settings for online streams will be remembered as well."));
|
---|
| 1027 |
|
---|
[93] | 1028 | setWhatsThis(filesettings_method_combo, tr("Method to store the file settings"),
|
---|
| 1029 | tr("This option allows to change the way the file settings would be "
|
---|
| 1030 | "stored. The following options are available:") +"<ul><li>" +
|
---|
| 1031 | tr("<b>one ini file</b>: the settings for all played files will be "
|
---|
| 1032 | "saved in a single ini file (%1)").arg(QString("<i>"+Paths::iniPath()+"/smplayer.ini</i>")) + "</li><li>" +
|
---|
| 1033 | tr("<b>multiple ini files</b>: one ini file will be used for each played file. "
|
---|
| 1034 | "Those ini files will be saved in the folder %1").arg(QString("<i>"+Paths::iniPath()+"/file_settings</i>")) + "</li></ul>" +
|
---|
| 1035 | tr("The latter method could be faster if there is info for a lot of files.") );
|
---|
| 1036 |
|
---|
| 1037 | setWhatsThis(use_screenshots_check, tr("Enable screenshots"),
|
---|
| 1038 | tr("You can use this option to enable or disable the possibility to "
|
---|
| 1039 | "take screenshots.") );
|
---|
| 1040 |
|
---|
| 1041 | setWhatsThis(screenshot_edit, tr("Screenshots folder"),
|
---|
| 1042 | tr("Here you can specify a folder where the screenshots taken by "
|
---|
| 1043 | "SMPlayer will be stored. If the folder is not valid the "
|
---|
| 1044 | "screenshot feature will be disabled.") );
|
---|
| 1045 |
|
---|
[176] | 1046 | #ifdef MPV_SUPPORT
|
---|
| 1047 | setWhatsThis(screenshot_template_edit, tr("Template for screenshots"),
|
---|
| 1048 | tr("This option specifies the filename template used to save screenshots.") + " " +
|
---|
| 1049 | tr("For example %1 would save the screenshot as 'moviename_0001.png'.").arg("%F_%04n") + "<br>" +
|
---|
| 1050 | tr("%1 specifies the filename of the video without the extension, "
|
---|
| 1051 | "%2 adds a 4 digit number padded with zeros.").arg("%F").arg("%04n") + " " +
|
---|
| 1052 | tr("For a full list of the template specifiers visit this link:") +
|
---|
| 1053 | " <a href=\"http://mpv.io/manual/stable/#options-screenshot-template\">"
|
---|
| 1054 | "http://mpv.io/manual/stable/#options-screenshot-template</a>"
|
---|
| 1055 | #ifdef MPLAYER_SUPPORT
|
---|
| 1056 | + "<br>" + tr("This option only works with mpv.")
|
---|
| 1057 | #endif
|
---|
| 1058 | );
|
---|
| 1059 |
|
---|
| 1060 | setWhatsThis(screenshot_format_combo, tr("Format for screenshots"),
|
---|
| 1061 | tr("This option allows to choose the image file type used for saving screenshots.")
|
---|
| 1062 | #ifdef MPLAYER_SUPPORT
|
---|
| 1063 | + " " + tr("This option only works with mpv.")
|
---|
| 1064 | #endif
|
---|
| 1065 | );
|
---|
| 1066 | #endif
|
---|
| 1067 |
|
---|
[93] | 1068 | setWhatsThis(pause_if_hidden_check, tr("Pause when minimized"),
|
---|
| 1069 | tr("If this option is enabled, the file will be paused when the "
|
---|
| 1070 | "main window is hidden. When the window is restored, playback "
|
---|
| 1071 | "will be resumed.") );
|
---|
| 1072 |
|
---|
[170] | 1073 | setWhatsThis(close_on_finish_check, tr("Close when finished"),
|
---|
| 1074 | tr("If this option is checked, the main window will be automatically "
|
---|
| 1075 | "closed when the current file/playlist finishes.") );
|
---|
| 1076 |
|
---|
| 1077 | #ifdef AUTO_SHUTDOWN_PC
|
---|
| 1078 | setWhatsThis(shutdown_check, tr("Shut down computer"),
|
---|
| 1079 | tr("If this option is enabled, the computer will shut down just after SMPlayer is closed.") );
|
---|
| 1080 | #endif
|
---|
| 1081 |
|
---|
[93] | 1082 | // Video tab
|
---|
| 1083 | addSectionTitle(tr("Video"));
|
---|
| 1084 |
|
---|
| 1085 | setWhatsThis(vo_combo, tr("Video output driver"),
|
---|
[181] | 1086 | tr("Select the video output driver."));
|
---|
[93] | 1087 |
|
---|
| 1088 | #if !defined(Q_OS_WIN) && !defined(Q_OS_OS2)
|
---|
[119] | 1089 | /*
|
---|
[93] | 1090 | setWhatsThis(vdpau_filters_check, tr("Disable video filters when using vdpau"),
|
---|
| 1091 | tr("Usually video filters won't work when using vdpau as video output "
|
---|
| 1092 | "driver, so it's wise to keep this option checked.") );
|
---|
[119] | 1093 | */
|
---|
[93] | 1094 | #endif
|
---|
| 1095 |
|
---|
| 1096 | setWhatsThis(postprocessing_check, tr("Enable postprocessing by default"),
|
---|
| 1097 | tr("Postprocessing will be used by default on new opened files.") );
|
---|
| 1098 |
|
---|
| 1099 | setWhatsThis(autoq_spin, tr("Postprocessing quality"),
|
---|
| 1100 | tr("Dynamically changes the level of postprocessing depending on the "
|
---|
| 1101 | "available spare CPU time. The number you specify will be the "
|
---|
| 1102 | "maximum level used. Usually you can use some big number.") );
|
---|
| 1103 |
|
---|
| 1104 | setWhatsThis(deinterlace_combo, tr("Deinterlace by default"),
|
---|
| 1105 | tr("Select the deinterlace filter that you want to be used for new "
|
---|
| 1106 | "videos opened.") +" "+
|
---|
| 1107 | tr("<b>Note:</b> This option won't be used for TV channels.") );
|
---|
| 1108 |
|
---|
[188] | 1109 | #ifdef INITIAL_BLACKBORDERS
|
---|
| 1110 | setWhatsThis(blackborders_check, tr("Add black borders for subtitles by default"),
|
---|
| 1111 | tr("If this option is enabled, black borders will be added to the image "
|
---|
| 1112 | "by default on new opened files."));
|
---|
| 1113 | #endif
|
---|
| 1114 |
|
---|
[93] | 1115 | setWhatsThis(zoom_spin, tr("Default zoom"),
|
---|
| 1116 | tr("This option sets the default zoom which will be used for "
|
---|
| 1117 | "new videos.") );
|
---|
| 1118 |
|
---|
| 1119 | setWhatsThis(eq2_check, tr("Software video equalizer"),
|
---|
| 1120 | tr("You can check this option if video equalizer is not supported by "
|
---|
| 1121 | "your graphic card or the selected video output driver.<br>"
|
---|
| 1122 | "<b>Note:</b> this option can be incompatible with some video "
|
---|
| 1123 | "output drivers.") );
|
---|
| 1124 |
|
---|
| 1125 | setWhatsThis(direct_rendering_check, tr("Direct rendering"),
|
---|
| 1126 | tr("If checked, turns on direct rendering (not supported by all "
|
---|
| 1127 | "codecs and video outputs)<br>"
|
---|
| 1128 | "<b>Warning:</b> May cause OSD/SUB corruption!") );
|
---|
| 1129 |
|
---|
| 1130 | setWhatsThis(double_buffer_check, tr("Double buffering"),
|
---|
| 1131 | tr("Double buffering fixes flicker by storing two frames in memory, "
|
---|
| 1132 | "and displaying one while decoding another. If disabled it can "
|
---|
| 1133 | "affect OSD negatively, but often removes OSD flickering.") );
|
---|
| 1134 |
|
---|
| 1135 | setWhatsThis(use_slices_check, tr("Draw video using slices"),
|
---|
| 1136 | tr("Enable/disable drawing video by 16-pixel height slices/bands. "
|
---|
| 1137 | "If disabled, the whole frame is drawn in a single run. "
|
---|
| 1138 | "May be faster or slower, depending on video card and available "
|
---|
| 1139 | "cache. It has effect only with libmpeg2 and libavcodec codecs.") );
|
---|
| 1140 |
|
---|
| 1141 | setWhatsThis(start_fullscreen_check, tr("Start videos in fullscreen"),
|
---|
| 1142 | tr("If this option is checked, all videos will start to play in "
|
---|
| 1143 | "fullscreen mode.") );
|
---|
| 1144 |
|
---|
[188] | 1145 | #ifdef ADD_BLACKBORDERS_FS
|
---|
[93] | 1146 | setWhatsThis(blackborders_on_fs_check, tr("Add black borders on fullscreen"),
|
---|
| 1147 | tr("If this option is enabled, black borders will be added to the "
|
---|
| 1148 | "image in fullscreen mode. This allows subtitles to be displayed "
|
---|
| 1149 | "on the black borders.") /* + "<br>" +
|
---|
| 1150 | tr("This option will be ignored if MPlayer uses its own window, as "
|
---|
| 1151 | "some video drivers (like gl) are already able to display the "
|
---|
| 1152 | "subtitles automatically in the black borders.") */ );
|
---|
[188] | 1153 | #endif
|
---|
[93] | 1154 |
|
---|
[182] | 1155 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
[165] | 1156 | #ifdef SCREENSAVER_OFF
|
---|
[93] | 1157 | setWhatsThis(turn_screensaver_off_check, tr("Switch screensaver off"),
|
---|
| 1158 | tr("This option switches the screensaver off just before starting to "
|
---|
| 1159 | "play a file and switches it on when playback finishes. If this "
|
---|
| 1160 | "option is enabled, the screensaver won't appear even if playing "
|
---|
| 1161 | "audio files or when a file is paused."));
|
---|
[165] | 1162 | #endif
|
---|
| 1163 | #ifdef AVOID_SCREENSAVER
|
---|
[93] | 1164 | setWhatsThis(avoid_screensaver_check, tr("Avoid screensaver"),
|
---|
| 1165 | tr("When this option is checked, SMPlayer will try to prevent the "
|
---|
| 1166 | "screensaver to be shown when playing a video file. The screensaver "
|
---|
| 1167 | "will be allowed to be shown if playing an audio file or in pause "
|
---|
| 1168 | "mode. This option only works if the SMPlayer window is in "
|
---|
| 1169 | "the foreground."));
|
---|
[165] | 1170 | #endif
|
---|
[93] | 1171 | #else
|
---|
| 1172 | setWhatsThis(screensaver_check, tr("Disable screensaver"),
|
---|
| 1173 | tr("Check this option to disable the screensaver while playing.<br>"
|
---|
| 1174 | "The screensaver will enabled again when play finishes.")
|
---|
| 1175 | );
|
---|
| 1176 | #endif
|
---|
| 1177 |
|
---|
| 1178 | // Audio tab
|
---|
| 1179 | addSectionTitle(tr("Audio"));
|
---|
| 1180 |
|
---|
| 1181 | setWhatsThis(ao_combo, tr("Audio output driver"),
|
---|
[181] | 1182 | tr("Select the audio output driver."));
|
---|
[93] | 1183 |
|
---|
| 1184 | setWhatsThis(audio_equalizer_check, tr("Enable the audio equalizer"),
|
---|
| 1185 | tr("Check this option if you want to use the audio equalizer.") );
|
---|
| 1186 |
|
---|
[165] | 1187 | setWhatsThis(global_audio_equalizer_check, tr("Global audio equalizer"),
|
---|
| 1188 | tr("If this option is checked, all media files share the audio equalizer.") +" "+
|
---|
| 1189 | tr("If it's not checked, the audio equalizer values are saved along each file "
|
---|
| 1190 | "and loaded back when the file is played later.") );
|
---|
| 1191 |
|
---|
[93] | 1192 | setWhatsThis(hwac3_check, tr("AC3/DTS pass-through S/PDIF"),
|
---|
| 1193 | tr("Uses hardware AC3 passthrough.") + "<br>" +
|
---|
| 1194 | tr("<b>Note:</b> none of the audio filters will be used when this "
|
---|
| 1195 | "option is enabled.") );
|
---|
| 1196 |
|
---|
| 1197 | setWhatsThis(channels_combo, tr("Channels by default"),
|
---|
[176] | 1198 | tr("Requests the number of playback channels. %1 "
|
---|
[93] | 1199 | "asks the decoder to decode the audio into as many channels as "
|
---|
| 1200 | "specified. Then it is up to the decoder to fulfill the "
|
---|
| 1201 | "requirement. This is usually only important when playing "
|
---|
| 1202 | "videos with AC3 audio (like DVDs). In that case liba52 does "
|
---|
| 1203 | "the decoding by default and correctly downmixes the audio "
|
---|
| 1204 | "into the requested number of channels. "
|
---|
| 1205 | "<b>Note</b>: This option is honored by codecs (AC3 only), "
|
---|
[176] | 1206 | "filters (surround) and audio output drivers (OSS at least).").arg(PLAYER_NAME) );
|
---|
[93] | 1207 |
|
---|
| 1208 | setWhatsThis(scaletempo_combo, tr("High speed playback without altering pitch"),
|
---|
[176] | 1209 | tr("Allows to change the playback speed without altering pitch.") );
|
---|
[93] | 1210 |
|
---|
| 1211 | setWhatsThis(global_volume_check, tr("Global volume"),
|
---|
| 1212 | tr("If this option is checked, the same volume will be used for "
|
---|
| 1213 | "all files you play. If the option is not checked each "
|
---|
| 1214 | "file uses its own volume.") + "<br>" +
|
---|
| 1215 | tr("This option also applies for the mute control.") );
|
---|
| 1216 |
|
---|
| 1217 | setWhatsThis(softvol_check, tr("Software volume control"),
|
---|
| 1218 | tr("Check this option to use the software mixer, instead of "
|
---|
| 1219 | "using the sound card mixer.") );
|
---|
| 1220 |
|
---|
| 1221 | setWhatsThis(softvol_max_spin, tr("Max. Amplification"),
|
---|
| 1222 | tr("Sets the maximum amplification level in percent (default: 110). "
|
---|
| 1223 | "A value of 200 will allow you to adjust the volume up to a "
|
---|
| 1224 | "maximum of double the current level. With values below 100 the "
|
---|
| 1225 | "initial volume (which is 100%) will be above the maximum, which "
|
---|
| 1226 | "e.g. the OSD cannot display correctly.") );
|
---|
| 1227 |
|
---|
| 1228 | setWhatsThis(volnorm_check, tr("Volume normalization by default"),
|
---|
| 1229 | tr("Maximizes the volume without distorting the sound.") );
|
---|
| 1230 |
|
---|
| 1231 | setWhatsThis(autosync_check, tr("Audio/video auto synchronization"),
|
---|
| 1232 | tr("Gradually adjusts the A/V sync based on audio delay "
|
---|
| 1233 | "measurements.") );
|
---|
| 1234 |
|
---|
| 1235 | setWhatsThis(mc_spin, tr("A-V sync correction"),
|
---|
| 1236 | tr("Maximum A-V sync correction per frame (in seconds)") );
|
---|
| 1237 |
|
---|
| 1238 | addSectionTitle(tr("Preferred audio and subtitles"));
|
---|
| 1239 |
|
---|
| 1240 | setWhatsThis(audio_lang_edit, tr("Preferred audio language"),
|
---|
| 1241 | tr("Here you can type your preferred language for the audio streams. "
|
---|
| 1242 | "When a media with multiple audio streams is found, SMPlayer will "
|
---|
| 1243 | "try to use your preferred language.<br>"
|
---|
| 1244 | "This only will work with media that offer info about the language "
|
---|
| 1245 | "of the audio streams, like DVDs or mkv files.<br>"
|
---|
| 1246 | "This field accepts regular expressions. Example: <b>es|esp|spa</b> "
|
---|
| 1247 | "will select the audio track if it matches with <i>es</i>, "
|
---|
| 1248 | "<i>esp</i> or <i>spa</i>.") );
|
---|
| 1249 |
|
---|
| 1250 | setWhatsThis(subtitle_lang_edit, tr("Preferred subtitle language"),
|
---|
| 1251 | tr("Here you can type your preferred language for the subtitle stream. "
|
---|
| 1252 | "When a media with multiple subtitle streams is found, SMPlayer will "
|
---|
| 1253 | "try to use your preferred language.<br>"
|
---|
| 1254 | "This only will work with media that offer info about the language "
|
---|
| 1255 | "of the subtitle streams, like DVDs or mkv files.<br>"
|
---|
| 1256 | "This field accepts regular expressions. Example: <b>es|esp|spa</b> "
|
---|
| 1257 | "will select the subtitle stream if it matches with <i>es</i>, "
|
---|
| 1258 | "<i>esp</i> or <i>spa</i>.") );
|
---|
| 1259 |
|
---|
| 1260 | setWhatsThis(audio_track_spin, tr("Audio track"),
|
---|
| 1261 | tr("Specifies the default audio track which will be used when playing "
|
---|
| 1262 | "new files. If the track doesn't exist, the first one will be used. "
|
---|
| 1263 | "<br><b>Note:</b> the <i>\"preferred audio language\"</i> has "
|
---|
| 1264 | "preference over this option.") );
|
---|
| 1265 |
|
---|
| 1266 | setWhatsThis(subtitle_track_spin, tr("Subtitle track"),
|
---|
| 1267 | tr("Specifies the default subtitle track which will be used when "
|
---|
| 1268 | "playing new files. If the track doesn't exist, the first one "
|
---|
| 1269 | "will be used. <br><b>Note:</b> the <i>\"preferred subtitle "
|
---|
| 1270 | "language\"</i> has preference over this option.") );
|
---|
| 1271 |
|
---|
| 1272 | }
|
---|
| 1273 |
|
---|
| 1274 | #include "moc_prefgeneral.cpp"
|
---|