~ubuntu-branches/debian/experimental/smplayer/experimental

« back to all changes in this revision

Viewing changes to src/prefgeneral.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-01-03 17:08:06 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090103170806-eodntb2slv6g2pb6
Tags: 0.6.6-0ubuntu1
* The "just before FF" release.
* New upstream release.
* debian/control: Bumped Standards-Version to 3.8.0.
* debian/copyright: Changed (C) to © to fix Lintian warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "filedialog.h"
23
23
#include "images.h"
24
24
#include "mediasettings.h"
 
25
#include "paths.h"
 
26
 
 
27
#if USE_ALSA_DEVICES || USE_DSOUND_DEVICES
 
28
#include "deviceinfo.h"
 
29
#endif
25
30
 
26
31
PrefGeneral::PrefGeneral(QWidget * parent, Qt::WindowFlags f)
27
32
        : PrefWidget(parent, f )
33
38
 
34
39
        // Read driver info from InfoReader:
35
40
        InfoReader * i = InfoReader::obj();
36
 
        setDrivers( i->voList(), i->aoList() );
 
41
        vo_list = i->voList();
 
42
        ao_list = i->aoList();
 
43
 
 
44
#if USE_DSOUND_DEVICES
 
45
        dsound_devices = DeviceInfo::dsoundDevices();
 
46
#endif
 
47
 
 
48
#if USE_ALSA_DEVICES
 
49
        alsa_devices = DeviceInfo::alsaDevices();
 
50
#endif
 
51
#if USE_XV_ADAPTORS
 
52
        xv_adaptors = DeviceInfo::xvAdaptors();
 
53
#endif
37
54
 
38
55
        // Channels combo
39
56
        channels_combo->addItem( "2", MediaSettings::ChStereo );
40
57
        channels_combo->addItem( "4", MediaSettings::ChSurround );
41
58
        channels_combo->addItem( "6", MediaSettings::ChFull51 );
42
59
 
 
60
        connect(vo_combo, SIGNAL(currentIndexChanged(int)),
 
61
            this, SLOT(vo_combo_changed(int)));
 
62
        connect(ao_combo, SIGNAL(currentIndexChanged(int)),
 
63
            this, SLOT(ao_combo_changed(int)));
 
64
 
43
65
        retranslateStrings();
44
66
}
45
67
 
74
96
        deinterlace_combo->addItem( tr("Kerndeint"), MediaSettings::Kerndeint );
75
97
        deinterlace_combo->setCurrentIndex(deinterlace_item);
76
98
 
 
99
        int filesettings_method_item = filesettings_method_combo->currentIndex();
 
100
        filesettings_method_combo->clear();
 
101
        filesettings_method_combo->addItem( tr("one ini file"), "normal");
 
102
        filesettings_method_combo->addItem( tr("multiple ini files"), "hash");
 
103
        filesettings_method_combo->setCurrentIndex(filesettings_method_item);
 
104
 
 
105
        updateDriverCombos();
 
106
 
77
107
    // Icons
