[vlc-devel] [PATCH 12/18] input: remove INPUT_GET_*OUT*

Thomas Guillem thomas at gllm.fr
Fri May 10 16:03:16 CEST 2019


This is now directly handled by the player.
---
 include/vlc_input.h | 40 ----------------------------------------
 src/input/control.c | 22 ----------------------
 2 files changed, 62 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 91594dfd0f..1c97817714 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -556,11 +556,6 @@ enum input_query_e
     INPUT_UPDATE_VIEWPOINT, /* arg1=(const vlc_viewpoint_t*), arg2=bool b_absolute */
     INPUT_SET_INITIAL_VIEWPOINT, /* arg1=(const vlc_viewpoint_t*) */
 
-    /* Input ressources
-     * XXX You must release as soon as possible */
-    INPUT_GET_AOUT,         /* arg1=audio_output_t **              res=can fail */
-    INPUT_GET_VOUTS,        /* arg1=vout_thread_t ***, size_t *        res=can fail */
-
     /* External clock managments */
     INPUT_GET_PCR_SYSTEM,   /* arg1=vlc_tick_t *, arg2=vlc_tick_t *       res=can fail */
     INPUT_MODIFY_PCR_SYSTEM,/* arg1=int absolute, arg2=vlc_tick_t   res=can fail */
@@ -625,29 +620,6 @@ VLC_API void input_SetPosition( input_thread_t *, float f_position, bool b_fast
  */
 VLC_API input_item_t* input_GetItem( input_thread_t * ) VLC_USED;
 
-/**
- * Return one of the video output (if any). If possible, you should use
- * INPUT_GET_VOUTS directly and process _all_ video outputs instead.
- * @param p_input an input thread from which to get a video output
- * @return NULL on error, or a video output thread pointer (which needs to be
- * released with vout_Release()).
- */
-static inline vout_thread_t *input_GetVout( input_thread_t *p_input )
-{
-     vout_thread_t **pp_vout, *p_vout;
-     size_t i_vout;
-
-     if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
-         return NULL;
-
-     for( size_t i = 1; i < i_vout; i++ )
-         vout_Release(pp_vout[i]);
-
-     p_vout = (i_vout >= 1) ? pp_vout[0] : NULL;
-     free( pp_vout );
-     return p_vout;
-}
-
 /**
  * Update the viewpoint of the input thread. The viewpoint will be applied to
  * all vouts and aouts.
@@ -666,18 +638,6 @@ static inline int input_UpdateViewpoint( input_thread_t *p_input,
                           b_absolute );
 }
 
-/**
- * Return the audio output (if any) associated with an input.
- * @param p_input an input thread
- * @return NULL on error, or the audio output (which needs to be
- * released with aout_Release()).
- */
-static inline audio_output_t *input_GetAout( input_thread_t *p_input )
-{
-     audio_output_t *p_aout;
-     return input_Control( p_input, INPUT_GET_AOUT, &p_aout ) ? NULL : p_aout;
-}
-
 /**
  * \see input_clock_GetSystemOrigin
  */
diff --git a/src/input/control.c b/src/input/control.c
index 368886b50a..2a1d91bc4e 100644
--- a/src/input/control.c
+++ b/src/input/control.c
@@ -96,28 +96,6 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
             return VLC_SUCCESS;
         }
 
-        case INPUT_GET_AOUT:
-        {
-            audio_output_t *p_aout = input_resource_HoldAout( priv->p_resource );
-            if( !p_aout )
-                return VLC_EGENERIC;
-
-            audio_output_t **pp_aout = va_arg( args, audio_output_t** );
-            *pp_aout = p_aout;
-            return VLC_SUCCESS;
-        }
-
-        case INPUT_GET_VOUTS:
-        {
-            vout_thread_t ***ppp_vout = va_arg( args, vout_thread_t*** );
-            size_t *pi_vout = va_arg( args, size_t * );
-
-            input_resource_HoldVouts( priv->p_resource, ppp_vout, pi_vout );
-            if( *pi_vout == 0 )
-                return VLC_EGENERIC;
-            return VLC_SUCCESS;
-        }
-
         case INPUT_GET_PCR_SYSTEM:
         {
             vlc_tick_t *pi_system = va_arg( args, vlc_tick_t * );
-- 
2.20.1



More information about the vlc-devel mailing list