[vlc-commits] qt: add MainInputManager::getVouts

Thomas Guillem git at videolan.org
Wed May 31 17:45:26 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue May 30 17:10:31 2017 +0200| [6fc30a4c197abfbb31fcf46d26543453e9b73390] | committer: Thomas Guillem

qt: add MainInputManager::getVouts

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6fc30a4c197abfbb31fcf46d26543453e9b73390
---

 modules/gui/qt/input_manager.cpp | 22 ++++++++++++++++++++++
 modules/gui/qt/input_manager.hpp |  1 +
 2 files changed, 23 insertions(+)

diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp
index d5285cf6a0..cf9a0b2512 100644
--- a/modules/gui/qt/input_manager.cpp
+++ b/modules/gui/qt/input_manager.cpp
@@ -1034,6 +1034,28 @@ vout_thread_t* MainInputManager::getVout()
     return p_input ? input_GetVout( p_input ) : NULL;
 }
 
+QVector<vout_thread_t*> MainInputManager::getVouts() const
+{
+    vout_thread_t **pp_vout;
+    size_t i_vout;
+
+    if( p_input == NULL
+     || input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) != VLC_SUCCESS
+     || i_vout == 0 )
+        return QVector<vout_thread_t*>();
+
+    QVector<vout_thread_t*> vector = QVector<vout_thread_t*>();
+    vector.reserve( i_vout );
+    for( size_t i = 0; i < i_vout; i++ )
+    {
+        assert( pp_vout[i] );
+        vector.append( pp_vout[i] );
+    }
+    free( pp_vout );
+
+    return vector;
+}
+
 audio_output_t * MainInputManager::getAout()
 {
     return playlist_GetAout( THEPL );
diff --git a/modules/gui/qt/input_manager.hpp b/modules/gui/qt/input_manager.hpp
index 1c87f8b5d6..2e2116b82b 100644
--- a/modules/gui/qt/input_manager.hpp
+++ b/modules/gui/qt/input_manager.hpp
@@ -270,6 +270,7 @@ public:
     }
 
     vout_thread_t* getVout();
+    QVector<vout_thread_t*> getVouts() const;
     audio_output_t *getAout();
 
     bool getPlayExitState();



More information about the vlc-commits mailing list