78
108
        /*
79
109
    resize_window_icon->setPixmap( Images::icon("resize_window") );
104
134
void PrefGeneral::setData(Preferences * pref) {
105
135
        setMplayerPath( pref->mplayer_bin );
106
136
        setScreenshotDir( pref->screenshot_directory );
107
 
        setVO( pref->vo );
108
 
        setAO( pref->ao );
 
137
 
 
138
        QString vo = pref->vo;
 
139
        if (vo.isEmpty()) {
 
140
#ifdef Q_OS_WIN
 
141
                vo = "directx,";
 
142
#else
 
143
                vo = "xv,";
 
144
#endif
 
145
        }
 
146
        setVO( vo );
 
147
 
 
148
        QString ao = pref->ao;
 
149
#ifndef Q_OS_WIN
 
150
        if (ao.isEmpty()) ao = "alsa,";
 
151
#endif
 
152
        setAO( ao );
 
153
 
109
154
        setRememberSettings( !pref->dont_remember_media_settings );
110
 
        setDontRememberTimePos( pref->dont_remember_time_pos );
 
155
        setRememberTimePos( !pref->dont_remember_time_pos );
 
156
        setFileSettingsMethod( pref->file_settings_method );
111
157
        setAudioLang( pref->audio_lang );
112
158
        setSubtitleLang( pref->subtitle_lang );
113
159
        setAudioTrack( pref->initial_audio_track );
116
162
        setPauseWhenHidden( pref->pause_when_hidden );
117
163
 
118
164
        setEq2( pref->use_soft_video_eq );
 
165
        setUseAudioEqualizer( pref->use_audio_equalizer );
119
166
        setSoftVol( pref->use_soft_vol );
120
167
        setAc3DTSPassthrough( pref->use_hwac3 );
121
168
        setInitialVolNorm( pref->initial_volnorm );
122
169
        setAmplification( pref->softvol_max );
123
170
        setInitialPostprocessing( pref->initial_postprocessing );
124
171
        setInitialDeinterlace( pref->initial_deinterlace );
 
172
        setInitialZoom( pref->initial_panscan_factor );
125
173
        setDirectRendering( pref->use_direct_rendering );
126
174
        setDoubleBuffer( pref->use_double_buffer );
 
175
        setUseSlices( pref->use_slices );
127
176
        setStartInFullscreen( pref->start_in_fullscreen );
128
177
        setDisableScreensaver( pref->disable_screensaver );
 
178
        setBlackbordersOnFullscreen( pref->add_blackborders_on_fullscreen );
129
179
        setAutoq( pref->autoq );
130
180
 
131
181
        setInitialVolume( pref->initial_volume );
132
182
        setDontChangeVolume( pref->dont_change_volume );
133
 
        setUseVolume( pref->use_volume_option2 );
 
183
        setUseVolume( pref->use_volume_option );
134
184
        setAudioChannels( pref->initial_audio_channels );
135
185
        setScaleTempoFilter( pref->use_scaletempo );
136
186
}
137
187
 
138
188
void PrefGeneral::getData(Preferences * pref) {
139
189
        requires_restart = false;
 
190
        filesettings_method_changed = false;
140
191
 
141
192
        if (pref->mplayer_bin != mplayerPath()) {
142
193
                requires_restart = true;
156
207
 
157
208
        bool dont_remember_ms = !rememberSettings();
158
209
    TEST_AND_SET(pref->dont_remember_media_settings, dont_remember_ms);
159
 
    TEST_AND_SET(pref->dont_remember_time_pos, dontRememberTimePos());
 
210
        bool dont_remember_time = !rememberTimePos();
 
211
    TEST_AND_SET(pref->dont_remember_time_pos, dont_remember_time);
 
212
        if (pref->file_settings_method != fileSettingsMethod()) {
 
213
                pref->file_settings_method = fileSettingsMethod();
 
214
                filesettings_method_changed = true;
 
215
        }
160
216
 
161
217
        pref->audio_lang = audioLang();
162
218
    pref->subtitle_lang = subtitleLang();
169
225
 
170
226
        TEST_AND_SET(pref->use_soft_video_eq, eq2());
171
227
        TEST_AND_SET(pref->use_soft_vol, softVol());
 
228
        TEST_AND_SET(pref->use_audio_equalizer, useAudioEqualizer());
172
229
        TEST_AND_SET(pref->use_hwac3, Ac3DTSPassthrough());
173
230
        pref->initial_volnorm = initialVolNorm();
174
231
        TEST_AND_SET(pref->softvol_max, amplification());
175
232
        pref->initial_postprocessing = initialPostprocessing();
176
233
        pref->initial_deinterlace = initialDeinterlace();
 
234
        pref->initial_panscan_factor = initialZoom();
177
235
        TEST_AND_SET(pref->use_direct_rendering, directRendering());
178
236
        TEST_AND_SET(pref->use_double_buffer, doubleBuffer());
 
237
        TEST_AND_SET(pref->use_slices, useSlices());
179
238
        pref->start_in_fullscreen = startInFullscreen();
180
239
        TEST_AND_SET(pref->disable_screensaver, disableScreensaver());
 
240
        if (pref->add_blackborders_on_fullscreen != blackbordersOnFullscreen()) {
 
241
                pref->add_blackborders_on_fullscreen = blackbordersOnFullscreen();
 
242
                if (pref->fullscreen) requires_restart = true;
 
243
        }
181
244
        TEST_AND_SET(pref->autoq, autoq());
182
245
 
183
246
        pref->initial_volume = initialVolume();
184
247
        pref->dont_change_volume = dontChangeVolume();
185
 
        pref->use_volume_option2 = useVolume();
 
248
        pref->use_volume_option = useVolume();
186
249
        pref->initial_audio_channels = audioChannels();
187
250
        TEST_AND_SET(pref->use_scaletempo, scaleTempoFilter());
188
251
}
189
252
 
190
 
void PrefGeneral::setDrivers(InfoList vo_list, InfoList ao_list) {
 
253
void PrefGeneral::updateDriverCombos() {
 
254
        int vo_current = vo_combo->currentIndex();
 
255
        int ao_current = ao_combo->currentIndex();
 
256
 
 
257
        vo_combo->clear();
 
258
        ao_combo->clear();
 
259
 
 
260
        QString vo;
191
261
        for ( int n = 0; n < vo_list.count(); n++ ) {
192
 
                vo_combo->addItem( vo_list[n].name() );
193
 
                // Add directx:noaccel
194
 
                if ( vo_list[n].name() == "directx" ) {
195
 
                        vo_combo->addItem( "directx:noaccel" );
196
 
                }
197
 
                // gl/gl2
198
 
                if (vo_list[n].name() == "gl") {
199
 
                        vo_combo->addItem( "gl:yuv=3" );
200
 
                        vo_combo->addItem( "gl:yuv=2:force-pbo:ati-hack" );
201
 
                        //vo_combo->addItem( "gl:yuv=3:lscale=1" );
202
 
                }
 
262
                vo = vo_list[n].name();
 
263
#ifdef Q_OS_WIN
 
264
                if ( vo == "directx" ) {
 
265
                        vo_combo->addItem( "directx (" + tr("fast") + ")", "directx" );
 
266
                        vo_combo->addItem( "directx (" + tr("slow") + ")", "directx:noaccel" );
 
267
                }
 
268
                else
 
269
#else
203
270
                /*
204
 
                if (vo_list[n].name() == "gl2") {
205
 
                        vo_combo->addItem( "gl2:yuv=3" );
206
 
                }
 
271
                if (vo == "xv") vo_combo->addItem( "xv (" + tr("fastest") + ")", vo);
 
272
                else
207
273
                */
 
