[vlc-devel] [PATCH 19/20] input: hide input_thread_t

Thomas Guillem thomas at gllm.fr
Fri May 31 15:59:45 CEST 2019


---
 include/vlc_input.h        | 349 ------------------------------------
 include/vlc_objects.h      |   8 -
 src/input/demux.c          |   2 +-
 src/input/input_internal.h | 350 +++++++++++++++++++++++++++++++++++++
 src/input/thumbnailer.c    |   2 +-
 src/libvlccore.sym         |  12 --
 src/text/strings.c         |   2 +-
 7 files changed, 353 insertions(+), 372 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index de1135dfb4..7d24f11830 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -211,78 +211,6 @@ static inline input_attachment_t *vlc_input_attachment_Duplicate( const input_at
                                      a->p_data, a->i_data );
 }
 
-/*****************************************************************************
- * input defines/constants.
- *****************************************************************************/
-
-/**
- * Main structure representing an input thread. This structure is mostly
- * private. The only public fields are read-only and constant.
- */
-struct input_thread_t
-{
-    struct vlc_object_t obj;
-};
-
-/*****************************************************************************
- * Input events and variables
- *****************************************************************************/
-
-/**
- * \defgroup inputvariable Input variables
- *
- * The input provides multiples variable you can write to and/or read from.
- *
- * TODO complete the documentation.
- * The read only variables are:
- *  - "length"
- *  - "can-seek" (if you can seek, it doesn't say if 'bar display' has be shown
- *    or not, for that check position != 0.0)
- *  - "can-pause"
- *  - "can-rate"
- *  - "can-rewind"
- *  - "can-record" (if a stream can be recorded while playing)
- *  - "teletext-es" (list of id from the spu tracks (spu-es) that are teletext, the
- *                   variable value being the one currently selected, -1 if no teletext)
- *  - "signal-quality"
- *  - "signal-strength"
- *  - "program-scrambled" (if the current program is scrambled)
- *  - "cache" (level of data cached [0 .. 1])
- *
- * The read-write variables are:
- *  - state (\see input_state_e)
- *  - rate
- *  - position
- *  - time, time-offset
- *  - title, next-title, prev-title
- *  - chapter, next-chapter, next-chapter-prev
- *  - program, audio-es, video-es, spu-es
- *  - audio-delay, spu-delay
- *  - bookmark (bookmark list)
- *  - record
- *  - frame-next
- *  - navigation (list of "title %2i")
- *  - "title %2i"
- *
- * The variable used for event is
- *  - intf-event (\see input_event_type_e)
- */
-
-/**
- * Input state
- *
- * This enum is used by the variable "state"
- */
-typedef enum input_state_e
-{
-    INIT_S = 0,
-    OPENING_S,
-    PLAYING_S,
-    PAUSE_S,
-    END_S,
-    ERROR_S,
-} input_state_e;
-
 /**
  * Input rate.
  *
@@ -301,282 +229,5 @@ typedef enum input_state_e
  */
 #define INPUT_RATE_MAX 31.25f
 
