Changeset 181 for smplayer/trunk/src/mpvoptions.cpp
- Timestamp:
- Aug 31, 2016, 5:31:04 PM (9 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 179
- Property svn:mergeinfo changed
-
smplayer/trunk/src/mpvoptions.cpp
r176 r181 48 48 49 49 "INFO_DEMUXER=${=demuxer}\n" 50 "INFO_SEEKABLE=${=seekable}\n" 50 51 "INFO_TITLES=${=disc-titles}\n" 51 52 "INFO_CHAPTERS=${=chapters}\n" … … 150 151 } 151 152 else 153 if (option_name == "cache_auto") { 154 arg << "--cache=auto"; 155 } 156 else 152 157 if (option_name == "ss") { 153 158 arg << "--start=" + value.toString(); … … 243 248 else 244 249 if (option_name == "softvol") { 245 arg << "--softvol=yes"; 246 } 247 else 248 if (option_name == "softvol-max") { 249 int v = value.toInt(); 250 if (v < 100) v = 100; 251 arg << "--softvol-max=" + QString::number(v); 250 if (value.toString() == "off") { 251 if (isOptionAvailable("--volume-max")) { 252 arg << "--volume-max=100"; 253 } 254 } else { 255 int v = value.toInt(); 256 if (v < 100) v = 100; 257 if (isOptionAvailable("--volume-max")) { 258 arg << "--volume-max=" + QString::number(v); 259 } else { 260 arg << "--softvol=yes"; 261 arg << "--softvol-max=" + QString::number(v); 262 } 263 } 252 264 } 253 265 else … … 338 350 if (option_name == "mute") { 339 351 arg << "--mute=yes"; 352 } 353 else 354 if (option_name == "scaletempo") { 355 if (isOptionAvailable("--audio-pitch-correction")) { 356 bool enabled = value.toBool(); 357 if (enabled) arg << "--audio-pitch-correction=yes"; else arg << "--audio-pitch-correction=no"; 358 } 340 359 } 341 360 else … … 367 386 option_name == "dvd-device" || option_name == "cdrom-device" || 368 387 option_name == "demuxer" || 369 option_name == "frames") 388 option_name == "frames" || 389 option_name == "ab-loop-a" || option_name == "ab-loop-b") 370 390 { 371 391 QString s = "--" + option_name; … … 713 733 } 714 734 writeToStdin(QString("set loop %1").arg(o)); 735 } 736 737 void MPVProcess::setAMarker(int sec) { 738 writeToStdin(QString("set ab-loop-a %1").arg(sec)); 739 } 740 741 void MPVProcess::setBMarker(int sec) { 742 writeToStdin(QString("set ab-loop-b %1").arg(sec)); 743 } 744 745 void MPVProcess::clearABMarkers() { 746 writeToStdin("set ab-loop-a no"); 747 writeToStdin("set ab-loop-b no"); 715 748 } 716 749 … … 910 943 } 911 944 945 if (isOptionAvailable("--sub-text-italic")) { 946 arg << QString("--sub-text-italic=%1").arg(styles.italic ? "yes" : "no"); 947 } 948 912 949 QString halign; 913 950 switch (styles.halignment) {
Note:
See TracChangeset
for help on using the changeset viewer.