274
#if USE_XV_ADAPTORS
 
275
                if ((vo == "xv") && (!xv_adaptors.isEmpty())) {
 
276
                        vo_combo->addItem(vo, vo);
 
277
                        for (int n=0; n < xv_adaptors.count(); n++) {
 
278
                                vo_combo->addItem( "xv (" + xv_adaptors[n].ID().toString() + " - " + xv_adaptors[n].desc() + ")", 
 
279
                                   "xv:adaptor=" + xv_adaptors[n].ID().toString() );
 
280
                        }
 
281
                }
 
282
                else
 
283
#endif // USE_XV_ADAPTORS
 
284
#endif
 
285
                if (vo == "x11") vo_combo->addItem( "x11 (" + tr("slow") + ")", vo);
 
286
                else
 
287
                if (vo == "gl") {
 
288
                        vo_combo->addItem( vo, vo);
 
289
                        vo_combo->addItem( "gl (" + tr("fast") + ")", "gl:yuv=2:force-pbo");
 
290
                        vo_combo->addItem( "gl (" + tr("fast - ATI cards") + ")", "gl:yuv=2:force-pbo:ati-hack");
 
291
                        vo_combo->addItem( "gl (yuv)", "gl:yuv=3");
 
292
                }
 
293
                else
 
294
                if (vo == "gl2") {
 
295
                        vo_combo->addItem( vo, vo);
 
296
                        vo_combo->addItem( "gl2 (yuv)", "gl2:yuv=3");
 
297
                }
 
298
                else
 
299
                if (vo == "null" || vo == "png" || vo == "jpeg" || vo == "gif89a" || 
 
300
            vo == "tga" || vo == "pnm" || vo == "md5sum" ) 
 
301
                {
 
302
                        ; // Nothing to do
 
303
                }
 
304
                else
 
305
                vo_combo->addItem( vo, vo );
208
306
        }
 
307
        vo_combo->addItem( tr("User defined..."), "user_defined" );
209
308
 
 
309
        QString ao;