-/**
- * Input events
- *
- * You can catch input event by adding a callback on the variable "intf-event".
- * This variable is an integer that will hold a input_event_type_e value.
- */
-typedef enum input_event_type_e
-{
-    /* "state" has changed */
-    INPUT_EVENT_STATE,
-    /* b_dead is true */
-    INPUT_EVENT_DEAD,
-
-    /* "rate" has changed */
-    INPUT_EVENT_RATE,
-
-    /* "capabilities" has changed */
-    INPUT_EVENT_CAPABILITIES,
-
-    /* At least one of "position" or "time" */
-    INPUT_EVENT_POSITION,
-
-    /* "length" has changed */
-    INPUT_EVENT_LENGTH,
-
-    /* A title has been added or removed or selected.
-     * It implies that the chapter has changed (no chapter event is sent) */
-    INPUT_EVENT_TITLE,
-    /* A chapter has been added or removed or selected. */
-    INPUT_EVENT_CHAPTER,
-
-    /* A program ("program") has been added or removed or selected,
-     * or "program-scrambled" has changed.*/
-    INPUT_EVENT_PROGRAM,
-    /* A ES has been added or removed or selected */
-    INPUT_EVENT_ES,
-
-    /* "record" has changed */
-    INPUT_EVENT_RECORD,
-
-    /* input_item_t media has changed */
-    INPUT_EVENT_ITEM_META,
-    /* input_item_t info has changed */
-    INPUT_EVENT_ITEM_INFO,
-    /* input_item_t epg has changed */
-    INPUT_EVENT_ITEM_EPG,
-
-    /* Input statistics have been updated */
-    INPUT_EVENT_STATISTICS,
-    /* At least one of "signal-quality" or "signal-strength" has changed */
-    INPUT_EVENT_SIGNAL,
-
-    /* "audio-delay" has changed */
-    INPUT_EVENT_AUDIO_DELAY,
-    /* "spu-delay" has changed */
-    INPUT_EVENT_SUBTITLE_DELAY,
-
-    /* "bookmark" has changed */
-    INPUT_EVENT_BOOKMARK,
-
-    /* cache" has changed */
-    INPUT_EVENT_CACHE,
-
-    /* A vout_thread_t object has been created/deleted by *the input* */
-    INPUT_EVENT_VOUT,
-
-    /* (pre-)parsing events */
-    INPUT_EVENT_SUBITEMS,
-
-    /* vbi_page has changed */
-    INPUT_EVENT_VBI_PAGE,
-    /* vbi_transparent has changed */
-    INPUT_EVENT_VBI_TRANSPARENCY,
-
-    /* subs_fps has changed */
-    INPUT_EVENT_SUBS_FPS,
-
-    /* Thumbnail generation */
-    INPUT_EVENT_THUMBNAIL_READY,
-} input_event_type_e;
-
-#define VLC_INPUT_CAPABILITIES_SEEKABLE (1<<0)
-#define VLC_INPUT_CAPABILITIES_PAUSEABLE (1<<1)
-#define VLC_INPUT_CAPABILITIES_CHANGE_RATE (1<<2)
-#define VLC_INPUT_CAPABILITIES_REWINDABLE (1<<3)
-#define VLC_INPUT_CAPABILITIES_RECORDABLE (1<<4)
-
-struct vlc_input_event_position
-{
-    float percentage;
-    vlc_tick_t ms;
-};
-
-struct vlc_input_event_title
-{
-    enum {
-        VLC_INPUT_TITLE_NEW_LIST,
-        VLC_INPUT_TITLE_SELECTED,
-    } action;
-    union
-    {
-        struct
-        {
-            input_title_t *const *array;
-            size_t count;
-        } list;
-        size_t selected_idx;
-    };
-};
-
-struct vlc_input_event_chapter
-{
-    int title;
-    int seekpoint;
-};
-
-struct vlc_input_event_program {
-    enum {
-        VLC_INPUT_PROGRAM_ADDED,
-        VLC_INPUT_PROGRAM_DELETED,
-        VLC_INPUT_PROGRAM_UPDATED,
-        VLC_INPUT_PROGRAM_SELECTED,
-        VLC_INPUT_PROGRAM_SCRAMBLED,
-    } action;
-    int id;
-    union {
-        const char *title;
-        bool scrambled;
-    };
-};
-
-struct vlc_input_event_es {
-    enum {
-        VLC_INPUT_ES_ADDED,
-        VLC_INPUT_ES_DELETED,
-        VLC_INPUT_ES_UPDATED,
-        VLC_INPUT_ES_SELECTED,
-        VLC_INPUT_ES_UNSELECTED,
-    } action;
-    /**
-     * ES track id: only valid from the event callback, unless the id is held
-     * by the user with vlc_es_Hold(). */
-    vlc_es_id_t *id;
-    /**
-     * Title of ES track, can be updated after the VLC_INPUT_ES_UPDATED event.
-     */
-    const char *title;
-    /**
-     * ES track information, can be updated after the VLC_INPUT_ES_UPDATED event.
-     */
-    const es_format_t *fmt;
-};
-
-struct vlc_input_event_signal {
-    float quality;
-    float strength;
-};
-
-struct vlc_input_event_vout
-{
-    enum {
-        VLC_INPUT_EVENT_VOUT_ADDED,
-        VLC_INPUT_EVENT_VOUT_DELETED,
-    } action;
-    vout_thread_t *vout;
-    vlc_es_id_t *id;
-};
-
-struct vlc_input_event
-{
-    input_event_type_e type;
-
-    union {
-        /* INPUT_EVENT_STATE */
-        input_state_e state;
-        /* INPUT_EVENT_RATE */
-        float rate;
-        /* INPUT_EVENT_CAPABILITIES */
-        int capabilities; /**< cf. VLC_INPUT_CAPABILITIES_* bitwise flags */
-        /* INPUT_EVENT_POSITION */
-        struct vlc_input_event_position position;
-        /* INPUT_EVENT_LENGTH */
-        vlc_tick_t length;
-        /* INPUT_EVENT_TITLE */
-        struct vlc_input_event_title title;
-        /* INPUT_EVENT_CHAPTER */
-        struct vlc_input_event_chapter chapter;
-        /* INPUT_EVENT_PROGRAM */
-        struct vlc_input_event_program program;
-        /* INPUT_EVENT_ES */
-        struct vlc_input_event_es es;
-        /* INPUT_EVENT_RECORD */
-        bool record;
-        /* INPUT_EVENT_STATISTICS */
-        const struct input_stats_t *stats;
-        /* INPUT_EVENT_SIGNAL */
-        struct vlc_input_event_signal signal;
-        /* INPUT_EVENT_AUDIO_DELAY */
-        vlc_tick_t audio_delay;
-        /* INPUT_EVENT_SUBTITLE_DELAY */
-        vlc_tick_t subtitle_delay;
-        /* INPUT_EVENT_CACHE */
-        float cache;
-        /* INPUT_EVENT_VOUT */
-        struct vlc_input_event_vout vout;
-        /* INPUT_EVENT_SUBITEMS */
-        input_item_node_t *subitems;
-        /* INPUT_EVENT_VBI_PAGE */
-        unsigned vbi_page;
-        /* INPUT_EVENT_VBI_TRANSPARENCY */
-        bool vbi_transparent;
-        /* INPUT_EVENT_SUBS_FPS */
-        float subs_fps;
-        /* INPUT_EVENT_THUMBNAIL_READY */
-        picture_t *thumbnail;
-    };
-};
-
-typedef void (*input_thread_events_cb)( input_thread_t *input,
-                                        const struct vlc_input_event *event,
-                                        void *userdata);
-
-/** @}*/
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-VLC_API input_thread_t * input_Create( vlc_object_t *p_parent,
-                                       input_thread_events_cb event_cb, void *events_data,
-                                       input_item_t *, input_resource_t *,
-                                       vlc_renderer_item_t* p_renderer ) VLC_USED;
-#define input_Create(a,b,c,d,e,f) input_Create(VLC_OBJECT(a),b,c,d,e,f)
-
-
-/**
- * Creates an item preparser.
- *
- * Creates an input thread to preparse an item. The input needs to be started
- * with input_Start() afterwards.
- *
- * @param obj parent object
- * @param item input item to preparse
- * @return an input thread or NULL on error
- */
-VLC_API input_thread_t *input_CreatePreparser(vlc_object_t *obj,
-                                              input_thread_events_cb events_cb,
-                                              void *events_data, input_item_t *item)
-VLC_USED;
-
-VLC_API
-input_thread_t *input_CreateThumbnailer(vlc_object_t *obj,
-                                        input_thread_events_cb events_cb,
-                                        void *events_data, input_item_t *item)
-VLC_USED;
-
-VLC_API int input_Start( input_thread_t * );
-
-VLC_API void input_Stop( input_thread_t * );
-
-VLC_API int input_Read( vlc_object_t *, input_item_t *,
-                        input_thread_events_cb, void * );
-#define input_Read(a,b,c,d) input_Read(VLC_OBJECT(a),b,c,d)
-
-VLC_API void input_Close( input_thread_t * );
-
-VLC_API void input_SetTime( input_thread_t *, vlc_tick_t i_time, bool b_fast );
-
-VLC_API void input_SetPosition( input_thread_t *, float f_position, bool b_fast );
-
-/**
- * Get the input item for an input thread
- *
- * You have to keep a reference to the input or to the input_item_t until
- * you do not need it anymore.
- */
-VLC_API input_item_t* input_GetItem( input_thread_t * ) VLC_USED;
-
 /** @} */
 #endif
