Ignore:
Timestamp:
Aug 31, 2016, 5:31:04 PM (9 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update trunk to version 16.8.0

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/mpvoptions.cpp

    r176 r181  
    4848
    4949                        "INFO_DEMUXER=${=demuxer}\n"
     50                        "INFO_SEEKABLE=${=seekable}\n"
    5051                        "INFO_TITLES=${=disc-titles}\n"
    5152                        "INFO_CHAPTERS=${=chapters}\n"
     
    150151        }
    151152        else
     153        if (option_name == "cache_auto") {
     154                arg << "--cache=auto";
     155        }
     156        else
    152157        if (option_name == "ss") {
    153158                arg << "--start=" + value.toString();
     
    243248        else
    244249        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                }
    252264        }
    253265        else
     
    338350        if (option_name == "mute") {
    339351                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                }
    340359        }
    341360        else
     
    367386            option_name == "dvd-device" || option_name == "cdrom-device" ||
    368387            option_name == "demuxer" ||
    369             option_name == "frames")
     388            option_name == "frames" ||
     389            option_name == "ab-loop-a" || option_name == "ab-loop-b")
    370390        {
    371391                QString s = "--" + option_name;
     
    713733        }
    714734        writeToStdin(QString("set loop %1").arg(o));
     735}
     736
     737void MPVProcess::setAMarker(int sec) {
     738        writeToStdin(QString("set ab-loop-a %1").arg(sec));
     739}
     740
     741void MPVProcess::setBMarker(int sec) {
     742        writeToStdin(QString("set ab-loop-b %1").arg(sec));
     743}
     744
     745void MPVProcess::clearABMarkers() {
     746        writeToStdin("set ab-loop-a no");
     747        writeToStdin("set ab-loop-b no");
    715748}
    716749
     
    910943        }
    911944
     945        if (isOptionAvailable("--sub-text-italic")) {
     946                arg << QString("--sub-text-italic=%1").arg(styles.italic ? "yes" : "no");
     947        }
     948
    912949        QString halign;
    913950        switch (styles.halignment) {
Note: See TracChangeset for help on using the changeset viewer.