210
310
        for ( int n = 0; n < ao_list.count(); n++) {
211
 
                ao_combo->addItem( ao_list[n].name() );
 
311
                ao = ao_list[n].name();
 
312
                ao_combo->addItem( ao, ao );
 
313
#if USE_ALSA_DEVICES
 
314
                if ((ao == "alsa") && (!alsa_devices.isEmpty())) {
 
315
                        for (int n=0; n < alsa_devices.count(); n++) {
 
316
                                ao_combo->addItem( "alsa (" + alsa_devices[n].ID().toString() + " - " + alsa_devices[n].desc() + ")", 
 
317
                                   "alsa:device=hw=" + alsa_devices[n].ID().toString() );
 
318
                        }
 
319
                }
 
320
#endif
 
321
#if USE_DSOUND_DEVICES
 
322
                if ((ao == "dsound") && (!dsound_devices.isEmpty())) {
 
323
                        for (int n=0; n < dsound_devices.count(); n++) {
 
324
                                ao_combo->addItem( "dsound (" + dsound_devices[n].ID().toString() + " - " + dsound_devices[n].desc() + ")", 
 
325
                                   "dsound:device=" + dsound_devices[n].ID().toString() );
 
326
                        }
 
327
                }
 
328
#endif
212
329
        }
 
330
        ao_combo->addItem( tr("User defined..."), "user_defined" );
 
331
 
 
332
        vo_combo->setCurrentIndex( vo_current );
 
333
        ao_combo->setCurrentIndex( ao_current );
213
334
}
214
335
 
215
336
void PrefGeneral::setMplayerPath( QString path ) {
229
350
}
230
351
 
231
352
void PrefGeneral::setVO( QString vo_driver ) {
232
 
        vo_combo->setCurrentText( vo_driver );
 
353
        int idx = vo_combo->findData( vo_driver );
 
354
        if (idx != -1) {
 
355
                vo_combo->setCurrentIndex(idx);
 
356
        } else {
 
357
                vo_combo->setCurrentIndex(vo_combo->findData("user_defined"));
 
358
                vo_user_defined_edit->setText(vo_driver);
 
359
        }
 
360
        vo_combo_changed(vo_combo->currentIndex());
233
361
}
234
362
 
235
363
void PrefGeneral::setAO( QString ao_driver ) {
236
 
        ao_combo->setCurrentText( ao_driver );
 
364
        int idx = ao_combo->findData( ao_driver );
 
365
        if (idx != -1) {
 
366
                ao_combo->setCurrentIndex(idx);
 
367
        } else {
 
368
                ao_combo->setCurrentIndex(ao_combo->findData("user_defined"));
 
369
                ao_user_defined_edit->setText(ao_driver);
 
370
        }
 
371
        ao_combo_changed(ao_combo->currentIndex());
237
372
}
238
373
 
239
374
QString PrefGeneral::VO() {
240
 
        return vo_combo->currentText();
 
375
        QString vo = vo_combo->itemData(vo_combo->currentIndex()).toString();
 
376
        if (vo == "user_defined") {
 
377
                vo = vo_user_defined_edit->text();
 
378
                if (vo.isEmpty()) {
 
379
                        vo = vo_combo->itemData(0).toString();
 
380
                        qDebug("PrefGeneral::VO: user defined vo is empty, using %s", vo.toUtf8().constData());
 
381
                }
 
382
        }
 
383
        return vo;
241
384
}
242
385
 
243
386
QString PrefGeneral::AO() {
244
 
        return ao_combo->currentText();
 
387
        QString ao = ao_combo->itemData(ao_combo->currentIndex()).toString();
 
388
        if (ao == "user_defined") {
 
389
                ao = ao_user_defined_edit->text();
 
390
                if (ao.isEmpty()) {
 
391
                        ao = ao_combo->itemData(0).toString();
 
392
                        qDebug("PrefGeneral::AO: user defined ao is empty, using %s", ao.toUtf8().constData());
 
393
                }
 
394
        }
 
395
        return ao;
245
396
}
246
397
 
247
398
void PrefGeneral::setRememberSettings(bool b) {
253
404
        return remember_all_check->isChecked();
254
405
}
255
406
 
256
 
void PrefGeneral::setDontRememberTimePos(bool b) {
257
 
        dont_remember_time_check->setChecked(b);
258
 
}
259
 
 
260
 
