Changeset 140 for smplayer/vendor/current/src/core.cpp
- Timestamp:
- May 23, 2013, 5:06:17 PM (13 years ago)
- File:
-
- 1 edited
-
smplayer/vendor/current/src/core.cpp (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/src/core.cpp
r137 r140 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 2Ricardo Villalba <[email protected]>2 Copyright (C) 2006-201 Ricardo Villalba <[email protected]> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 130 130 this, SLOT(displayMessage(QString)) ); 131 131 132 133 134 135 136 137 138 139 132 140 connect( proc, SIGNAL(receivedCreatingIndex(QString)), 133 141 this, SLOT(displayMessage(QString)) ); 134 142 143 144 145 135 146 connect( proc, SIGNAL(receivedConnectingToMessage(QString)), 136 147 this, SLOT(displayMessage(QString)) ); 137 148 149 150 151 138 152 connect( proc, SIGNAL(receivedResolvingMessage(QString)), 139 153 this, SLOT(displayMessage(QString)) ); 140 154 155 156 157 141 158 connect( proc, SIGNAL(receivedScreenshot(QString)), 142 159 this, SLOT(displayScreenshotName(QString)) ); … … 144 161 connect( proc, SIGNAL(receivedUpdatingFontCache()), 145 162 this, SLOT(displayUpdatingFontCache()) ); 146 163 147 164 connect( proc, SIGNAL(receivedScanningFont(QString)), 148 165 this, SLOT(displayMessage(QString)) ); 149 166 150 167 connect( proc, SIGNAL(receivedWindowResolution(int,int)), 151 168 this, SLOT(gotWindowResolution(int,int)) ); … … 252 269 connect(yt, SIGNAL(gotEmptyList()), this, SLOT(YTNoVideoUrl())); 253 270 #endif 271 272 254 273 } 255 274 … … 521 540 522 541 QFileInfo fi(sub); 523 if ((pref->fast_load_sub) && (fi.suffix().toLower() != "idx") ) {542 if ((pref->fast_load_sub) && (fi.suffix().toLower() != "idx")) { 524 543 QString sub_file = sub; 525 544 #ifdef Q_OS_WIN … … 1152 1171 qDebug("Core::stop: mset.current_sec set to 0"); 1153 1172 emit showTime( mset.current_sec ); 1154 #ifdef SEEKBAR_RESOLUTION1173 #ifdef SEEKBAR_RESOLUTION 1155 1174 emit positionChanged( 0 ); 1156 #else1175 #else 1157 1176 emit posChanged( 0 ); 1158 #endif1177 #endif 1159 1178 //updateWidgets(); 1160 1179 } … … 1162 1181 stopMplayer(); 1163 1182 emit mediaStoppedByUser(); 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1164 1193 } 1165 1194 … … 1408 1437 if (fi.exists() && fi.isExecutable() && !fi.isDir()) { 1409 1438 mplayer_bin = fi.absoluteFilePath(); 1439 1440 1441 1442 1443 1444 1445 1410 1446 } 1411 1447 … … 1707 1743 #if !defined(Q_OS_OS2) 1708 1744 if (!pref->ass_styles.fontname.isEmpty()) { 1745 1709 1746 if (!pref->mplayer_is_mplayer2) { // -fontconfig removed from mplayer2 1710 1747 proc->addArgument("-fontconfig"); 1711 1748 } 1749 1712 1750 proc->addArgument("-font"); 1713 1751 proc->addArgument( pref->ass_styles.fontname ); … … 1718 1756 proc->addArgument("-subfont-autoscale"); 1719 1757 proc->addArgument("0"); 1720 proc->addArgument("-subfont-osd-scale"); 1721 proc->addArgument(QString::number(pref->ass_styles.fontsize)); 1758 if (!pref->mplayer_is_mplayer2) { // Prevent huge OSD in mplayer2 1759 proc->addArgument("-subfont-osd-scale"); 1760 proc->addArgument(QString::number(pref->ass_styles.fontsize)); 1761 } 1722 1762 proc->addArgument("-subfont-text-scale"); // Old versions (like 1.0rc2) need this 1723 1763 proc->addArgument(QString::number(pref->ass_styles.fontsize)); … … 1728 1768 #if !defined(Q_OS_OS2) 1729 1769 if ( (pref->use_fontconfig) && (!pref->font_name.isEmpty()) ) { 1770 1730 1771 if (!pref->mplayer_is_mplayer2) { // -fontconfig removed from mplayer2 1731 1772 proc->addArgument("-fontconfig"); 1732 1773 } 1774 1733 1775 proc->addArgument("-font"); 1734 1776 proc->addArgument( pref->font_name ); … … 1736 1778 #endif 1737 1779 if ( (!pref->use_fontconfig) && (!pref->font_file.isEmpty()) ) { 1780 1781 1782 1783 1784 1738 1785 proc->addArgument("-font"); 1739 1786 proc->addArgument( pref->font_file ); … … 1838 1885 #endif 1839 1886 proc->addArgument( mset.external_subtitles ); 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1840 1901 } 1841 1902 } … … 2204 2265 // Stereo mode 2205 2266 if (mset.stereo_mode != 0) { 2206 if (mset.stereo_mode == MediaSettings::Left) 2207 af += "channels=2:2:0:1:0:0"; 2208 else 2209 af += "channels=2:2:1:0:1:1"; 2267 switch (mset.stereo_mode) { 2268 case MediaSettings::Left: af += "channels=2:2:0:1:0:0"; break; 2269 case MediaSettings::Right: af += "channels=2:2:1:0:1:1"; break; 2270 case MediaSettings::Mono: af += "pan=1:0.5:0.5"; break; 2271 case MediaSettings::Reverse: af += "channels=2:2:0:1:1:0"; break; 2272 } 2210 2273 } 2211 2274 … … 3099 3162 else 3100 3163 displayMessage( tr("Subtitles off") ); 3164 3165 3166 3167 3168 3169 3170 3171 3101 3172 } 3102 3173 … … 3680 3751 #endif 3681 3752 3753 3682 3754 void Core::changeSize(int n) { 3683 3755 if ( /*(n != pref->size_factor) &&*/ (!pref->use_mplayer_window) ) { … … 3695 3767 changeSize(200); 3696 3768 } 3769 3697 3770 3698 3771 void Core::changeZoom(double p) { … … 3946 4019 qDebug("Core::displayUpdatingFontCache"); 3947 4020 emit showMessage( tr("Updating the font cache. This may take some seconds...") ); 4021 4022 4023 4024 3948 4025 } 3949 4026
Note:
See TracChangeset
for help on using the changeset viewer.
