[vlc-devel] [PATCH 2/3] qt: expose audio devices model in player_controller
Sagar Kohli
kohli.sagar2 at gmail.com
Wed Jul 17 00:12:44 CEST 2019
---
modules/gui/qt/components/player_controller.cpp | 2 ++
modules/gui/qt/components/player_controller.hpp | 3 +++
modules/gui/qt/components/player_controller_p.hpp | 1 +
3 files changed, 6 insertions(+)
diff --git a/modules/gui/qt/components/player_controller.cpp b/modules/gui/qt/components/player_controller.cpp
index ef8a809f4c..9e9060d4f5 100644
--- a/modules/gui/qt/components/player_controller.cpp
+++ b/modules/gui/qt/components/player_controller.cpp
@@ -913,6 +913,7 @@ PlayerControllerPrivate::PlayerControllerPrivate(PlayerController *playercontrol
, m_titleList(m_player)
, m_chapterList(m_player)
, m_programList(m_player)
+ , m_audioDeviceList(m_player)
, m_zoom((vout_thread_t*)nullptr, "zoom")
, m_aspectRatio((vout_thread_t*)nullptr, "aspect-ratio")
, m_crop((vout_thread_t*)nullptr, "crop")
@@ -1523,6 +1524,7 @@ QABSTRACTLIST_GETTER( TrackListModel, getAudioTracks, m_audioTracks)
QABSTRACTLIST_GETTER( TrackListModel, getSubtitleTracks, m_subtitleTracks)
QABSTRACTLIST_GETTER( TitleListModel, getTitles, m_titleList)
QABSTRACTLIST_GETTER( ChapterListModel,getChapters, m_chapterList)
+QABSTRACTLIST_GETTER( AudioDeviceModel, getAudioDevices, m_audioDeviceList)
QABSTRACTLIST_GETTER( ProgramListModel, getPrograms, m_programList)
QABSTRACTLIST_GETTER( VLCVarChoiceModel, getZoom, m_zoom)
QABSTRACTLIST_GETTER( VLCVarChoiceModel, getAspectRatio, m_aspectRatio)
diff --git a/modules/gui/qt/components/player_controller.hpp b/modules/gui/qt/components/player_controller.hpp
index 1064a581b2..f1e17827df 100644
--- a/modules/gui/qt/components/player_controller.hpp
+++ b/modules/gui/qt/components/player_controller.hpp
@@ -30,6 +30,7 @@
#include <QScopedPointer>
#include <vlc_cxx_helpers.hpp>
#include "util/input_models.hpp"
+#include "components/audio_device_model.hpp"
#include "adapters/var_choice_model.hpp"
#include "util/vlctick.hpp"
@@ -167,6 +168,7 @@ public:
//aout properties
Q_PROPERTY(float volume READ getVolume WRITE setVolume NOTIFY volumeChanged)
Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY soundMuteChanged)
+ Q_PROPERTY(AudioDeviceModel* audioDevices READ getAudioDevices CONSTANT)
Q_PROPERTY(VLCVarChoiceModel* audioStereoMode READ getAudioStereoMode CONSTANT)
Q_PROPERTY(VLCVarChoiceModel* audioVisualization READ getAudioVisualizations CONSTANT)
Q_PROPERTY(bool hasAudioVisualization READ hasAudioVisualization NOTIFY hasAudioVisualizationChanged)
@@ -321,6 +323,7 @@ public slots:
void setVolume( float volume );
bool isMuted() const;
void setMuted( bool muted );
+ AudioDeviceModel* getAudioDevices();
VLCVarChoiceModel* getAudioStereoMode();
VLCVarChoiceModel* getAudioVisualizations();
bool hasAudioVisualization() const;
diff --git a/modules/gui/qt/components/player_controller_p.hpp b/modules/gui/qt/components/player_controller_p.hpp
index e524bef5bd..40103c9f32 100644
--- a/modules/gui/qt/components/player_controller_p.hpp
+++ b/modules/gui/qt/components/player_controller_p.hpp
@@ -131,6 +131,7 @@ public:
VLCVarChoiceModel m_audioStereoMode;
float m_volume = 0.f;
bool m_muted = false;
+ AudioDeviceModel m_audioDeviceList;
VLCVarChoiceModel m_audioVisualization;
//misc
--
2.17.1
More information about the vlc-devel
mailing list