bool PrefGeneral::dontRememberTimePos() {
261
 
        return dont_remember_time_check->isChecked();
 
407
void PrefGeneral::setRememberTimePos(bool b) {
 
408
        remember_time_check->setChecked(b);
 
409
}
 
410
 
 
411
bool PrefGeneral::rememberTimePos() {
 
412
        return remember_time_check->isChecked();
 
413
}
 
414
 
 
415
void PrefGeneral::setFileSettingsMethod(QString method) {
 
416
        int index = filesettings_method_combo->findData(method);
 
417
        if (index < 0) index = 0;
 
418
        filesettings_method_combo->setCurrentIndex(index);
 
419
}
 
420
 
 
421
QString PrefGeneral::fileSettingsMethod() {
 
422
        return filesettings_method_combo->itemData(filesettings_method_combo->currentIndex()).toString();
262
423
}
263
424
 
264
425
void PrefGeneral::setAudioLang(QString lang) {
326
487
        return softvol_check->isChecked();
327
488
}
328
489
 
 
490
void PrefGeneral::setUseAudioEqualizer(bool b) {
 
491
        audio_equalizer_check->setChecked(b);
 
492
}
 
493
 
 
494
bool PrefGeneral::useAudioEqualizer() {
 
495
        return audio_equalizer_check->isChecked();
 
496
}
 
497
 
329
498
void PrefGeneral::setAc3DTSPassthrough(bool b) {
330
499
        hwac3_check->setChecked(b);
331
500
}
368
537
        }
369
538
}
370
539
 
 
540
void PrefGeneral::setInitialZoom(double v) {
 
541
        zoom_spin->setValue(v);
 
542
}
 
543
 
 
544
double PrefGeneral::initialZoom() {
 
545
        return zoom_spin->value();
 
546
}
 
547
 
371
548
void PrefGeneral::setDirectRendering(bool b) {
372
549
        direct_rendering_check->setChecked(b);
373
550
}
384
561
        return double_buffer_check->isChecked();
385
562
}
386
563
 
 
564
void PrefGeneral::setUseSlices(bool b) {
 
565
        use_slices_check->setChecked(b);
 
566
}
 
567
 
 
568
bool PrefGeneral::useSlices() {
 
569
        return use_slices_check->isChecked();
 
570
}
 
571
 
387
572
void PrefGeneral::setAmplification(int n) {
388
573
        softvol_max_spin->setValue(n);
389
574
}
450
635
        return screensaver_check->isChecked();
451
636
}
452
637
 
 
638
void PrefGeneral::setBlackbordersOnFullscreen(bool b) {
 
639
        blackborders_on_fs_check->setChecked(b);
 
640
}
 
641
 
 
642
bool PrefGeneral::blackbordersOnFullscreen() {
 
643
        return blackborders_on_fs_check->isChecked();
 
644
}
 
645
 
453
646
void PrefGeneral::setAutoq(int n) {
454
647
        autoq_spin->setValue(n);
455
648
}
466
659
        return scaletempo_combo->state();
467
660
}
468
661
 
 
662
void PrefGeneral::vo_combo_changed(int idx) {
 
663
        qDebug("PrefGeneral::vo_combo_changed: %d", idx);
 
664
        bool visible = (vo_combo->itemData(idx).toString() == "user_defined");
 
665
        vo_user_defined_edit->setShown(visible);
 
666
        vo_user_defined_edit->setFocus();
 
667
}
 
668
 
 
669
void PrefGeneral::ao_combo_changed(int idx) {
 
670
        qDebug("PrefGeneral::ao_combo_changed: %d", idx);
 
671
        bool visible = (ao_combo->itemData(idx).toString() == "user_defined");
 
672
        ao_user_defined_edit->setShown(visible);
 
673
        ao_user_defined_edit->setFocus();
 
674
}
 
675
 
469
676
void PrefGeneral::createHelp() {
470
677
        clearHelp();
471
678
 
473
680
 
474
681
        setWhatsThis(mplayerbin_edit, tr("MPlayer executable"), 
475
682
                tr("Here you must specify the mplayer "
476
 
           "executable that smplayer will use.<br>"
477
 
           "smplayer requires at least mplayer 1.0rc1 (svn recommended).<br>"
478
 
           "<b>If this setting is wrong, smplayer won't "
479
 
           "be able to play anything!</b>") );
 
683
           "executable that SMPlayer will use.<br>"
 
684
           "SMPlayer requires at least MPlayer 1.0rc1 (although a recent "
 
685
           "revision from SVN is highly recommended).") + "<br><b>" +
 
