~ubuntu-branches/ubuntu/raring/smplayer/raring-proposed

« back to all changes in this revision

Viewing changes to src/core.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-11-04 12:45:38 UTC
  • mfrom: (1.1.10 upstream) (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091104124538-hm6jc89qrg3l2sm8
Tags: 0.6.8-1
* New upstream release. (Closes: #543156)
* Added /usr/share/pixmaps to debian/menu. (Closes: #526353)
* debian/control: Bumped Standards-Version to 3.8.3.
* debian/rules:
  - Removed VERSION variables, not relevant anymore.
  - Removed dh_desktop.
* Removed 01_gl_translation.patch, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include "constants.h"
36
36
#include "colorutils.h"
37
37
#include "discname.h"
 
38
#include "filters.h"
38
39
 
39
40
#ifdef Q_OS_WIN
40
41
#include <windows.h> // To change app priority
47
48
#ifndef NO_USE_INI_FILES
48
49
#include "filesettings.h"
49
50
#include "filesettingshash.h"
 
51
#include "tvsettings.h"
50
52
#endif
51
53
 
52
54
using namespace Global;
65
67
        just_unloaded_external_subs = false;
66
68
        change_volume_after_unpause = false;
67
69
 
 
70
#if DVDNAV_SUPPORT
 
71
        dvdnav_title_is_menu = true; // Enabled by default for compatibility with previous versions of mplayer
 
72
#endif
 
73
 
68
74
#ifndef NO_USE_INI_FILES
69
75
        // Create file_settings
70
 
        #if NEW_SETTINGS_MANAGEMENT
71
76
        file_settings = 0;
72
77
        changeFileSettingsMethod(pref->file_settings_method);
73
 
        #else
74
 
        if (Paths::iniPath().isEmpty()) {       
75
 
                file_settings = new QSettings(QSettings::IniFormat, QSettings::UserScope,
76
 
                                      QString(COMPANY), QString("smplayer_files") );
77
 
        } else {
78
 
                QString filename = Paths::iniPath() + "/smplayer_files.ini";
79
 
                file_settings = new QSettings( filename, QSettings::IniFormat );
80
 
                qDebug("Core::Core: file_settings: '%s'", filename.toUtf8().data());
81
 
        }
82
 
        #endif
 
78
 
 
79
        // TV settings
 
80
        tv_settings = new TVSettings(Paths::iniPath());
83
81
#endif
84
82
 
85
83
    proc = new MplayerProcess(this);
91
89
        connect( proc, SIGNAL(error(QProcess::ProcessError)),
92
90
             mplayerwindow->videoLayer(), SLOT(playingStopped()) );
93
91
 
 
92
        // Necessary to hide/unhide mouse cursor on black borders
 
93
        connect( proc, SIGNAL(processExited()),
 
94
             mplayerwindow, SLOT(playingStopped()) );
 
95
 
 
96
        connect( proc, SIGNAL(error(QProcess::ProcessError)),
 
97
             mplayerwindow, SLOT(playingStopped()) );
 
98
 
 
99
 
94
100
        connect( proc, SIGNAL(receivedCurrentSec(double)),
95
101
             this, SLOT(changeCurrentSec(double)) );
96
102
 
174
180
        QTimer * ask_timer = new QTimer(this);
175
181
        connect( ask_timer, SIGNAL(timeout()), this, SLOT(askForInfo()) );
176
182
        ask_timer->start(5000);
 
183
 
 
184
        connect( proc, SIGNAL(receivedTitleIsMenu()),
 
185
             this, SLOT(dvdTitleIsMenu()) );
 
186
        connect( proc, SIGNAL(receivedTitleIsMovie()),
 
187
             this, SLOT(dvdTitleIsMovie()) );
177
188
#endif
178
189
        
179
190
        connect( this, SIGNAL(stateChanged(Core::State)), 
188
199
        // Mplayerwindow
189
200
        connect( this, SIGNAL(aboutToStartPlaying()),
190
201
             mplayerwindow->videoLayer(), SLOT(playingStarted()) );
 
202
 
 
203
        // Necessary to hide/unhide mouse cursor on black borders
 
204
        connect( this, SIGNAL(aboutToStartPlaying()),
 
205
             mplayerwindow, SLOT(playingStarted()) );
 
206
 
191
207
#if DVDNAV_SUPPORT
192
208
        connect( mplayerwindow, SIGNAL(mouseMoved(QPoint)), 
193
209
             this, SLOT(dvdnavUpdateMousePos(QPoint)) );
222
238
 
223
239
#ifndef NO_USE_INI_FILES
224
240
        delete file_settings;
 
241
        delete tv_settings;
225
242
#endif
226
243
 
227
244
#ifdef Q_OS_WIN
233
250
 
234
251
#ifndef NO_USE_INI_FILES 
235
252
void Core::changeFileSettingsMethod(QString method) {
236
 
#if NEW_SETTINGS_MANAGEMENT
237
253
        qDebug("Core::changeFileSettingsMethod: %s", method.toUtf8().constData());
238
254
        if (file_settings) delete file_settings;
239
255
 
241
257
                file_settings = new FileSettingsHash(Paths::iniPath());
242
258
        else
243
259
                file_settings = new FileSettings(Paths::iniPath());
244
 
#endif
245
260
}
246
261
#endif
247
262
 
282
297
}
283
298
 
284
299
#ifndef NO_USE_INI_FILES
285
 
#if !NEW_SETTINGS_MANAGEMENT
286
 
 
287
 
bool Core::checkHaveSettingsSaved(QString group_name) {
288
 
        qDebug("Core::checkHaveSettingsSaved: group_name: '%s'", group_name.toUtf8().data());
289
 
 
290
 
        file_settings->beginGroup( group_name );
291
 
        bool saved = file_settings->value( "saved", false ).toBool();
292
 
        file_settings->endGroup();
293
 
 
294
 
        return saved;
295
 
}
296
 
 
297
 
void Core::loadMediaInfo(QString group_name) {
298
 
        qDebug("Core::loadMediaInfo: '%s'", group_name.toUtf8().data() );
299
 
 
300
 
        file_settings->beginGroup( group_name );
301
 
 
302
 
        /*mdat.load(*settings);*/
303
 
        mset.load(file_settings);
304
 
 
305
 
        file_settings->endGroup();
306
 
}
307
 
 
308
 
#endif // NEW_SETTINGS_MANAGEMENT
309
 
 
310
300
void Core::saveMediaInfo() {
311
301
        qDebug("Core::saveMediaInfo");
312
302
 
315
305
                return;
316
306
        }
317
307
 
318
 
#if NEW_SETTINGS_MANAGEMENT
319
308
        if ( (mdat.type == TYPE_FILE) && (!mdat.filename.isEmpty()) ) {
320
309
                file_settings->saveSettingsFor(mdat.filename, mset);
321
310
        }
322
 
#else
323
 
        QString group_name;
324
 
 
325
 
        /*
326
 
        if ( (mdat.type == TYPE_DVD) && (!mdat.dvd_id.isEmpty()) ) {
327
 
                group_name = dvdForPref( mdat.dvd_id, mset.current_title_id );
328
 
        }
329
311
        else
330
 
        */
331
 
        if ( (mdat.type == TYPE_FILE) && (!mdat.filename.isEmpty()) ) {
332
 
                group_name = FileSettings::filenameToGroupname( mdat.filename );
333
 
        }
334
 
 
335
 
        if (!group_name.isEmpty()) {
336
 
                file_settings->beginGroup( group_name );
337
 
                file_settings->setValue( "saved", true);
338
 
 
339
 
                /*mdat.save(*settings);*/
340
 
                mset.save(file_settings);
341
 
 
342
 
                file_settings->endGroup();
343
 
        }
344
 
#endif // NEW_SETTINGS_MANAGEMENT
 
312
        if ( (mdat.type == TYPE_TV) && (!mdat.filename.isEmpty()) ) {
 
313
                tv_settings->saveSettingsFor(mdat.filename, mset);
 
314
        }
345
315
}
346
 
 
347
316
#endif // NO_USE_INI_FILES
348
317
 
349
318
void Core::initializeMenus() {
454
423
                        openAudioCD();
455
424
                }
456
425
        }
 
426
        else
 
427
        if ((file.toLower().startsWith("dvb:")) || (file.toLower().startsWith("tv:"))) {
 
428
                qDebug("Core::open: * identified as TV");
 
429
                openTV(file);
 
430
        }
457
431
        else {
458
432
                qDebug("Core::open: * not identified, playing as stream");
459
433
                openStream(file);
689
663
        initPlaying();
690
664
}
691
665
 
 
666
void Core::openTV(QString channel_id) {
 
667
        qDebug("Core::openTV: '%s'", channel_id.toUtf8().constData());
 
668
 
 
669
        if (proc->isRunning()) {
 
670
                stopMplayer();
 
671
                we_are_restarting = false;
 
672
        }
 
673
 
 
674
        // Save data of previous file:
 
675
#ifndef NO_USE_INI_FILES
 
676
        saveMediaInfo();
 
677
#endif
 
678
 
 
679
        // Use last channel if the name is just "dvb://" or "tv://"
 
680
        if ((channel_id == "dvb://") && (!pref->last_dvb_channel.isEmpty())) {
 
681
                channel_id = pref->last_dvb_channel;
 
682
        }
 
683
        else
 
684
        if ((channel_id == "tv://") && (!pref->last_tv_channel.isEmpty())) {
 
685
                channel_id = pref->last_tv_channel;
 
686
        }
 
687
 
 
688
        // Save last channel
 
689
        if (channel_id.startsWith("dvb://")) pref->last_dvb_channel = channel_id;
 
690
        else
 
691
        if (channel_id.startsWith("tv://")) pref->last_tv_channel = channel_id;
 
692
 
 
693
        mdat.reset();
 
694
        mdat.filename = channel_id;
 
695
        mdat.type = TYPE_TV;
 
696
 
 
697
        mset.reset();
 
698
 
 
699
        // Set the default deinterlacer for TV
 
700
        mset.current_deinterlacer = pref->initial_tv_deinterlace;
 
701
 
 
702
#ifndef NO_USE_INI_FILES
 
703
        if (!pref->dont_remember_media_settings) {
 
704
                // Check if we already have info about this file
 
705
                if (tv_settings->existSettingsFor(channel_id)) {
 
706
                        qDebug("Core::openTV: we have settings for this file!!!");
 
707
 
 
708
                        // In this case we read info from config
 
709
                        tv_settings->loadSettingsFor(channel_id, mset);
 
710
                        qDebug("Core::openTV: media settings read");
 
711
                }
 
712
        }
 
713
#endif
 
714
 
 
715
        /* initializeMenus(); */
 
716
 
 
717
        initPlaying();
 
718
}
 
719
 
692
720
void Core::openStream(QString name) {
693
721
        qDebug("Core::openStream: '%s'", name.toUtf8().data());
694
722
 
736
764
 
737
765
#ifndef NO_USE_INI_FILES
738
766
        // Check if we already have info about this file
739
 
        #if NEW_SETTINGS_MANAGEMENT
740
767
        if (file_settings->existSettingsFor(file)) {
741
 
        #else
742
 
        if (checkHaveSettingsSaved( FileSettings::filenameToGroupname(file) )) {
743
 
        #endif
744
768
                qDebug("Core::playNewFile: We have settings for this file!!!");
745
769
 
746
770
                // In this case we read info from config
747
771
                if (!pref->dont_remember_media_settings) {
748
 
                        #if NEW_SETTINGS_MANAGEMENT
749
772
                        file_settings->loadSettingsFor(file, mset);
750
 
                        #else
751
 
                        loadMediaInfo( FileSettings::filenameToGroupname(file) );
752
 
                        #endif
753
773
                        qDebug("Core::playNewFile: Media settings read");
754
774
 
755
775
                        // Resize the window and set the aspect as soon as possible
982
1002
 
983
1003
        we_are_restarting = false;
984
1004
 
985
 
#if NEW_ASPECT_CODE
986
1005
        changeAspectRatio(mset.aspect_ratio_id);
987
 
#else
988
 
        if (mset.aspect_ratio_id < MediaSettings::Aspect43Letterbox) {
989
 
                changeAspectRatio(mset.aspect_ratio_id);
990
 
        }
991
 
#endif
992
1006
 
993
 
        bool isMuted = mset.mute;
994
 
        if (!pref->dont_change_volume) {
995
 
                 setVolume( mset.volume, TRUE );
 
1007
        if (pref->global_volume) {
 
1008
                bool was_muted = pref->mute;
 
1009
                setVolume( pref->volume, true);
 
1010
                if (was_muted) mute(true);
 
1011
        } else {
 
1012
                bool was_muted = mset.mute;
 
1013
                 setVolume( mset.volume, true );
 
1014
                if (was_muted) mute(true);
996
1015
        }
997
 
        if (isMuted) mute(TRUE);
998
1016
 
999
1017
        if (pref->change_video_equalizer_on_startup && (mset.gamma != 0)) {
1000
1018
                int gamma = mset.gamma;
1007
1025
 
1008
1026
        changePanscan(mset.panscan_factor);
1009
1027
 
 
1028
        // Toggle subtitle visibility
 
1029
        changeSubVisibility(pref->sub_visibility);
 
1030
 
 
1031
        // Initialize the OSD level
 
1032
        QTimer::singleShot(3000, this, SLOT(initializeOSD()));
 
1033
 
1010
1034
        emit mediaLoaded();
1011
1035
        emit mediaInfoChanged();
1012
1036
 
1015
1039
        qDebug("Core::finishRestart: --- end ---");
1016
1040
}
1017
1041
 
 
1042
void Core::initializeOSD() {
 
1043
        changeOSD(pref->osd);
 
1044
}
1018
1045
 
1019
1046
void Core::stop()
1020
1047
{
1025
1052
                // if pressed stop twice, reset video to the beginning
1026
1053
                qDebug("Core::stop: mset.current_sec: %f", mset.current_sec);
1027
1054
                mset.current_sec = 0;
 
1055
                qDebug("Core::stop: mset.current_sec set to 0");
1028
1056
                emit showTime( mset.current_sec );
1029
1057
#ifdef SEEKBAR_RESOLUTION
1030
1058
                emit positionChanged( 0 );
1119
1147
        }
1120
1148
}
1121
1149
 
 
1150
void Core::screenshots() {
 
1151
        qDebug("Core::screenshots");
 
1152
 
 
1153
        if ( (!pref->screenshot_directory.isEmpty()) && 
 
1154
         (QFileInfo(pref->screenshot_directory).isDir()) ) 
 
1155
        {
 
1156
                tellmp( "screenshot 1");
 
1157
        } else {
 
1158
                qDebug("Core::screenshots: error: directory for screenshots not valid");
 
1159
                QString text = "Screenshots NOT taken, folder not configured";
 
1160
                tellmp("osd_show_text \"" + text + "\" 3000 1");
 
1161
                emit showMessage(text);
 
1162
        }
 
1163
}
 
1164
 
1122
1165
void Core::processFinished()
1123
1166
{
1124
1167
    qDebug("Core::processFinished");
1126
1169
#ifdef Q_OS_WIN
1127
1170
#ifdef SCREENSAVER_OFF
1128
1171
        // Restores the Windows screensaver
1129
 
        if (pref->disable_screensaver) {
1130
 
                win_screensaver->restore();
 
1172
        if (pref->turn_screensaver_off) {
 
1173
                win_screensaver->enable();
1131
1174
        }
1132
1175
#endif
1133
1176
#endif
1197
1240
#ifdef Q_OS_WIN
1198
1241
#ifdef SCREENSAVER_OFF
1199
1242
        // Disable the Windows screensaver
1200
 
        if (pref->disable_screensaver) {
 
1243
        if (pref->turn_screensaver_off) {
1201
1244
                win_screensaver->disable();
1202
1245
        }
1203
1246
#endif
1221
1264
        bool url_is_playlist = file.endsWith(IS_PLAYLIST_TAG);
1222
1265
        if (url_is_playlist) file = file.remove( QRegExp(IS_PLAYLIST_TAG_RX) );
1223
1266
 
1224
 
        bool screenshot_enabled = ( (!pref->screenshot_directory.isEmpty()) && 
1225
 
                                 (QFileInfo(pref->screenshot_directory).isDir()) );
 
1267
        bool screenshot_enabled = ( (pref->use_screenshot) && 
 
1268
                                (!pref->screenshot_directory.isEmpty()) && 
 
1269
                                (QFileInfo(pref->screenshot_directory).isDir()) );
1226
1270
 
1227
1271
        proc->clearArguments();
1228
1272
 
1245
1289
 
1246
1290
        proc->addArgument("-noquiet");
1247
1291
 
 
1292
        if (pref->verbose_log) {
 
1293
                proc->addArgument("-v");
 
1294
        }
 
1295
 
1248
1296
        if (pref->fullscreen && pref->use_mplayer_window) {
1249
1297
                proc->addArgument("-fs");
1250
1298
        } else {
1267
1315
                proc->addArgument("-vc");
1268
1316
                proc->addArgument(mset.forced_video_codec);
1269
1317
        }
 
1318
#ifndef Q_OS_WIN
 
1319
        else {
 
1320
                if (pref->vo.startsWith("vdpau")) {
 
1321
                        proc->addArgument("-vc");
 
1322
                        proc->addArgument("ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,");
 
1323
                }
 
1324
#endif  
 
1325
                else {
 
1326
                        if (pref->coreavc) {
 
1327
                                proc->addArgument("-vc");
 
1328
                                proc->addArgument("coreserve,");
 
1329
                        }
 
1330
                }
 
1331
#ifndef Q_OS_WIN
 
1332
        }
 
1333
#endif
1270
1334
 
1271
1335
        if (pref->use_hwac3) {
1272
1336
                proc->addArgument("-afm");
1333
1397
        } else {
1334
1398
                proc->addArgument("-vo");
1335
1399
#ifdef Q_OS_WIN
1336
 
                if (QSysInfo::WindowsVersion == QSysInfo::WV_VISTA) {
 
1400
                if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA) {
1337
1401
                        proc->addArgument("direct3d,");
1338
1402
                } else {
1339
1403
                        proc->addArgument("directx,");
1408
1472
                proc->addArgument( QString::number( pref->autosync_factor ) );
1409
1473
        }
1410
1474
 
 
1475
        if (pref->use_mc) {
 
1476
                proc->addArgument("-mc");
 
1477
                proc->addArgument( QString::number( pref->mc_value ) );
 
1478
        }
 
1479
 
1411
1480
        if (pref->use_direct_rendering) {
1412
1481
                proc->addArgument("-dr");
1413
1482
        } else {
1423
1492
#ifndef Q_OS_WIN
1424
1493
        if (!pref->use_mplayer_window) {
1425
1494
                proc->addArgument( "-input" );
1426
 
                proc->addArgument( "conf=" + Paths::dataPath() +"/input.conf" );
 
1495
                if (MplayerVersion::isMplayerAtLeast(29058)) {
 
1496
                        proc->addArgument( "nodefault-bindings:conf=/dev/null" );
 
1497
                } else {
 
1498
                        proc->addArgument( "conf=" + Paths::dataPath() +"/input.conf" );
 
1499
                }
1427
1500
        }
1428
1501
#endif
1429
1502
 
1565
1638
                proc->addArgument("-forcedsubsonly");
1566
1639
        }
1567
1640
 
 
1641
#if PROGRAM_SWITCH
 
1642
        if ( (mset.current_program_id != MediaSettings::NoneSelected) /*&& 
 
1643
         (mset.current_video_id == MediaSettings::NoneSelected) && 
 
1644
         (mset.current_audio_id == MediaSettings::NoneSelected)*/ )
 
1645
        {
 
1646
                proc->addArgument("-tsprog");
 
1647
                proc->addArgument( QString::number( mset.current_program_id ) );
 
1648
        }
 
1649
        // Don't set video and audio track if using -tsprog
 
1650
        else {
 
1651
#endif
 
1652
 
1568
1653
        if (mset.current_video_id != MediaSettings::NoneSelected) {
1569
1654
                proc->addArgument("-vid");
1570
1655
                proc->addArgument( QString::number( mset.current_video_id ) );
1578
1663
                }
1579
1664
        }
1580
1665
 
 
1666
#if PROGRAM_SWITCH
 
1667
        }
 
1668
#endif
 
1669
 
1581
1670
        if (!initial_subtitle.isEmpty()) {
1582
1671
                mset.external_subtitles = initial_subtitle;
1583
1672
                initial_subtitle = "";
1657
1746
        }
1658
1747
 
1659
1748
        // Set volume, requires mplayer svn r27872
1660
 
        bool use_volume_option = (pref->use_volume_option == Preferences::Enabled);
1661
 
        if (pref->use_volume_option == Preferences::Detect) {
1662
 
                use_volume_option = (MplayerVersion::isMplayerAtLeast(27872));
1663
 
        }
1664
 
        if ((use_volume_option) && (!pref->dont_change_volume)) {
1665
 
                proc->addArgument("-volume");
1666
 
                // Note: mset.volume may not be right, it can be the volume of the previous video if
1667
 
                // playing a new one, but I think it's better to use anyway the current volume on
1668
 
                // startup than set it to 0 or something.
1669
 
                // The right volume will be set later, when the video starts to play.
1670
 
                proc->addArgument( QString::number( mset.volume ) );
 
1749
        bool use_volume_option = (MplayerVersion::isMplayerAtLeast(27872));
 
1750
 
 
1751
        if (pref->global_volume) {
 
1752
                if (use_volume_option) {
 
1753
                        proc->addArgument("-volume");
 
1754
                        proc->addArgument( QString::number( pref->volume ) );
 
1755
                }
 
1756
        } else {
 
1757
                if (use_volume_option) {
 
1758
                        proc->addArgument("-volume");
 
1759
                        // Note: mset.volume may not be right, it can be the volume of the previous video if
 
1760
                        // playing a new one, but I think it's better to use anyway the current volume on
 
1761
                        // startup than set it to 0 or something.
 
1762
                        // The right volume will be set later, when the video starts to play.
 
1763
                        proc->addArgument( QString::number( mset.volume ) );
 
1764
                }
1671
1765
        }
1672
1766
 
1673
1767
 
1716
1810
                case TYPE_STREAM        : cache = pref->cache_for_streams; break;
1717
1811
                case TYPE_VCD           : cache = pref->cache_for_vcds; break;
1718
1812
                case TYPE_AUDIO_CD      : cache = pref->cache_for_audiocds; break;
 
1813
                case TYPE_TV            : cache = pref->cache_for_tv; break;
1719
1814
                default: cache = 0;
1720
1815
        }
1721
1816
 
1731
1826
                proc->addArgument( QString::number( mset.speed ) );
1732
1827
        }
1733
1828
 
1734
 
        // If seek < 5 it's better to allow the video to start from the beginning
1735
 
        if ((seek >= 5) && (!pref->loop)) {
1736
 
                proc->addArgument("-ss");
1737
 
                proc->addArgument( QString::number( seek ) );
 
1829
        if (mdat.type != TYPE_TV) {
 
1830
                // If seek < 5 it's better to allow the video to start from the beginning
 
1831
                if ((seek >= 5) && (!pref->loop)) {
 
1832
                        proc->addArgument("-ss");
 
1833
                        proc->addArgument( QString::number( seek ) );
 
1834
                }
1738
1835
        }
1739
1836
 
 
1837
        // Enable the OSD later, to avoid a lot of messages to be
 
1838
        // printed on startup
1740
1839
        proc->addArgument("-osdlevel");
1741
 
        proc->addArgument( QString::number( pref->osd ) );
 
1840
        proc->addArgument( 0 );
1742
1841
 
1743
1842
        if (pref->use_idx) {
1744
1843
                proc->addArgument("-idx");
1787
1886
                }
1788
1887
        }
1789
1888
 
1790
 
#if !NEW_ASPECT_CODE
1791
 
        // Panscan (crop)
1792
 
        if (!mset.panscan_filter.isEmpty()) {
1793
 
                proc->addArgument( "-vf-add" );
1794
 
                proc->addArgument( mset.panscan_filter );
1795
 
        }
1796
 
 
1797
 
        // Crop 4:3 to 16:9
1798
 
        if (!mset.crop_43to169_filter.isEmpty()) {
1799
 
                proc->addArgument( "-vf-add" );
1800
 
                proc->addArgument( mset.crop_43to169_filter );
1801
 
        }
1802
 
#endif
1803
 
 
1804
1889
        // Denoise
1805
1890
        if (mset.current_denoiser != MediaSettings::NoDenoise) {
1806
1891
                proc->addArgument("-vf-add");
1807
1892
                if (mset.current_denoiser==MediaSettings::DenoiseSoft) {
1808
 
                        proc->addArgument( "hqdn3d=2:1:2" );
 
1893
                        proc->addArgument( pref->filters->item("denoise_soft").filter() );
1809
1894
                } else {
1810
 
                        proc->addArgument( "hqdn3d" );
 
1895
                        proc->addArgument( pref->filters->item("denoise_normal").filter() );
1811
1896
                }
1812
1897
        }
1813
1898
 
1814
1899
        // Deblock
1815
1900
        if (mset.deblock_filter) {
1816
1901
                proc->addArgument("-vf-add");
1817
 
                proc->addArgument( "pp=vb/hb" );
 
1902
                proc->addArgument( pref->filters->item("deblock").filter() );
1818
1903
        }
1819
1904
 
1820
1905
        // Dering
1835
1920
        // Addnoise
1836
1921
        if (mset.noise_filter) {
1837
1922
                proc->addArgument("-vf-add");
1838
 
                proc->addArgument( "noise=9ah:5ah" );
 
1923
                proc->addArgument( pref->filters->item("noise").filter() );
1839
1924
        }
1840
1925
 
1841
1926
        // Postprocessing
1848
1933
 
1849
1934
 
1850
1935
        // Letterbox (expand)
1851
 
#if NEW_ASPECT_CODE
1852
1936
        if ((mset.add_letterbox) || (pref->fullscreen && pref->add_blackborders_on_fullscreen)) {
1853
1937
                proc->addArgument("-vf-add");
1854
1938
                proc->addArgument( QString("expand=:::::%1,harddup").arg( DesktopInfo::desktop_aspectRatio(mplayerwindow)) );
1858
1942
                // it will be harmless in mplayer. 
1859
1943
                // Anyway, if you know a proper way to fix the problem, please tell me.
1860
1944
        }
1861
 
#else
1862
 
        if (mset.letterbox == MediaSettings::Letterbox_43) {            
1863
 
                proc->addArgument("-vf-add");
1864
 
                proc->addArgument("expand=:::::4/3");
1865
 
        }
1866
 
        else
1867
 
        if (mset.letterbox == MediaSettings::Letterbox_169) {
1868
 
                proc->addArgument("-vf-add");
1869
 
                proc->addArgument("expand=:::::16/9");
1870
 
        }
1871
 
#endif
1872
1945
 
1873
1946
        // Software equalizer
1874
1947
        if ( (pref->use_soft_video_eq) ) {
1936
2009
                proc->addArgument("screenshot");
1937
2010
        }
1938
2011
 
 
2012
 
 
2013
        // VDPAU doesn't allow any video filters!
 
2014
#ifndef Q_OS_WIN
 
2015
        if (pref->vo.startsWith("vdpau")) {
 
2016
                proc->addArgument("-vf-clr");
 
2017
                qDebug("Core::startMplayer: vdpau doesn't allow any video filter. All have been removed.");
 
2018
        }
 
2019
#endif
 
2020
 
 
2021
 
1939
2022
        // slices
1940
2023
        if ((pref->use_slices) && (!force_noslices)) {
1941
2024
                proc->addArgument("-slices");
1969
2052
 
1970
2053
        if (mset.volnorm_filter) {
1971
2054
                if (!af.isEmpty()) af += ",";
1972
 
                af += "volnorm=2";
 
2055
                af += pref->filters->item("volnorm").filter();
1973
2056
        }
1974
2057
 
1975
2058
        bool use_scaletempo = (pref->use_scaletempo == Preferences::Enabled);
2111
2194
 
2112
2195
    if (sec < 0) sec = 0;
2113
2196
    if (sec > mdat.duration ) sec = mdat.duration - 20;
2114
 
    tellmp("seek " + QString::number(sec) + " 2");
 
2197
    tellmp("pausing_keep seek " + QString::number(sec) + " 2");
2115
2198
}
2116
2199
 
2117
2200
 
2489
2572
 
2490
2573
        mset.speed = value;
2491
2574
        tellmp( "speed_set " + QString::number( value ) );
 
2575
 
 
2576
        displayMessage( tr("Speed: %1").arg(value) );
2492
2577
}
2493
2578
 
2494
2579
void Core::incSpeed10() {
2538
2623
void Core::setVolume(int volume, bool force) {
2539
2624
        qDebug("Core::setVolume: %d", volume);
2540
2625
 
2541
 
        if ((volume==mset.volume) && (!force)) return;
2542
 
 
2543
 
        mset.volume = volume;
2544
 
        if (mset.volume > 100 ) mset.volume = 100;
2545
 
        if (mset.volume < 0 ) mset.volume = 0;
 
2626
        int current_volume = (pref->global_volume ? pref->volume : mset.volume);
 
2627
 
 
2628
        if ((volume == current_volume) && (!force)) return;
 
2629
 
 
2630
        current_volume = volume;
 
2631
        if (current_volume > 100) current_volume = 100;
 
2632
        if (current_volume < 0) current_volume = 0;
2546
2633
 
2547
2634
        if (state() == Paused) {
2548
2635
                // Change volume later, after quiting pause
2549
2636
                change_volume_after_unpause = true;
2550
2637
        } else {
2551
 
                tellmp("volume " + QString::number(volume) + " 1");
 
2638
                tellmp("volume " + QString::number(current_volume) + " 1");
2552
2639
        }
2553
2640
 
2554
 
        //if (mset.mute) mute(TRUE);
2555
 
        mset.mute=false;
 
2641
        if (pref->global_volume) {
 
2642
                pref->volume = current_volume;
 
2643
                pref->mute = false;
 
2644
        } else {
 
2645
                mset.volume = current_volume;
 
2646
                mset.mute = false;
 
2647
        }
2556
2648
 
2557
2649
        updateWidgets();
2558
2650
 
2559
 
        displayMessage( tr("Volume: %1").arg(mset.volume) );
2560
 
        emit volumeChanged( mset.volume );
 
2651
        displayMessage( tr("Volume: %1").arg(current_volume) );
 
2652
        emit volumeChanged( current_volume );
2561
2653
}
2562
2654
 
2563
2655
void Core::switchMute() {
2570
2662
void Core::mute(bool b) {
2571
2663
        qDebug("Core::mute");
2572
2664
 
2573
 
        mset.mute = b;
2574
 
 
2575
 
        int v = 0;
2576
 
        if (mset.mute) v = 1;
 
2665
        int v = (b ? 1 : 0);
2577
2666
        tellmp( pausing_prefix() + " mute " + QString::number(v) );
2578
2667
 
 
2668
        if (pref->global_volume) {
 
2669
                pref->mute = b;
 
2670
        } else {
 
2671
                mset.mute = b;
 
2672
        }
 
2673
 
2579
2674
        updateWidgets();
2580
2675
}
2581
2676
 
2582
2677
void Core::incVolume() {
2583
2678
        qDebug("Core::incVolume");
2584
 
        setVolume(mset.volume + 4);
 
2679
        int new_vol = (pref->global_volume ? pref->volume + 4 : mset.volume + 4);
 
2680
        setVolume(new_vol);
2585
2681
}
2586
2682
 
2587
2683
void Core::decVolume() {
2588
2684
        qDebug("Core::incVolume");
2589
 
        setVolume(mset.volume-4);
 
2685
        int new_vol = (pref->global_volume ? pref->volume - 4 : mset.volume - 4);
 
2686
        setVolume(new_vol);
2590
2687
}
2591
2688
 
2592
2689
void Core::setSubDelay(int delay) {
2593
2690
        qDebug("Core::setSubDelay: %d", delay);
2594
2691
        mset.sub_delay = delay;
2595
 
        tellmp("sub_delay " + QString::number( (double) mset.sub_delay/1000 ) +" 1");
 
2692
        tellmp( pausing_prefix() + " sub_delay " + QString::number( (double) mset.sub_delay/1000 ) +" 1");
 
2693
        displayMessage( tr("Subtitle delay: %1 ms").arg(delay) );
2596
2694
}
2597
2695
 
2598
2696
void Core::incSubDelay() {
2608
2706
void Core::setAudioDelay(int delay) {
2609
2707
        qDebug("Core::setAudioDelay: %d", delay);
2610
2708
        mset.audio_delay = delay;
2611
 
        tellmp("audio_delay " + QString::number( (double) mset.audio_delay/1000 ) +" 1");
 
2709
        tellmp( pausing_prefix() + " audio_delay " + QString::number( (double) mset.audio_delay/1000 ) +" 1");
 
2710
        displayMessage( tr("Audio delay: %1 ms").arg(delay) );
2612
2711
}
2613
2712
 
2614
2713
void Core::incAudioDelay() {
2714
2813
        tellmp("sub_step -1");
2715
2814
}
2716
2815
 
 
2816
void Core::changeSubVisibility(bool visible) {
 
2817
        qDebug("Core::changeSubVisilibity: %d", visible);
 
2818
        pref->sub_visibility = visible;
 
2819
        tellmp(QString("sub_visibility %1").arg(pref->sub_visibility ? 1 : 0));
 
2820
 
 
2821
        if (pref->sub_visibility) 
 
2822
                displayMessage( tr("Subtitles on") );
 
2823
        else
 
2824
                displayMessage( tr("Subtitles off") );
 
2825
}
 
2826
 
2717
2827
// Audio equalizer functions
2718
2828
void Core::setAudioEqualizer(AudioEqualizerList values, bool restart) {
2719
2829
        mset.audio_equalizer = values;
2944
3054
                        restartPlay(); 
2945
3055
                } else {
2946
3056
                        tellmp("switch_audio " + QString::number(ID) );
2947
 
                        //#ifdef Q_OS_WIN
2948
3057
                        // Workaround for a mplayer problem in windows,
2949
3058
                        // volume is too loud after changing audio.
2950
3059
 
2951
3060
                        // Workaround too for a mplayer problem in linux,
2952
3061
                        // the volume is reduced if using -softvol-max.
2953
 
                        if (!pref->dont_change_volume) {
 
3062
 
 
3063
                        if (pref->global_volume) {
 
3064
                                setVolume( pref->volume, true);
 
3065
                                if (pref->mute) mute(true);
 
3066
                        } else {
2954
3067
                                setVolume( mset.volume, true );
 
3068
                                if (mset.mute) mute(true); // if muted, mute again
2955
3069
                        }
2956
 
                        //#endif
2957
 
                        if (mset.mute) mute(true); // if muted, mute again
2958
3070
                        updateWidgets();
2959
3071
                }
2960
3072
        }
2986
3098
                bool need_restart = false;
2987
3099
                if (allow_restart) {
2988
3100
                        // afaik lavf doesn't require to restart, any other?
2989
 
                        need_restart = (mdat.demuxer != "lavf");
 
3101
                        need_restart = ((mdat.demuxer != "lavf") && (mdat.demuxer != "mpegts"));
2990
3102
                }
2991
3103
 
2992
3104
                if (need_restart) {
2993
3105
                        restartPlay(); 
2994
3106
                } else {
2995
 
                        tellmp("set_property switch_video " + QString::number(ID) );
 
3107
                        if (mdat.demuxer == "nsv") {
 
3108
                                // Workaround a problem with the nsv demuxer
 
3109
                                qWarning("Core::changeVideo: not calling set_property switch_video with nsv to prevent mplayer go crazy");
 
3110
                        } else {
 
3111
                                tellmp("set_property switch_video " + QString::number(ID) );
 
3112
                        }
2996
3113
                }
2997
3114
        }
2998
3115
}
3013
3130
        }
3014
3131
}
3015
3132
 
 
3133
#if PROGRAM_SWITCH
 
3134
void Core::changeProgram(int ID) {
 
3135
        qDebug("Core::changeProgram: %d", ID);
 
3136
 
 
3137
        if (ID != mset.current_program_id) {
 
3138
                mset.current_program_id = ID;
 
3139
                tellmp("set_property switch_program " + QString::number(ID) );
 
3140
 
 
3141
                tellmp("get_property switch_audio");
 
3142
                tellmp("get_property switch_video");
 
3143
 
 
3144
                /*
 
3145
                mset.current_video_id = MediaSettings::NoneSelected;
 
3146
                mset.current_audio_id = MediaSettings::NoneSelected;
 
3147
 
 
3148
                updateWidgets();
 
3149
                */
 
3150
        }
 
3151
}
 
3152
 
 
3153
void Core::nextProgram() {
 
3154
        qDebug("Core::nextProgram");
 
3155
        // Not implemented yet
 
3156
}
 
3157
 
 
3158
#endif
3016
3159
 
3017
3160
void Core::changeTitle(int ID) {
3018
3161
        if (mdat.type == TYPE_VCD) {
3077
3220
}
3078
3221
 
3079
3222
int Core::firstChapter() {
3080
 
        if (MplayerVersion::isMplayerAtLeast(25391)) 
 
3223
        if ( (MplayerVersion::isMplayerAtLeast(25391)) && 
 
3224
         (!MplayerVersion::isMplayerAtLeast(29407)) ) 
3081
3225
                return 1;
3082
3226
        else
3083
3227
                return 0;
3168
3312
        }
3169
3313
}
3170
3314
 
3171
 
#if NEW_ASPECT_CODE
3172
3315
void Core::changeAspectRatio( int ID ) {
3173
3316
        qDebug("Core::changeAspectRatio: %d", ID);
3174
3317
 
3190
3333
}
3191
3334
 
3192
3335
void Core::nextAspectRatio() {
3193
 
        int ID = mset.aspect_ratio_id + 1;
3194
 
        if (ID > MediaSettings:: Aspect11) ID = MediaSettings::AspectNone;
3195
 
        changeAspectRatio(ID);
3196
 
 
 
3336
        // Ordered list
 
3337
        QList<int> s;
 
3338
        s << MediaSettings::AspectNone 
 
3339
      << MediaSettings::AspectAuto
 
3340
      << MediaSettings::Aspect11        // 1
 
3341
      << MediaSettings::Aspect54        // 1.25
 
3342
      << MediaSettings::Aspect43        // 1.33
 
3343
      << MediaSettings::Aspect1410      // 1.4
 
3344
      << MediaSettings::Aspect32        // 1.5
 
3345
      << MediaSettings::Aspect149       // 1.55
 
3346
      << MediaSettings::Aspect1610      // 1.6
 
3347
      << MediaSettings::Aspect169       // 1.77
 
3348
      << MediaSettings::Aspect235;      // 2.35
 
3349
 
 
3350
        int i = s.indexOf( mset.aspect_ratio_id ) + 1;
 
3351
        if (i >= s.count()) i = 0;
 
3352
 
 
3353
        int new_aspect_id = s[i];
 
3354
 
 
3355
        changeAspectRatio( new_aspect_id );
3197
3356
        updateWidgets();
3198
3357
}
3199
3358
 
 
3359
void Core::nextWheelFunction() {
 
3360
        int a = pref->wheel_function;
 
3361
 
 
3362
        bool done = false;
 
3363
        if(((int ) pref->wheel_function_cycle)==0)
 
3364
                return;
 
3365
        while(!done){
 
3366
                // get next a
 
3367
 
 
3368
                a = a*2;
 
3369
                if(a==32)
 
3370
                        a = 2;
 
3371
                // See if we are done
 
3372
                if(pref->wheel_function_cycle.testFlag(QFlag(a)))
 
3373
                        done = true;
 
3374
        }
 
3375
        pref->wheel_function = a;
 
3376
        QString m = "";
 
3377
        switch(a){
 
3378
        case Preferences::Seeking:
 
3379
                m = tr("Mouse wheel seeks now");
 
3380
                break;
 
3381
        case Preferences::Volume:
 
3382
                m = tr("Mouse wheel changes volume now");
 
3383
                break;
 
3384
        case Preferences::Zoom:
 
3385
                m = tr("Mouse wheel changes zoom level now");
 
3386
                break;
 
3387
        case Preferences::ChangeSpeed:
 
3388
                m = tr("Mouse wheel changes speed now");
 
3389
                break;
 
3390
        }
 
3391
        displayMessage(m);
 
3392
}
 
3393
 
3200
3394
void Core::changeLetterbox(bool b) {
3201
3395
        qDebug("Core::changeLetterbox: %d", b);
3202
3396
 
3206
3400
        }
3207
3401
}
3208
3402
 
3209
 
#else
3210
 
void Core::changeAspectRatio( int ID ) {
3211
 
        qDebug("Core::changeAspectRatio: %d", ID);
3212
 
 
3213
 
        int old_id = mset.aspect_ratio_id;
3214
 
        mset.aspect_ratio_id = ID;
3215
 
        bool need_restart = FALSE;
3216
 
 
3217
 
    double asp = mdat.video_aspect; // Set a default
3218
 
 
3219
 
    if (ID==MediaSettings::Aspect43Letterbox) {  
3220
 
                need_restart = (old_id != MediaSettings::Aspect43Letterbox);
3221
 
                asp = (double) 4 / 3;
3222
 
        mset.letterbox = MediaSettings::Letterbox_43;
3223
 
                mset.panscan_filter = "";
3224
 
                mset.crop_43to169_filter = "";
3225
 
        }
3226
 
        else
3227
 
    if (ID==MediaSettings::Aspect169Letterbox) {  
3228
 
                need_restart = (old_id != MediaSettings::Aspect169Letterbox);
3229
 
                asp = (double) 16 / 9;
3230
 
        mset.letterbox = MediaSettings::Letterbox_169;
3231
 
                mset.panscan_filter = "";
3232
 
                mset.crop_43to169_filter = "";
3233
 
        }
3234
 
        else
3235
 
        if (ID==MediaSettings::Aspect43Panscan) {
3236
 
                need_restart = (old_id != MediaSettings::Aspect43Panscan);
3237
 
                mset.crop_43to169_filter = "";
3238
 
                mset.letterbox = MediaSettings::NoLetterbox;
3239
 
 
3240
 
                asp = (double) 4 / 3;
3241
 
                int real_width = (int) round(mdat.video_height * mdat.video_aspect);
3242
 
                mset.panscan_filter = QString("scale=%1:%2,").arg(real_width).arg(mdat.video_height);
3243
 
                mset.panscan_filter += QString("crop=%1:%2").arg(round(mdat.video_height * 4 /3)).arg(mdat.video_height);
3244
 
                //mset.crop = QSize( mdat.video_height * 4 /3, mdat.video_height );
3245
 
                qDebug("Core::changeAspectRatio: panscan_filter = '%s'", mset.panscan_filter.toUtf8().data() );
3246
 
 
3247
 
        }
3248
 
    else
3249
 
        if (ID==MediaSettings::Aspect43To169) {
3250
 
                need_restart = (old_id != MediaSettings::Aspect43To169);
3251
 
                mset.panscan_filter = "";
3252
 
                mset.crop_43to169_filter = "";
3253
 
                mset.letterbox = MediaSettings::NoLetterbox;
3254
 
 
3255
 
                int real_width = (int) round(mdat.video_height * mdat.video_aspect);
3256
 
                int height = (int) round(real_width * 9 / 16);
3257
 
 
3258
 
                qDebug("Core::changeAspectRatio: video_width: %d, video_height: %d", real_width, mdat.video_height);
3259
 
                qDebug("Core::changeAspectRatio: crop: %d, %d", real_width, height );
3260
 
 
3261
 
                if (height > mdat.video_height) {
3262
 
                        // Invalid size, source video is not 4:3
3263
 
                        need_restart = FALSE;
3264
 
                } else {
3265
 
                        asp = (double) 16 / 9;
3266
 
                        mset.crop_43to169_filter = QString("scale=%1:%2,").arg(real_width).arg(mdat.video_height);
3267
 
                        mset.crop_43to169_filter += QString("crop=%1:%2").arg(real_width).arg(height);
3268
 
                        qDebug("Core::changeAspectRatio: crop_43to169_filter = '%s'", mset.crop_43to169_filter.toUtf8().data() );
3269
 
                }
3270
 
        }
3271
 
        else
3272
 
    {
3273
 
                //need_restart = (mset.force_letterbox == TRUE);
3274
 
                need_restart = ( (old_id == MediaSettings::Aspect43Letterbox) || 
3275
 
                         (old_id == MediaSettings::Aspect169Letterbox) || 
3276
 
                         (old_id == MediaSettings::Aspect43Panscan) || 
3277
 
                         (old_id == MediaSettings::Aspect43To169) );
3278
 
                mset.letterbox = MediaSettings::NoLetterbox;
3279
 
                mset.panscan_filter = "";
3280
 
                mset.crop_43to169_filter = "";
3281
 
        switch (ID) {
3282
 
                //case MediaSettings::AspectAuto: asp = mdat.video_aspect; break;
3283
 
                        case MediaSettings::AspectAuto: {
3284
 
                                qDebug("Core::changeAspectRatio: mset.win_width %d, mset.win_height: %d", mset.win_width, mset.win_height);
3285
 
                asp = mset.win_aspect(); break;
3286
 
                        }
3287
 
            case MediaSettings::Aspect43: asp = (double) 4 / 3; break;
3288
 
            case MediaSettings::Aspect169: asp = (double) 16 / 9; break;
3289
 
                        case MediaSettings::Aspect149: asp = (double) 14 / 9; break;
3290
 
                        case MediaSettings::Aspect1610: asp = (double) 16 / 10; break;
3291
 
                        case MediaSettings::Aspect54: asp = (double) 5 / 4; break;
3292
 
            case MediaSettings::Aspect235: asp = 2.35; break;
3293
 
                }
3294
 
        }
3295
 
 
3296
 
        if (!pref->use_mplayer_window) {
3297
 
                mplayerwindow->setAspect( asp );
3298
 
        } else {
3299
 
                // Using mplayer own window
3300
 
                tellmp("switch_ratio " + QString::number(asp));
3301
 
        }
3302
 
 
3303
 
        updateWidgets();
3304
 
 
3305
 
    if (need_restart) {
3306
 
                /*mdat.calculateWinResolution(mset.force_letterbox);*/
3307
 
        restartPlay();
3308
 
        }
3309
 
}
3310
 
#endif
3311
 
 
3312
3403
void Core::changeOSD(int v) {
3313
3404
        qDebug("Core::changeOSD: %d", v);
3314
3405
 
3315
3406
        pref->osd = v;
3316
 
        tellmp("osd " + QString::number( pref->osd ) );
 
3407
        tellmp( pausing_prefix() + " osd " + QString::number( pref->osd ) );
3317
3408
        updateWidgets();
3318
3409
}
3319
3410
 
3640
3731
        {
3641
3732
                // Delayed volume change
3642
3733
                qDebug("Core::watchState: delayed volume change");
3643
 
                tellmp("volume " + QString::number(mset.volume) + " 1");
 
3734
                int volume = (pref->global_volume ? pref->volume : mset.volume);
 
3735
                tellmp("volume " + QString::number(volume) + " 1");
3644
3736
                change_volume_after_unpause = false;
3645
3737
        }
3646
3738
}
3784
3876
                        // The loaded subtitle file is the last one, so
3785
3877
                        // try to select that one.
3786
3878
                        if (mdat.subs.numItems() > 0) {
3787
 
                                changeSubtitle( mdat.subs.numItems()-1 );
 
3879
                                int selected_subtitle = mdat.subs.numItems()-1; // If everything fails, use the last one
 
3880
 
 
3881
                                // Try to find the subtitle file in the list
 
3882
                                for (int n = 0; n < mdat.subs.numItems(); n++) {
 
3883
                                        SubData sub = mdat.subs.itemAt(n);
 
3884
                                        if ((sub.type() == SubData::File) && (sub.filename() == mset.external_subtitles)) {
 
3885
                                                selected_subtitle = n;
 
3886
                                                qDebug("Core::initSubtitleTrack: external subtitle found: #%d", n);
 
3887
                                                break;
 
3888
                                        }
 
3889
                                }
 
3890
                                changeSubtitle( selected_subtitle );
3788
3891
                                goto end;
3789
3892
                        }
3790
3893
                }
3853
3956
}
3854
3957
 
3855
3958
void Core::dvdnavUpdateMousePos(QPoint pos) {
3856
 
        if ((state() == Playing) && (mdat.filename.startsWith("dvdnav:"))) {
 
3959
        if ((state() == Playing) && (mdat.filename.startsWith("dvdnav:")) && (dvdnav_title_is_menu)) {
3857
3960
                if (mplayerwindow->videoLayer()->underMouse()) {
3858
3961
                        QPoint p = mplayerwindow->videoLayer()->mapFromParent(pos);
3859
3962
                        tellmp(QString("set_mouse_pos %1 %2").arg(p.x()).arg(p.y()));
3860
3963
                }
3861
3964
        }
3862
3965
}
 
3966
 
 
3967
void Core::dvdTitleIsMenu() {
 
3968
        qDebug("Core::dvdTitleIsMenu");
 
3969
        dvdnav_title_is_menu = true;
 
3970
}
 
3971
 
 
3972
void Core::dvdTitleIsMovie() {
 
3973
        qDebug("Core::dvdTitleIsMovie");
 
3974
        dvdnav_title_is_menu = false;
 
3975
 
 
3976
}
3863
3977
#endif
3864
3978
 
3865
3979
QString Core::pausing_prefix() {