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