686
        tr("If this setting is wrong, SMPlayer won't be able to play "
 
687
           "anything!") + "</b>");
480
688
 
481
689
        setWhatsThis(screenshot_edit, tr("Screenshots folder"),
482
690
                tr("Here you can specify a folder where the screenshots taken by "
483
 
           "smplayer will be stored. If this field is empty the "
 
691
           "SMPlayer will be stored. If this field is empty the "
484
692
           "screenshot feature will be disabled.") );
485
693
 
486
 
        setWhatsThis(vo_combo, tr("Video output driver"),
487
 
                tr("Select the video output driver. Usually xv (linux) "
488
 
           "and directx (windows) provide the best performance.") );
489
 
 
490
 
        setWhatsThis(ao_combo, tr("Audio output driver"),
491
 
                tr("Select the audio output driver.") );
492
694
 
493
695
        setWhatsThis(remember_all_check, tr("Remember settings"),
494
 
                tr("Usually smplayer will remember the settings for each file you "
495
 
           "play (audio track selected, volume, filters...). Uncheck this "
 
696
                tr("Usually SMPlayer will remember the settings for each file you "
 
697
           "play (audio track selected, volume, filters...). Disable this "
496
698
           "option if you don't like this feature.") );
497
699
 
498
 
        setWhatsThis(dont_remember_time_check, tr("Don't remember time position"),
499
 
                tr("If you check this option, smplayer will play all files from "
500
 
           "the beginning.") );
 
700
        setWhatsThis(remember_time_check, tr("Remember time position"),
 
701
                tr("If you check this option, SMPlayer will remember the last position "
 
702
           "of the file when you open it again. This option works only with "
 
703
           "regular files (not with DVDs, CDs, URLs...).") );
 
704
 
 
705
        setWhatsThis(filesettings_method_combo, tr("Method to store the file settings"),
 
706
                tr("This option allows to change the way the file settings would be "
 
707
           "stored. The following options are available:") +"<ul><li>" + 
 
708
                tr("<b>one ini file</b>: the settings for all played files will be "
 
709
           "saved in a single ini file (%1)").arg(QString("<i>"+Paths::iniPath()+"/smplayer.ini</i>")) + "</li><li>" +
 
710
                tr("<b>multiple ini files</b>: one ini file will be used for each played file. "
 
711
           "Those ini files will be saved in the folder %1").arg(QString("<i>"+Paths::iniPath()+"/file_settings</i>")) + "</li></ul>" +
 
712
                tr("The latter method could be faster if there is info for a lot of files.") );
501
713
 
502
714
        setWhatsThis(close_on_finish_check, tr("Close when finished"),
503
715
                tr("If this option is checked, the main window will be automatically "
505
717
 
506
718
        setWhatsThis(pause_if_hidden_check, tr("Pause when minimized"),
507
719
                tr("If this option is enabled, the file will be paused when the "
508
 
           "main window is hidden. When the window is restored, play will be "
509
 
           "resumed.") );
 
720
           "main window is hidden. When the window is restored, playback "
 
721
           "will be resumed.") );
510
722
 
 
723
        // Video tab
511
724
        addSectionTitle(tr("Video"));
512
725
 
513
 
        // Video tab
514
 
        setWhatsThis(eq2_check, tr("Software video equalizer"),
515
 
                tr("You can check this option if video equalizer is not supported by "
516
 
           "your graphic card or the selected video output driver.<br>"
517
 
           "<b>Note:</b> this option can be incompatible "
518
 
           "with some video output drivers.") );
 
726
        setWhatsThis(vo_combo, tr("Video output driver"),
 
727
                tr("Select the video output driver. %1 provides the best performance.")
 
728
#ifdef Q_OS_WIN
 
729
                  .arg("<b><i>directx</i></b>")
 
730
#else
 
731
                  .arg("<b><i>xv</i></b>")
 
732
#endif
 
733
                );
519
734
 
520
735
        setWhatsThis(postprocessing_check, tr("Enable postprocessing by default"),
521
736
                tr("Postprocessing will be used by default on new opened files.") );
529
744
        tr("Select the deinterlace filter that you want to be used for new "
530
745
           "videos opened.") );
