]> git.sesse.net Git - vlc/blobdiff - include/vlc_input.h
Added input_GetEsObjects() to cleanly retreive ES objects (decoder, vout, aout).
[vlc] / include / vlc_input.h
index 5eebb3bbd29caf09b0cdc96d70f60badc0ad7371..a0968e4852416ae9fa9b85ef004a47adc88f83dc 100644 (file)
@@ -511,6 +511,7 @@ enum input_query_e
      * XXX You must call vlc_object_release as soon as possible */
     INPUT_GET_AOUT,         /* arg1=aout_instance_t **              res=can fail */
     INPUT_GET_VOUTS,        /* arg1=vout_thread_t ***, int *        res=can fail */
+    INPUT_GET_ES_OBJECTS,   /* arg1=int id, vlc_object_t **dec, vout_thread_t **, aout_instance_t ** */
 };
 
 /** @}*/
@@ -598,6 +599,20 @@ static inline aout_instance_t *input_GetAout( input_thread_t *p_input )
      return input_Control( p_input, INPUT_GET_AOUT, &p_aout ) ? NULL : p_aout;
 }
 
+/**
+ * Returns the objects associated to an ES.
+ *
+ * You must release all non NULL object using vlc_object_release.
+ * You may set pointer of pointer to NULL to avoid retreiving it.
+ */
+static inline int input_GetEsObjects( input_thread_t *p_input, int i_id,
+                                      vlc_object_t **pp_decoder,
+                                      vout_thread_t **pp_vout, aout_instance_t **pp_aout )
+{
+    return input_Control( p_input, INPUT_GET_ES_OBJECTS, i_id,
+                          pp_decoder, pp_vout, pp_aout );
+}
+
 /* */
 typedef struct input_clock_t input_clock_t;
 VLC_EXPORT( decoder_t *, input_DecoderNew, ( input_thread_t *, es_format_t *, input_clock_t *, sout_instance_t * ) );