Ignore:
Timestamp:
Jan 24, 2017, 12:41:54 PM (8 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update trunk to version 17.1.0

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/mplayeroptions.cpp

    r181 r188  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
     2    Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    1818
    1919#include "subtracks.h"
     20#include "deviceinfo.h"
    2021#include <QDir>
    2122#include <QDebug>
     
    6465
    6566void MplayerProcess::setOption(const QString & option_name, const QVariant & value) {
     67        if (option_name == "ao") {
     68                QString ao = value.toString();
     69                if (ao.contains(":")) {
     70                        QStringList l = DeviceInfo::extractDevice(ao);
     71                        qDebug() << "MplayerProcess::setOption: ao:" << l;
     72                        if (l.count() > 1) {
     73                                #ifndef Q_OS_WIN
     74                                if (l[0] == "alsa") {
     75                                        ao = "alsa:device=hw=" + l[1];
     76                                }
     77                                else
     78                                if (l[0] == "pulse") {
     79                                        ao = "pulse::" + l[1];
     80                                }
     81                                #else
     82                                if (l[0] == "dsound") {
     83                                        ao = "dsound:device=" + l[1];
     84                                }
     85                                #endif
     86                        }
     87                }
     88                arg << "-ao" << ao + ",";
     89        }
     90        else
    6691        if (option_name == "cache") {
    6792                int cache = value.toInt();
     
    284309
    285310void MplayerProcess::showFilenameOnOSD() {
    286         writeToStdin("osd_show_property_text \"${filename}\" 2000 0");
     311        QString s = "${filename}";
     312
     313        if (!osd_media_info.isEmpty()) s = osd_media_info;
     314
     315        writeToStdin("osd_show_property_text \"" + s + "\" 2000 0");
    287316}
    288317
Note: See TracChangeset for help on using the changeset viewer.