531
746
 
 
747
        setWhatsThis(zoom_spin, tr("Default zoom"),
 
748
                tr("This option sets the default zoom which will be used for "
 
749
           "new videos.") );
 
750
 
 
751
        setWhatsThis(eq2_check, tr("Software video equalizer"),
 
752
                tr("You can check this option if video equalizer is not supported by "
 
753
           "your graphic card or the selected video output driver.<br>"
 
754
           "<b>Note:</b> this option can be incompatible with some video "
 
755
           "output drivers.") );
 
756
 
532
757
        setWhatsThis(direct_rendering_check, tr("Direct rendering"),
533
758
                tr("If checked, turns on direct rendering (not supported by all "
534
759
           "codecs and video outputs)<br>"
535
 
           "<b>WARNING:</b> May cause OSD/SUB corruption!") );
 
760
           "<b>Warning:</b> May cause OSD/SUB corruption!") );
536
761
 
537
762
        setWhatsThis(double_buffer_check, tr("Double buffering"),
538
763
                tr("Double buffering fixes flicker by storing two frames in memory, "
539
764
           "and displaying one while decoding another. If disabled it can "
540
765
           "affect OSD negatively, but often removes OSD flickering.") );
541
766
 
 
767
        setWhatsThis(use_slices_check, tr("Draw video using slices"),
 
768
                tr("Enable/disable drawing video by 16-pixel height slices/bands. "
 
769
           "If disabled, the whole frame is drawn in a single run. "
 
770
           "May be faster or slower, depending on video card and available "
 
771
           "cache. It has effect only with libmpeg2 and libavcodec codecs.") );
 
772
 
542
773
        setWhatsThis(start_fullscreen_check, tr("Start videos in fullscreen"),
543
774
                tr("If this option is checked, all videos will start to play in "
544
775
           "fullscreen mode.") );
545
776
 
 
777
        setWhatsThis(blackborders_on_fs_check, tr("Add black borders on fullscreen"),
 
778
                tr("If this option is enabled, black borders will be added to the "
 
779
           "image in fullscreen mode. This allows subtitles to be displayed "
 
780
           "on the black borders.") /* + "<br>" +
 
781
                tr("This option will be ignored if MPlayer uses its own window, as "
 
782
           "some video drivers (like gl) are already able to display the "
 
783
           "subtitles automatically in the black borders.") */ );
 
784
 
546
785
        setWhatsThis(screensaver_check, tr("Disable screensaver"),
547
786
                tr("Check this option to disable the screensaver while playing.<br>"
548
 
           "The screensaver will enabled again when play finishes.<br>"
549
 
           "<b>Note:</b> This option works only in X11 and Windows.") );
 
787
           "The screensaver will enabled again when play finishes.")
 
788
           //+ tr("<br><b>Note:</b> This option works only in X11 and Windows.")
 
789
                );
550
790
 
 
791
        // Audio tab
551
792
        addSectionTitle(tr("Audio"));
552
793
 
 
794
        setWhatsThis(ao_combo, tr("Audio output driver"),
 
795
                tr("Select the audio output driver.") 
 
796
#ifndef Q_OS_WIN
 
797
        + " " + 
 
798
                tr("%1 is the recommended one. Try to avoid %2 and %3, they are slow "
 
799
           "and can have an impact on performance.")
 
800
           .arg("<b><i>alsa</i></b>")
 
801
           .arg("<b><i>esd</i></b>")
 
802
           .arg("<b><i>arts</i></b>")
 
803
#endif
 
804
                );
 
805
 
 
806
        setWhatsThis(audio_equalizer_check, tr("Enable the audio equalizer"),
 
807
                tr("Check this option if you want to use the audio equalizer.") );
 
808
 
 
809
        setWhatsThis(hwac3_check, tr("AC3/DTS pass-through S/PDIF"),
 
810
                tr("Uses hardware AC3 passthrough") );
 
811
 
 
812
        setWhatsThis(channels_combo, tr("Channels by default"),
 
813
                tr("Requests the number of playback channels. MPlayer "
 
814
           "asks the decoder to decode the audio into as many channels as "
 
815
           "specified. Then it is up to the decoder to fulfill the "
 
816
           "requirement. This is usually only important when playing "
 
817
           "videos with AC3 audio (like DVDs). In that case liba52 does "
 
818
           "the decoding by default and correctly downmixes the audio "
 
819
           "into the requested number of channels. "
 
820
           "<b>Note</b>: This option is honored by codecs (AC3 only), "
 
821
           "filters (surround) and audio output drivers (OSS at least).") );
 
