[vlc-devel] [PATCH 05/18] input: remove INPUT_GET_FULL_TITLE_INFO

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


This is now directly handled by the player.
---
 PLAYER_TODO.txt            |  1 -
 include/vlc_input.h        |  3 ---
 src/input/control.c        | 22 ----------------------
 src/input/input.c          | 19 +------------------
 src/input/input_internal.h |  3 ---
 5 files changed, 1 insertion(+), 47 deletions(-)

diff --git a/PLAYER_TODO.txt b/PLAYER_TODO.txt
index a3478b1fd6..cb1e32d9b2 100644
--- a/PLAYER_TODO.txt
+++ b/PLAYER_TODO.txt
@@ -1,6 +1,5 @@
  - Remove input/control.c (move remaining implementation to player.c)
  - Remove bookmark handling from input
  - Remove INPUT_GET_VOUTS/INPUT_GET_AOUT
- - Remove INPUT_GET_FULL_TITLE_INFO and priv->*title
  - http cookies jar
  - Seek callback
diff --git a/include/vlc_input.h b/include/vlc_input.h
index fa98d59d38..aa1c64b254 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -561,9 +561,6 @@ enum input_query_e
     INPUT_DEL_BOOKMARK,    /* arg1= seekpoint_t *  res=can fail   */
     INPUT_SET_BOOKMARK,    /* arg1= int  res=can fail    */
 
-    /* titles */
-    INPUT_GET_FULL_TITLE_INFO,     /* arg1=input_title_t*** arg2= int * res=can fail */
-
     /* On the fly input slave */
     INPUT_ADD_SLAVE,       /* arg1= enum slave_type, arg2= const char *,
                             * arg3= bool forced, arg4= bool notify,
diff --git a/src/input/control.c b/src/input/control.c
index 75df5a00f9..189b7270ab 100644
--- a/src/input/control.c
+++ b/src/input/control.c
@@ -204,28 +204,6 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
             vlc_mutex_unlock( &priv->p_item->lock );
             return VLC_SUCCESS;
 
-        case INPUT_GET_FULL_TITLE_INFO:
-        {
-            vlc_mutex_lock( &priv->p_item->lock );
-            unsigned count = priv->i_title;
-            input_title_t **array = vlc_alloc( count, sizeof (*array) );
-
-            if( count > 0 && unlikely(array == NULL) )
-            {
-                vlc_mutex_unlock( &priv->p_item->lock );
-                return VLC_ENOMEM;
-            }
-
-            for( unsigned i = 0; i < count; i++ )
-                array[i] = vlc_input_title_Duplicate( priv->title[i] );
-
-            vlc_mutex_unlock( &priv->p_item->lock );
-
-            *va_arg( args, input_title_t *** ) = array;
-            *va_arg( args, int * ) = count;
-            return VLC_SUCCESS;
-        }
-
         case INPUT_ADD_SLAVE:
         {
             enum slave_type type =  va_arg( args, enum slave_type );
diff --git a/src/input/input.c b/src/input/input.c
index 381b85a9fd..6759b72f73 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -324,8 +324,6 @@ static input_thread_t *Create( vlc_object_t *p_parent,
     priv->i_start = 0;
     priv->i_time  = 0;
     priv->i_stop  = 0;
-    priv->i_title = 0;
-    priv->title = NULL;
     priv->i_title_offset = input_priv(p_input)->i_seekpoint_offset = 0;
     priv->i_state = INIT_S;
     priv->is_running = false;
@@ -932,9 +930,6 @@ static void InitTitle( input_thread_t * p_input, bool had_titles )
         return;
 
     vlc_mutex_lock( &priv->p_item->lock );
-    /* Create global title (from master) */
-    priv->i_title = p_master->i_title;
-    priv->title   = p_master->title;
     priv->i_title_offset = p_master->i_title_offset;
     priv->i_seekpoint_offset = p_master->i_seekpoint_offset;
 
@@ -1499,8 +1494,6 @@ static void End( input_thread_t * p_input )
 
     /* Clean up master */
     InputSourceDestroy( priv->master );
-    priv->i_title = 0;
-    priv->title = NULL;
     priv->i_title_offset = 0;
     priv->i_seekpoint_offset = 0;
 
@@ -2490,17 +2483,7 @@ static void UpdateTitleListfromDemux( input_thread_t *p_input )
     input_source_t *in = priv->master;
 
     /* Delete the preexisting titles */
-    bool had_titles = false;
-    if( in->i_title > 0 )
-    {
-        had_titles = true;
-        for( int i = 0; i < in->i_title; i++ )
-            vlc_input_title_Delete( in->title[i] );
-        TAB_CLEAN( in->i_title, in->title );
-        priv->i_title = 0;
-        priv->title = NULL;
-        in->b_title_demux = false;
-    }
+    bool had_titles = in->i_title > 0;
 
     /* Get the new title list */
     if( demux_Control( in->p_demux, DEMUX_GET_TITLE_INFO,
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 18495881c2..cc70b44b6d 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -152,9 +152,6 @@ typedef struct input_thread_private_t
     bool            viewpoint_changed;
     vlc_renderer_item_t *p_renderer;
 
-    /* Title infos FIXME multi-input (not easy) ? */
-    int          i_title;
-    input_title_t *const *title;
 
     int i_title_offset;
     int i_seekpoint_offset;
-- 
2.20.1



More information about the vlc-devel mailing list