]> git.sesse.net Git - vlc/blobdiff - src/input/control.c
Allows requesting active aout/vout from an input with associated events.
[vlc] / src / input / control.c
index a5a1b9f6cf44a09f0830f0b7beac0858e1fb162c..a17a47092f8fa0413437dcd10539fb476decff5e 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "input_internal.h"
 #include "event.h"
+#include "ressource.h"
 
 
 static void UpdateBookmarksOption( input_thread_t * );
@@ -412,6 +413,28 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
             input_ControlPush( p_input, INPUT_CONTROL_RESTART_ES, &val );
             return VLC_SUCCESS;
 
+        case INPUT_GET_AOUT:
+        {
+            aout_instance_t *p_aout = input_ressource_HoldAout( p_input->p->p_ressource );
+            if( !p_aout )
+                return VLC_EGENERIC;
+
+            aout_instance_t **pp_aout = (aout_instance_t**)va_arg( args, aout_instance_t** );
+            *pp_aout = p_aout;
+            return VLC_SUCCESS;
+        }
+
+        case INPUT_GET_VOUTS:
+        {
+            vout_thread_t ***ppp_vout = (vout_thread_t***)va_arg( args, vout_thread_t*** );
+            int           *pi_vout = (int*)va_arg( args, int* );
+
+            input_ressource_HoldVouts( p_input->p->p_ressource, ppp_vout, pi_vout );
+            if( *pi_vout <= 0 )
+                return VLC_EGENERIC;
+            return VLC_SUCCESS;
+        }
+
         default:
             msg_Err( p_input, "unknown query in input_vaControl" );
             return VLC_EGENERIC;