]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/input_manager.hpp
Qt: Create a getVout() in MIM to remove some vlc_object_find( p_intf, VLC_OBJECT_VOUT...
[vlc] / modules / gui / qt4 / input_manager.hpp
index 777da8fa9d7bf3460122eee4b1aa8fc7d8f5053b..a55c3fd149074a64edb1ff2f72273194d153a2ca 100644 (file)
@@ -30,6 +30,7 @@
 #endif
 
 #include <vlc_input.h>
+#include <vlc_vout.h>
 
 #include "qt4.hpp"
 
@@ -206,6 +207,18 @@ public:
 
     input_thread_t *getInput() { return p_input; };
     InputManager *getIM() { return im; };
+    vout_thread_t * getVout()
+    {
+        vout_thread_t **pp_vout; int i_vout;
+        if( !input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
+        {
+            for( int i = 1; i < i_vout; i++ ) vlc_object_release( pp_vout[i]);
+            vout_thread_t *p_tmp = pp_vout[0];
+            free( pp_vout );
+            return p_tmp;
+        }
+        return NULL;
+    }
 
 private:
     MainInputManager( intf_thread_t * );