diff options
author | Mateusz Łukasik <mati75@linuxmint.pl> | 2017-02-03 08:16:09 +0100 |
---|---|---|
committer | Mateusz Łukasik <mati75@linuxmint.pl> | 2017-02-03 08:16:09 +0100 |
commit | bcae744b1bae2f5015cb3efdd0d2226150cd79e5 (patch) | |
tree | 872701745b36fbfbeb16dd1d59d485bc1e494dbd /src/deviceinfo.h | |
parent | 634cd2063f449c5d38046de88a395af77e2c9ea5 (diff) |
New upstream version 17.2.0~ds0
Diffstat (limited to 'src/deviceinfo.h')
-rw-r--r-- | src/deviceinfo.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/deviceinfo.h b/src/deviceinfo.h index b04b337..d3e422d 100644 --- a/src/deviceinfo.h +++ b/src/deviceinfo.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,12 +25,18 @@ #ifdef Q_OS_WIN #define USE_DSOUND_DEVICES 1 +#define USE_MPV_WASAPI_DEVICES 1 #else #define USE_ALSA_DEVICES 0 +#define USE_MPV_ALSA_DEVICES 0 #define USE_PULSEAUDIO_DEVICES 1 #define USE_XV_ADAPTORS 1 #endif +#if defined(USE_MPV_ALSA_DEVICES) || defined(USE_MPV_WASAPI_DEVICES) +#define MPV_AUDIO_DEVICES 1 +#endif + #ifndef Q_OS_WIN #define CACHE_DEVICE_INFO #endif @@ -77,6 +83,28 @@ public: #endif #endif +#if MPV_AUDIO_DEVICES + static void setMpvBin(const QString & bin) { mpv_bin = bin; }; + + #if USE_MPV_ALSA_DEVICES + static DeviceList mpvAlsaDevices(); + #endif + + #if USE_MPV_WASAPI_DEVICES + static DeviceList mpvWasapiDevices(); + #endif + + static DeviceList mpvAudioDevices(const QString & mpv_bin, const QString & filter); + static DeviceList mpvAudioDevices(const QString & filter); +#endif + + static QString printableName(const QString & driver_name, const DeviceData & device); + static QString internalName(const QString & driver_name, const DeviceData & device); + + static QString printableName(const QString & driver_name, const QString & id, const QString & desc); + static QString internalName(const QString & driver_name, const QString & id, const QString & desc); + static QStringList extractDevice(const QString & internal_name); + protected: #ifdef CACHE_DEVICE_INFO static void saveList(QSettings * set, const QString & section_name, const DeviceList & list); @@ -88,6 +116,10 @@ protected: static DeviceList retrieveDevices(DeviceType type); #endif + +#if MPV_AUDIO_DEVICES + static QString mpv_bin; +#endif }; #endif |