+#include <vlc_access.h>
+#include <vlc_demux.h>
+#include <vlc_input.h>
+
+/*****************************************************************************
+ * Private input fields
+ *****************************************************************************/
+/* input_source_t: gathers all information per input source */
+typedef struct
+{
+ /* Input item description */
+ input_item_t *p_item;
+
+ /* Access/Stream/Demux plugins */
+ access_t *p_access;
+ stream_t *p_stream;
+ demux_t *p_demux;
+
+ /* Title infos for that input */
+ bool b_title_demux; /* Titles/Seekpoints provided by demux */
+ int i_title;
+ input_title_t **title;
+
+ int i_title_offset;
+ int i_seekpoint_offset;
+
+ int i_title_start;
+ int i_title_end;
+ int i_seekpoint_start;
+ int i_seekpoint_end;
+
+ /* Properties */
+ bool b_can_pause;
+ bool b_can_pace_control;
+ bool b_can_rate_control;
+ bool b_rescale_ts;
+
+ bool b_eof; /* eof of demuxer */
+ double f_fps;
+
+ /* Clock average variation */
+ int i_cr_average;
+
+} input_source_t;
+
+/** Private input fields */
+struct input_thread_private_t
+{
+ /* Object's event manager */
+ vlc_event_manager_t event_manager;
+
+ /* Global properties */
+ bool b_can_pause;
+ bool b_can_rate_control;
+
+ int i_rate;
+ /* */
+ int64_t i_start; /* :start-time,0 by default */
+ int64_t i_stop; /* :stop-time, 0 if none */
+ int64_t i_run; /* :run-time, 0 if none */
+
+ /* Title infos FIXME multi-input (not easy) ? */
+ int i_title;
+ input_title_t **title;
+
+ int i_title_offset;
+ int i_seekpoint_offset;
+
+ /* User bookmarks FIXME won't be easy with multiples input */
+ int i_bookmark;
+ seekpoint_t **bookmark;
+
+ /* Input attachment */
+ int i_attachment;
+ input_attachment_t **attachment;
+
+ /* Output */
+ es_out_t *p_es_out;
+ sout_instance_t *p_sout; /* XXX Move it to es_out ? */
+ bool b_out_pace_control; /* idem ? */
+
+ /* Main input properties */
+ input_source_t input;
+ /* Slave demuxers (subs, and others) */
+ int i_slave;
+ input_source_t **slave;
+
+ /* pts delay fixup */
+ struct {
+ int i_num_faulty;
+ bool to_high;
+ bool auto_adjust;
+ } pts_adjust;
+
+ /* Stats counters */
+ struct {
+ counter_t *p_read_packets;
+ counter_t *p_read_bytes;
+ counter_t *p_input_bitrate;
+ counter_t *p_demux_read;
+ counter_t *p_demux_bitrate;
+ counter_t *p_decoded_audio;
+ counter_t *p_decoded_video;
+ counter_t *p_decoded_sub;
+ counter_t *p_sout_sent_packets;
+ counter_t *p_sout_sent_bytes;
+ counter_t *p_sout_send_bitrate;
+ counter_t *p_played_abuffers;
+ counter_t *p_lost_abuffers;
+ counter_t *p_displayed_pictures;
+ counter_t *p_lost_pictures;
+ vlc_mutex_t counters_lock;
+ } counters;
+
+ /* Buffer of pending actions */
+ vlc_mutex_t lock_control;
+ int i_control;
+ struct
+ {
+ /* XXX for string value you have to allocate it before calling
+ * input_ControlPush */
+ int i_type;
+ vlc_value_t val;
+ } control[INPUT_CONTROL_FIFO_SIZE];
+};
+
+/***************************************************************************
+ * Internal control helpers
+ ***************************************************************************/