822
 
 
823
        setWhatsThis(scaletempo_combo, tr("High speed playback without altering pitch"),
 
824
                tr("Allows to change the playback speed without altering pitch. "
 
825
           "Requires at least MPlayer dev-SVN-r24924.") );
 
826
 
553
827
        setWhatsThis(softvol_check, tr("Software volume control"),
554
828
                tr("Check this option to use the software mixer, instead of "
555
829
           "using the sound card mixer.") );
561
835
           "initial volume (which is 100%) will be above the maximum, which "
562
836
           "e.g. the OSD cannot display correctly.") );
563
837
 
564
 
        setWhatsThis(hwac3_check, tr("AC3/DTS pass-through S/PDIF"),
565
 
                tr("Uses hardware AC3 passthrough") );
566
 
 
567
838
        setWhatsThis(volnorm_check, tr("Volume normalization by default"),
568
839
                tr("Maximizes the volume without distorting the sound.") );
569
840
 
572
843
           "and will restore it when played again. For new files the default "
573
844
           "volume will be used.") );
574
845
 
 
846
        setWhatsThis(use_volume_combo, tr("Change volume just before playing"),
 
847
                tr("If this option is checked the initial volume will be set just "
 
848
           "before playback starts. This avoids a loud volume on startup. "
 
849
           "Requires at least MPlayer SVN r27872."));
 
850
 
575
851
        setWhatsThis(initial_volume_slider, tr("Default volume"),
576
852
                tr("Sets the initial volume that new files will use.") );
577
853
 
578
 
        setWhatsThis(use_volume_combo, tr("Change volume just before playing"),
579
 
                tr("If this option is checked the initial volume will be set by "
580
 
           "using the <i>-volume</i> option in MPlayer.<br> "
581
 
           "<b>WARNING: THE OFFICIAL MPLAYER DOESN'T HAVE THAT "
582
 
           "<i>-volume</i> OPTION, "
583
 
           "YOU NEED A PATCHED ONE, OTHERWISE MPLAYER WILL FAIL AND WON'T PLAY "
584
 
           "ANYTHING.</b>") );
585
 
 
586
 
        setWhatsThis(channels_combo, tr("Channels by default"),
587
 
                tr("Requests the number of playback channels. MPlayer "
588
 
           "asks the decoder to decode the audio into as many channels as "
589
 
           "specified. Then it is up to the decoder to fulfill the "
590
 
           "requirement. This is usually only important when playing "
591
 
           "videos with AC3 audio (like DVDs). In that case liba52 does "
592
 
           "the decoding by default and correctly downmixes the audio "
593
 
           "into the requested number of channels. "
594
 
           "NOTE: This option is honored by codecs (AC3 only), "
595
 
           "filters (surround) and audio output drivers (OSS at least).") );
596
 
 
597
 
        setWhatsThis(scaletempo_combo, tr("High speed playback without altering pitch"),
598
 
                tr("Allows to change the playback speed without altering pitch. "
599
 
           "Requires at least MPlayer dev-SVN-r24924.") );
600
854
 
601
855
        addSectionTitle(tr("Preferred audio and subtitles"));
602
856
 
603
857
        setWhatsThis(audio_lang_edit, tr("Preferred audio language"),
604
858
                tr("Here you can type your preferred language for the audio streams. "
605
 
           "When a media with multiple audio streams is found, smplayer will "
 
859
           "When a media with multiple audio streams is found, SMPlayer will "
606
860
           "try to use your preferred language.<br>"
607
861
           "This only will work with media that offer info about the language "
608
862
           "of the audio streams, like DVDs or mkv files.<br>"
612
866
 
613
867
        setWhatsThis(subtitle_lang_edit, tr("Preferred subtitle language"),
614
868
                tr("Here you can type your preferred language for the subtitle stream. "
615
 
           "When a media with multiple subtitle streams is found, smplayer will "
 
869
           "When a media with multiple subtitle streams is found, SMPlayer will "
616
870
           "try to use your preferred language.<br>"
617
871
           "This only will work with media that offer info about the language "
618
872
           "of the subtitle streams, like DVDs or mkv files.<br>"