diff --git a/include/vlc_objects.h b/include/vlc_objects.h
index cc5eea64eb..3611da54ff 100644
--- a/include/vlc_objects.h
+++ b/include/vlc_objects.h
@@ -193,10 +193,6 @@ static inline libvlc_int_t *vlc_object_instance(vlc_object_t *obj)
 }
 #define vlc_object_instance(o) vlc_object_instance(VLC_OBJECT(o))
 
-/* Here for backward compatibility. TODO: Move to <vlc_input.h>! */
-VLC_API input_thread_t *input_Hold(input_thread_t *input);
-VLC_API void input_Release(input_thread_t *input);
-
 /* Here for backward compatibility. TODO: Move to <vlc_vout.h>! */
 VLC_API vout_thread_t *vout_Hold(vout_thread_t *vout);
 VLC_API void vout_Release(vout_thread_t *vout);
@@ -210,8 +206,6 @@ VLC_DEPRECATED static inline void *vlc_object_hold(vlc_object_t *o)
 {
     const char *tn = vlc_object_typename(o);
 
-    if (!strcmp(tn, "input"))
-        input_Hold((input_thread_t *)o);
     if (!strcmp(tn, "audio output"))
         aout_Hold((audio_output_t *)o);
     if (!strcmp(tn, "video output"))
@@ -223,8 +217,6 @@ static inline void vlc_object_release(vlc_object_t *o)
 {
     const char *tn = vlc_object_typename(o);
 
-    if (!strcmp(tn, "input"))
-        input_Release((input_thread_t *)o);
     if (!strcmp(tn, "audio output"))
         aout_Release((audio_output_t *)o);
     if (!strcmp(tn, "video output"))
diff --git a/src/input/demux.c b/src/input/demux.c
index d7b5ce3711..22952ae800 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -31,10 +31,10 @@
 #include <libvlc.h>
 #include <vlc_codec.h>
 #include <vlc_meta.h>
-#include <vlc_input.h>
 #include <vlc_url.h>
 #include <vlc_modules.h>
 #include <vlc_strings.h>
+#include "input_internal.h"
 
 typedef const struct
 {
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index cdf70b7d04..cfdc924319 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -36,6 +36,356 @@
 
 struct input_stats;
 
+/*****************************************************************************
+ * input defines/constants.
+ *****************************************************************************/
+
+/**
+ * Main structure representing an input thread. This structure is mostly
+ * private. The only public fields are read-only and constant.
+ */
+struct input_thread_t
+{
+    struct vlc_object_t obj;
+};
+
+/*****************************************************************************
+ * Input events and variables
+ *****************************************************************************/
+
+/**
+ * \defgroup inputvariable Input variables
+ *
+ * The input provides multiples variable you can write to and/or read from.
+ *
+ * TODO complete the documentation.
+ * The read only variables are:
+ *  - "length"
+ *  - "can-seek" (if you can seek, it doesn't say if 'bar display' has be shown
+ *    or not, for that check position != 0.0)
+ *  - "can-pause"
+ *  - "can-rate"
+ *  - "can-rewind"
+ *  - "can-record" (if a stream can be recorded while playing)
+ *  - "teletext-es" (list of id from the spu tracks (spu-es) that are teletext, the
+ *                   variable value being the one currently selected, -1 if no teletext)
+ *  - "signal-quality"
+ *  - "signal-strength"
+ *  - "program-scrambled" (if the current program is scrambled)
+ *  - "cache" (level of data cached [0 .. 1])
+ *
+ * The read-write variables are:
+ *  - state (\see input_state_e)
+ *  - rate
+ *  - position
+ *  - time, time-offset
+ *  - title, next-title, prev-title
+ *  - chapter, next-chapter, next-chapter-prev
+ *  - program, audio-es, video-es, spu-es
+ *  - audio-delay, spu-delay
+ *  - bookmark (bookmark list)
+ *  - record
+ *  - frame-next
+ *  - navigation (list of "title %2i")
+ *  - "title %2i"
+ *
+ * The variable used for event is
+ *  - intf-event (\see input_event_type_e)
+ */
+
+/**
+ * Input state
+ *
+ * This enum is used by the variable "state"
+ */
+typedef enum input_state_e
+{
+    INIT_S = 0,
+    OPENING_S,
+    PLAYING_S,
+    PAUSE_S,
+    END_S,
+    ERROR_S,
+} input_state_e;
+
+/**
+ * Input events
+ *
+ * You can catch input event by adding a callback on the variable "intf-event".
+ * This variable is an integer that will hold a input_event_type_e value.
+ */
+typedef enum input_event_type_e
+{
+    /* "state" has changed */
+    INPUT_EVENT_STATE,
+    /* b_dead is true */
+    INPUT_EVENT_DEAD,
+
+    /* "rate" has changed */
+    INPUT_EVENT_RATE,
+
+    /* "capabilities" has changed */
+    INPUT_EVENT_CAPABILITIES,
+
+    /* At least one of "position" or "time" */
+    INPUT_EVENT_POSITION,
+
+    /* "length" has changed */
+    INPUT_EVENT_LENGTH,
+
+    /* A title has been added or removed or selected.
+     * It implies that the chapter has changed (no chapter event is sent) */
+    INPUT_EVENT_TITLE,
+    /* A chapter has been added or removed or selected. */
+    INPUT_EVENT_CHAPTER,
+
+    /* A program ("program") has been added or removed or selected,
+     * or "program-scrambled" has changed.*/
+    INPUT_EVENT_PROGRAM,
+    /* A ES has been added or removed or selected */
+    INPUT_EVENT_ES,
+
+    /* "record" has changed */
+    INPUT_EVENT_RECORD,
+
+    /* input_item_t media has changed */
+    INPUT_EVENT_ITEM_META,
+    /* input_item_t info has changed */
+    INPUT_EVENT_ITEM_INFO,
+    /* input_item_t epg has changed */
+    INPUT_EVENT_ITEM_EPG,
+
+    /* Input statistics have been updated */
+    INPUT_EVENT_STATISTICS,
+    /* At least one of "signal-quality" or "signal-strength" has changed */
+    INPUT_EVENT_SIGNAL,
+
+    /* "audio-delay" has changed */
+    INPUT_EVENT_AUDIO_DELAY,
+    /* "spu-delay" has changed */
+    INPUT_EVENT_SUBTITLE_DELAY,
+
+    /* "bookmark" has changed */
+    INPUT_EVENT_BOOKMARK,
+
+    /* cache" has changed */
+    INPUT_EVENT_CACHE,
+
+    /* A vout_thread_t object has been created/deleted by *the input* */
+    INPUT_EVENT_VOUT,
+
+    /* (pre-)parsing events */
+    INPUT_EVENT_SUBITEMS,
+
+    /* vbi_page has changed */
+    INPUT_EVENT_VBI_PAGE,
+    /* vbi_transparent has changed */
+    INPUT_EVENT_VBI_TRANSPARENCY,
+
+    /* subs_fps has changed */
+    INPUT_EVENT_SUBS_FPS,
+
+    /* Thumbnail generation */
+    INPUT_EVENT_THUMBNAIL_READY,
+} input_event_type_e;
+
+#define VLC_INPUT_CAPABILITIES_SEEKABLE (1<<0)
+#define VLC_INPUT_CAPABILITIES_PAUSEABLE (1<<1)
+#define VLC_INPUT_CAPABILITIES_CHANGE_RATE (1<<2)
+#define VLC_INPUT_CAPABILITIES_REWINDABLE (1<<3)
+#define VLC_INPUT_CAPABILITIES_RECORDABLE (1<<4)
+
+struct vlc_input_event_position
+{
+    float percentage;
+    vlc_tick_t ms;
+};
+
+struct vlc_input_event_title
+{
+    enum {
+        VLC_INPUT_TITLE_NEW_LIST,
+        VLC_INPUT_TITLE_SELECTED,
+    } action;
+    union
+    {
+        struct
+        {
+            input_title_t *const *array;
+            size_t count;
+        } list;
+        size_t selected_idx;
+    };
+};
+
+struct vlc_input_event_chapter
+{
+    int title;
+    int seekpoint;
+};
+
+struct vlc_input_event_program {
+    enum {
+        VLC_INPUT_PROGRAM_ADDED,
+        VLC_INPUT_PROGRAM_DELETED,
+        VLC_INPUT_PROGRAM_UPDATED,
+        VLC_INPUT_PROGRAM_SELECTED,
+        VLC_INPUT_PROGRAM_SCRAMBLED,
+    } action;
+    int id;
+    union {
+        const char *title;
+        bool scrambled;
+    };
+};
+
+struct vlc_input_event_es {
+    enum {
+        VLC_INPUT_ES_ADDED,
+        VLC_INPUT_ES_DELETED,
+        VLC_INPUT_ES_UPDATED,
+        VLC_INPUT_ES_SELECTED,
+        VLC_INPUT_ES_UNSELECTED,
+    } action;
+    /**
+     * ES track id: only valid from the event callback, unless the id is held
+     * by the user with vlc_es_Hold(). */
+    vlc_es_id_t *id;
+    /**
+     * Title of ES track, can be updated after the VLC_INPUT_ES_UPDATED event.
+     */
+    const char *title;
+    /**
+     * ES track information, can be updated after the VLC_INPUT_ES_UPDATED event.
+     */
+    const es_format_t *fmt;
+};
+
+struct vlc_input_event_signal {
+    float quality;
+    float strength;
+};
+
+struct vlc_input_event_vout
+{
+    enum {
+        VLC_INPUT_EVENT_VOUT_ADDED,
+        VLC_INPUT_EVENT_VOUT_DELETED,
+    } action;
+    vout_thread_t *vout;
+    vlc_es_id_t *id;
+};
+
+struct vlc_input_event
+{
+    input_event_type_e type;
+
+    union {
+        /* INPUT_EVENT_STATE */
+        input_state_e state;
+        /* INPUT_EVENT_RATE */
+        float rate;
+        /* INPUT_EVENT_CAPABILITIES */
+        int capabilities; /**< cf. VLC_INPUT_CAPABILITIES_* bitwise flags */
+        /* INPUT_EVENT_POSITION */
+        struct vlc_input_event_position position;
+        /* INPUT_EVENT_LENGTH */
+        vlc_tick_t length;
+        /* INPUT_EVENT_TITLE */
+        struct vlc_input_event_title title;
+        /* INPUT_EVENT_CHAPTER */
+        struct vlc_input_event_chapter chapter;
+        /* INPUT_EVENT_PROGRAM */
+        struct vlc_input_event_program program;
+        /* INPUT_EVENT_ES */
+        struct vlc_input_event_es es;
+        /* INPUT_EVENT_RECORD */
+        bool record;
+        /* INPUT_EVENT_STATISTICS */
+        const struct input_stats_t *stats;
+        /* INPUT_EVENT_SIGNAL */
+        struct vlc_input_event_signal signal;
+        /* INPUT_EVENT_AUDIO_DELAY */
+        vlc_tick_t audio_delay;
+        /* INPUT_EVENT_SUBTITLE_DELAY */
+        vlc_tick_t subtitle_delay;
+        /* INPUT_EVENT_CACHE */
+        float cache;
+        /* INPUT_EVENT_VOUT */
+        struct vlc_input_event_vout vout;
+        /* INPUT_EVENT_SUBITEMS */
+        input_item_node_t *subitems;
+        /* INPUT_EVENT_VBI_PAGE */
+        unsigned vbi_page;
+        /* INPUT_EVENT_VBI_TRANSPARENCY */
+        bool vbi_transparent;
+        /* INPUT_EVENT_SUBS_FPS */
+        float subs_fps;
+        /* INPUT_EVENT_THUMBNAIL_READY */
+        picture_t *thumbnail;
+    };
+};
+
+typedef void (*input_thread_events_cb)( input_thread_t *input,
+                                        const struct vlc_input_event *event,
+                                        void *userdata);
+
+/*****************************************************************************
+ * Prototypes
+ *****************************************************************************/
+input_thread_t * input_Create( vlc_object_t *p_parent,
+                               input_thread_events_cb event_cb, void *events_data,
+                               input_item_t *, input_resource_t *,
+                               vlc_renderer_item_t* p_renderer ) VLC_USED;
+#define input_Create(a,b,c,d,e,f) input_Create(VLC_OBJECT(a),b,c,d,e,f)
+
+
+/**
+ * Creates an item preparser.
+ *
+ * Creates an input thread to preparse an item. The input needs to be started
+ * with input_Start() afterwards.
+ *
+ * @param obj parent object
+ * @param item input item to preparse
+ * @return an input thread or NULL on error
+ */
+input_thread_t *input_CreatePreparser(vlc_object_t *obj,
+                                      input_thread_events_cb events_cb,
+                                      void *events_data, input_item_t *item)
+VLC_USED;
+
+VLC_API
+input_thread_t *input_CreateThumbnailer(vlc_object_t *obj,
+                                        input_thread_events_cb events_cb,
+                                        void *events_data, input_item_t *item)
+VLC_USED;
+
+input_thread_t *input_Hold(input_thread_t *input);
+void input_Release(input_thread_t *input);
+
+int input_Start( input_thread_t * );
+
+void input_Stop( input_thread_t * );
+
+int input_Read( vlc_object_t *, input_item_t *,
+                        input_thread_events_cb, void * );
+#define input_Read(a,b,c,d) input_Read(VLC_OBJECT(a),b,c,d)
+
+void input_Close( input_thread_t * );
+
+void input_SetTime( input_thread_t *, vlc_tick_t i_time, bool b_fast );
+
+void input_SetPosition( input_thread_t *, float f_position, bool b_fast );
+
+/**
+ * Get the input item for an input thread
+ *
+ * You have to keep a reference to the input or to the input_item_t until
+ * you do not need it anymore.
+ */
+input_item_t* input_GetItem( input_thread_t * ) VLC_USED;
+
 /*****************************************************************************
  *  Private input fields
  *****************************************************************************/
diff --git a/src/input/thumbnailer.c b/src/input/thumbnailer.c
index b1bbf2ae36..524651364d 100644
--- a/src/input/thumbnailer.c
+++ b/src/input/thumbnailer.c
@@ -25,7 +25,7 @@
 #endif
 
 #include <vlc_thumbnailer.h>
-#include <vlc_input.h>
+#include "input_internal.h"
 #include "misc/background_worker.h"
 
 struct vlc_thumbnailer_t
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 93c77970e2..44642c3f5a 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -159,16 +159,12 @@ image_HandlerDelete
 image_Mime2Fourcc
 image_Type2Fourcc
 InitMD5
-input_Create
-input_CreatePreparser
-input_CreateThumbnailer
 input_DecoderCreate
 input_DecoderDelete
 input_DecoderDecode
 input_DecoderDrain
 input_DecoderFlush
 input_DecoderSetSpuHighlight
-input_GetItem
 input_item_AddInfo
 input_item_AddOption
 input_item_AddOptions
@@ -209,7 +205,6 @@ input_item_slave_New
 input_item_AddSlave
 input_item_Parse
 input_item_parser_Release
-input_Read
 input_resource_New
 input_resource_Release
 input_resource_TerminateVout
@@ -218,16 +213,9 @@ input_resource_GetAout
 input_resource_HoldAout
 input_resource_PutAout
 input_resource_ResetAout
-input_Start
-input_Stop
-input_Hold
-input_Release
-input_SetTime
-input_SetPosition
 vlc_readdir_helper_init
 vlc_readdir_helper_finish
 vlc_readdir_helper_additem
-input_Close
 intf_Create
 libvlc_InternalAddIntf
 libvlc_InternalDialogInit
diff --git a/src/text/strings.c b/src/text/strings.c
index 09a4d5c523..fa3c78bee2 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -43,7 +43,6 @@
 #endif
 
 /* Needed by vlc_strfinput */
-#include <vlc_input.h>
 #include <vlc_meta.h>
 #include <vlc_aout.h>
 #include <vlc_memstream.h>
@@ -53,6 +52,7 @@
 #include <vlc_arrays.h>
 #include <libvlc.h>
 #include <errno.h>
+#include "../input/input_internal.h"
 
 static const struct xml_entity_s
 {
-- 
2.20.1



More information about the vlc-devel mailing list