Changeset 188 for smplayer/trunk/src/mplayeroptions.cpp
- Timestamp:
- Jan 24, 2017, 12:41:54 PM (8 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 186
- Property svn:mergeinfo changed
-
smplayer/trunk/src/mplayeroptions.cpp
r181 r188 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 6Ricardo Villalba <rvm@users.sourceforge.net>2 Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 18 18 19 19 #include "subtracks.h" 20 #include "deviceinfo.h" 20 21 #include <QDir> 21 22 #include <QDebug> … … 64 65 65 66 void 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 66 91 if (option_name == "cache") { 67 92 int cache = value.toInt(); … … 284 309 285 310 void 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"); 287 316 } 288 317
Note:
See TracChangeset
for help on using the changeset viewer.