VLC  4.0.0-dev
input_internal.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * input_internal.h: Internal input structures
3  *****************************************************************************
4  * Copyright (C) 1998-2006 VLC authors and VideoLAN
5  *
6  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22 
23 #ifndef LIBVLC_INPUT_INTERNAL_H
24 #define LIBVLC_INPUT_INTERNAL_H 1
25 
26 #include <stddef.h>
27 #include <stdatomic.h>
28 
29 #include <vlc_access.h>
30 #include <vlc_demux.h>
31 #include <vlc_input.h>
32 #include <vlc_viewpoint.h>
33 #include <vlc_atomic.h>
34 #include <libvlc.h>
35 #include "input_interface.h"
36 #include "misc/interrupt.h"
37 
38 struct input_stats;
39 
40 /*****************************************************************************
41  * input defines/constants.
42  *****************************************************************************/
43 
44 /**
45  * Main structure representing an input thread. This structure is mostly
46  * private. The only public fields are read-only and constant.
47  */
48 typedef struct input_thread_t
49 {
50  struct vlc_object_t obj;
52 
53 /*****************************************************************************
54  * Input events and variables
55  *****************************************************************************/
56 
57 /**
58  * Input state
59  *
60  * This enum is used by the variable "state"
61  */
62 typedef enum input_state_e
63 {
64  INIT_S = 0,
65  OPENING_S,
71 
72 /**
73  * Input events
74  *
75  * You can catch input event by adding a callback on the variable "intf-event".
76  * This variable is an integer that will hold a input_event_type_e value.
77  */
78 typedef enum input_event_type_e
79 {
80  /* "state" has changed */
82  /* b_dead is true */
84 
85  /* "rate" has changed */
87 
88  /* "capabilities" has changed */
90 
91  /* At least one of "position", "time" "length" has changed */
93 
94  /* The output PTS changed */
96 
97  /* A title has been added or removed or selected.
98  * It implies that the chapter has changed (no chapter event is sent) */
100  /* A chapter has been added or removed or selected. */
102 
103  /* A program ("program") has been added or removed or selected,
104  * or "program-scrambled" has changed.*/
106  /* A ES has been added or removed or selected */
108 
109  /* "record" has changed */
111 
112  /* input_item_t media has changed */
114  /* input_item_t info has changed */
116  /* input_item_t epg has changed */
118 
119  /* Input statistics have been updated */
121  /* At least one of "signal-quality" or "signal-strength" has changed */
123 
124  /* "bookmark" has changed */
126 
127  /* cache" has changed */
129 
130  /* A vout_thread_t object has been created/deleted by *the input* */
132 
133  /* (pre-)parsing events */
135 
136  /* vbi_page has changed */
138  /* vbi_transparent has changed */
140 
141  /* subs_fps has changed */
143 
144  /* Thumbnail generation */
147 
148 #define VLC_INPUT_CAPABILITIES_SEEKABLE (1<<0)
149 #define VLC_INPUT_CAPABILITIES_PAUSEABLE (1<<1)
150 #define VLC_INPUT_CAPABILITIES_CHANGE_RATE (1<<2)
151 #define VLC_INPUT_CAPABILITIES_REWINDABLE (1<<3)
152 #define VLC_INPUT_CAPABILITIES_RECORDABLE (1<<4)
153 
155 {
157  /* Only valid for PAUSE_S and PLAYING_S states */
159 };
160 
162 {
163  float position;
167 };
168 
170 {
172  bool master;
175  double rate;
176  unsigned frame_rate;
177  unsigned frame_rate_base;
178 };
179 
181 {
182  enum {
185  } action;
186  union
187  {
188  struct
189  {
191  size_t count;
192  } list;
193  size_t selected_idx;
194  };
195 };
196 
198 {
199  int title;
201 };
202 
204  enum {
210  } action;
211  int id;
212  union {
213  const char *title;
214  bool scrambled;
215  };
216 };
217 
219  enum {
225  } action;
226  /**
227  * ES track id: only valid from the event callback, unless the id is held
228  * by the user with vlc_es_Hold(). */
230  /**
231  * Title of ES track, can be updated after the VLC_INPUT_ES_UPDATED event.
232  */
233  const char *title;
234  /**
235  * ES track information, can be updated after the VLC_INPUT_ES_UPDATED event.
236  */
237  const es_format_t *fmt;
238  /**
239  * Only valid with VLC_INPUT_ES_SELECTED, true if the track was selected by
240  * the user.
241  */
242  bool forced;
243 };
244 
246  float quality;
247  float strength;
248 };
249 
251 {
252  enum {
255  } action;
259 };
260 
262 {
264 
265  union {
266  /* INPUT_EVENT_STATE */
268  /* INPUT_EVENT_RATE */
269  float rate;
270  /* INPUT_EVENT_CAPABILITIES */
271  int capabilities; /**< cf. VLC_INPUT_CAPABILITIES_* bitwise flags */
272  /* INPUT_EVENT_TIMES */
274  /* INPUT_EVENT_OUTPUT_CLOCK */
276  /* INPUT_EVENT_TITLE */
278  /* INPUT_EVENT_CHAPTER */
280  /* INPUT_EVENT_PROGRAM */
282  /* INPUT_EVENT_ES */
284  /* INPUT_EVENT_RECORD */
285  bool record;
286  /* INPUT_EVENT_STATISTICS */
287  const struct input_stats_t *stats;
288  /* INPUT_EVENT_SIGNAL */
290  /* INPUT_EVENT_CACHE */
291  float cache;
292  /* INPUT_EVENT_VOUT */
294  /* INPUT_EVENT_SUBITEMS */
296  /* INPUT_EVENT_VBI_PAGE */
297  unsigned vbi_page;
298  /* INPUT_EVENT_VBI_TRANSPARENCY */
300  /* INPUT_EVENT_SUBS_FPS */
301  float subs_fps;
302  /* INPUT_EVENT_THUMBNAIL_READY */
304  };
305 };
306 
307 typedef void (*input_thread_events_cb)( input_thread_t *input,
308  const struct vlc_input_event *event,
309  void *userdata);
310 
311 /*****************************************************************************
312  * Prototypes
313  *****************************************************************************/
315  input_thread_events_cb event_cb, void *events_data,
317  vlc_renderer_item_t* p_renderer ) VLC_USED;
318 #define input_Create(a,b,c,d,e,f) input_Create(VLC_OBJECT(a),b,c,d,e,f)
319 
320 
321 /**
322  * Creates an item preparser.
323  *
324  * Creates an input thread to preparse an item. The input needs to be started
325  * with input_Start() afterwards.
326  *
327  * @param obj parent object
328  * @param item input item to preparse
329  * @return an input thread or NULL on error
330  */
332  input_thread_events_cb events_cb,
333  void *events_data, input_item_t *item)
334 VLC_USED;
335 
336 VLC_API
338  input_thread_events_cb events_cb,
339  void *events_data, input_item_t *item)
340 VLC_USED;
341 
342 int input_Start( input_thread_t * );
343 
344 void input_Stop( input_thread_t * );
345 
346 void input_Close( input_thread_t * );
347 
348 void input_SetTime( input_thread_t *, vlc_tick_t i_time, bool b_fast );
349 
350 void input_SetPosition( input_thread_t *, float f_position, bool b_fast );
351 
352 /**
353  * Set the delay of an ES identifier
354  */
355 void input_SetEsIdDelay(input_thread_t *input, vlc_es_id_t *es_id,
356  vlc_tick_t delay);
357 
358 /**
359  * Get the input item for an input thread
360  *
361  * You have to keep a reference to the input or to the input_item_t until
362  * you do not need it anymore.
363  */
365 
366 /*****************************************************************************
367  * Private input fields
368  *****************************************************************************/
369 
370 #define INPUT_CONTROL_FIFO_SIZE 100
371 
372 /* input_source_t: gathers all information per input source */
374 {
376 
377  demux_t *p_demux; /**< Demux object (most downstream) */
378  es_out_t *p_slave_es_out; /**< Slave es out */
379 
380  char *str_id;
381  int auto_id;
383 
384  /* Title infos for that input */
385  bool b_title_demux; /* Titles/Seekpoints provided by demux */
386  int i_title;
388 
391 
396 
397  /* Properties */
403  double f_fps;
404 
405  /* sub-fps handling */
407  float sub_rate;
408 
409  /* */
411 
412  bool b_eof; /* eof of demuxer */
413 
414 };
415 
416 typedef union
417 {
421  struct {
424  } list;
425  struct {
428  } time;
429  struct {
430  bool b_fast_seek;
431  float f_val;
432  } pos;
433  struct
434  {
435  enum es_format_category_e cat;
437  } cat_delay;
438  struct
439  {
440  enum es_format_category_e cat;
441  char *str_ids;
442  } cat_ids;
443  struct
444  {
445  vlc_es_id_t *id;
446  vlc_tick_t delay;
447  } es_delay;
448  struct {
449  vlc_es_id_t *id;
450  unsigned page;
451  } vbi_page;
452  struct {
453  vlc_es_id_t *id;
454  bool enabled;
455  } vbi_transparency;
457 
458 typedef struct
459 {
460  int i_type;
463 
464 /** Private input fields */
466 {
468 
470  void *events_data;
471 
472  /* Global properties */
474 
475  /* Current state */
476  int i_state;
481  float rate;
483 
484  /* Playtime configuration and state */
485  vlc_tick_t i_start; /* :start-time,0 by default */
486  vlc_tick_t i_stop; /* :stop-time, 0 if none */
487 
488  /* Delays */
491 
492  /* Output */
493  bool b_out_pace_control; /* XXX Move it ot es_sout ? */
494  sout_instance_t *p_sout; /* Idem ? */
500 
501 
504 
505  /* Input attachment */
508 
509  /* Main input properties */
510 
511  /* Input item */
513 
514  /* Main source */
516  /* Slave sources (subs, and others) */
517  int i_slave;
520 
521  /* Resources */
523 
524  /* Stats counters */
526 
527  /* Buffer of pending actions */
530  size_t i_control;
532 
536 
538 {
539  return container_of(input, input_thread_private_t, input);
540 }
541 
542 /***************************************************************************
543  * Internal control helpers
544  ***************************************************************************/
546 {
548 
550 
553 
556 
558 
562 
566 
568 
569  INPUT_CONTROL_NAV_ACTIVATE, // NOTE: INPUT_CONTROL_NAV_* values must be
570  INPUT_CONTROL_NAV_UP, // contiguous and in the same order as
571  INPUT_CONTROL_NAV_DOWN, // INPUT_NAV_* and DEMUX_NAV_*.
576 
578  INPUT_CONTROL_SET_ES_LIST, // select a list of ES atomically
582 
583  INPUT_CONTROL_SET_VIEWPOINT, // new absolute viewpoint
584  INPUT_CONTROL_SET_INITIAL_VIEWPOINT, // set initial viewpoint (generally from video)
585  INPUT_CONTROL_UPDATE_VIEWPOINT, // update viewpoint relative to current
586 
589 
592 
594 
596 
598 
601 };
602 
603 /* Internal helpers */
604 
606 
607 /* XXX for string value you have to allocate it before calling
608  * input_ControlPushHelper
609  */
610 static inline int input_ControlPushHelper( input_thread_t *p_input, int i_type, vlc_value_t *val )
611 {
612  if( val != NULL )
613  {
614  input_control_param_t param = { .val = *val };
615  return input_ControlPush( p_input, i_type, &param );
616  }
617  else
618  {
619  return input_ControlPush( p_input, i_type, NULL );
620  }
621 }
622 
623 static inline int input_ControlPushEsHelper( input_thread_t *p_input, int i_type,
624  vlc_es_id_t *id )
625 {
628  return input_ControlPush( p_input, i_type, &(input_control_param_t) {
629  .id = vlc_es_id_Hold( id ),
630  } );
631 }
632 
633 /**
634  * Set the program id
635  *
636  * cf. ES_OUT_SET_GROUP
637  * This function can be called before start or while started.
638  * This function is not thread-safe, the caller should handle the locking.
639  */
640 void input_SetProgramId(input_thread_t *input, int group_id);
641 
642 /**
643  * Set the list of string ids to enable for a category
644  *
645  * cf. ES_OUT_SET_ES_CAT_IDS
646  * This function can be called before start or while started.
647  * This function is not thread-safe, the caller should handle the locking.
648  */
650  const char *str_ids);
651 
652 bool input_Stopped( input_thread_t * );
653 
654 int input_GetAttachments(input_thread_t *input, input_attachment_t ***attachments);
655 
657 
659 
660 /**
661  * Hold the input_source_t
662  */
664 
665 /**
666  * Release the input_source_t
667  */
669 
670 /**
671  * Returns the string identifying this input source
672  *
673  * @return a string id or NULL if the source is the master
674  */
675 const char *input_source_GetStrId( input_source_t *in );
676 
677 /**
678  * Get a new fmt.i_id from the input source
679  *
680  * This auto id will be relative to this input source. It allows to have stable
681  * ids across different playback instances, by not relying on the input source
682  * addition order.
683  */
685 
686 /**
687  * Returns true if a given source should be auto-selected
688  */
690 
691 /* Bound pts_delay */
692 #define INPUT_PTS_DELAY_MAX VLC_TICK_FROM_SEC(60)
693 
694 /**********************************************************************
695  * Item metadata
696  **********************************************************************/
697 /* input_ExtractAttachmentAndCacheArt:
698  * Be careful: p_item lock will be taken! */
700 
701 /***************************************************************************
702  * Internal prototypes
703  ***************************************************************************/
704 
705 /* var.c */
706 
708 
709 /* Subtitles */
710 int subtitles_Detect( input_thread_t *, char *, const char *, input_item_slave_t ***, int * );
711 int subtitles_Filter( const char *);
712 
713 /* meta.c */
715  const vlc_meta_t *p_meta );
716 
717 /* stats.c */
718 typedef struct input_rate_t
719 {
721  uintmax_t updates;
722  uintmax_t value;
723  struct
724  {
725  uintmax_t value;
727  } samples[2];
728 } input_rate_t;
729 
730 struct input_stats {
733  atomic_uintmax_t demux_corrupted;
734  atomic_uintmax_t demux_discontinuity;
735  atomic_uintmax_t decoded_audio;
736  atomic_uintmax_t decoded_video;
737  atomic_uintmax_t played_abuffers;
738  atomic_uintmax_t lost_abuffers;
739  atomic_uintmax_t displayed_pictures;
740  atomic_uintmax_t late_pictures;
741  atomic_uintmax_t lost_pictures;
742 };
743 
744 struct input_stats *input_stats_Create(void);
745 void input_stats_Destroy(struct input_stats *);
746 void input_rate_Add(input_rate_t *, uintmax_t);
748 
749 #endif
INPUT_EVENT_ES
@ INPUT_EVENT_ES
Definition: input_internal.h:107
INPUT_CONTROL_NAV_ACTIVATE
@ INPUT_CONTROL_NAV_ACTIVATE
Definition: input_internal.h:571
input_source_t::str_id
char * str_id
Definition: input_internal.h:380
vlc_input_event::vbi_transparent
bool vbi_transparent
Definition: input_internal.h:299
INPUT_EVENT_THUMBNAIL_READY
@ INPUT_EVENT_THUMBNAIL_READY
Definition: input_internal.h:145
PAUSE_S
@ PAUSE_S
Definition: input_internal.h:69
input_thread_private_t::p_renderer
vlc_renderer_item_t * p_renderer
Definition: input_internal.h:499
vlc_input_event_vout::order
enum vlc_vout_order order
Definition: input_internal.h:257
input_Close
void input_Close(input_thread_t *)
Close an input.
Definition: input.c:215
input_thread_private_t::viewpoint
vlc_viewpoint_t viewpoint
Definition: input_internal.h:497
input_source_t::sub_rate
float sub_rate
Definition: input_internal.h:407
VLC_API
#define VLC_API
Definition: fourcc_gen.c:31
input_thread_private_t::wait_control
vlc_cond_t wait_control
Definition: input_internal.h:529
input_source_t::i_title_offset
int i_title_offset
Definition: input_internal.h:389
input_thread_private_t::lock_control
vlc_mutex_t lock_control
Definition: input_internal.h:528
input_CreatePreparser
input_thread_t * input_CreatePreparser(vlc_object_t *obj, input_thread_events_cb events_cb, void *events_data, input_item_t *item)
Creates an item preparser.
Definition: input.c:144
subtitles_Filter
int subtitles_Filter(const char *)
Definition: subtitles.c:137
INPUT_EVENT_TITLE
@ INPUT_EVENT_TITLE
Definition: input_internal.h:99
input_control_param_t::f_val
float f_val
Definition: input_internal.h:431
input_thread_private_t::i_start
vlc_tick_t i_start
Definition: input_internal.h:485
vlc_input_event::es
struct vlc_input_event_es es
Definition: input_internal.h:283
vlc_demux.h
input_attachment_t
Definition: vlc_input.h:159
input_stats::displayed_pictures
atomic_uintmax_t displayed_pictures
Definition: input_internal.h:739
input_thread_private_t::master
input_source_t * master
Definition: input_internal.h:515
vlc_input_event_output_clock
Definition: input_internal.h:169
input_Create
#define input_Create(a, b, c, d, e, f)
Definition: input_internal.h:318
INPUT_CONTROL_SET_SEEKPOINT_NEXT
@ INPUT_CONTROL_SET_SEEKPOINT_NEXT
Definition: input_internal.h:566
vlc_input_event_program::VLC_INPUT_PROGRAM_DELETED
@ VLC_INPUT_PROGRAM_DELETED
Definition: input_internal.h:206
input_thread_private_t::p_sout
sout_instance_t * p_sout
Definition: input_internal.h:494
INPUT_CONTROL_SET_RECORD_STATE
@ INPUT_CONTROL_SET_RECORD_STATE
Definition: input_internal.h:595
vlc_input_event_title::selected_idx
size_t selected_idx
Definition: input_internal.h:193
INPUT_CONTROL_ADD_SLAVE
@ INPUT_CONTROL_ADD_SLAVE
Definition: input_internal.h:592
INPUT_CONTROL_SET_ES
@ INPUT_CONTROL_SET_ES
Definition: input_internal.h:579
input_source_t::f_fps
double f_fps
Definition: input_internal.h:403
INPUT_CONTROL_SET_SEEKPOINT_PREV
@ INPUT_CONTROL_SET_SEEKPOINT_PREV
Definition: input_internal.h:567
input_Start
int input_Start(input_thread_t *)
Start a input_thread_t created by input_Create.
Definition: input.c:167
INPUT_CONTROL_SET_SUBS_FPS
@ INPUT_CONTROL_SET_SUBS_FPS
Definition: input_internal.h:593
INPUT_EVENT_PROGRAM
@ INPUT_EVENT_PROGRAM
Definition: input_internal.h:105
input_thread_private_t::rate
float rate
Definition: input_internal.h:481
INPUT_EVENT_VBI_PAGE
@ INPUT_EVENT_VBI_PAGE
Definition: input_internal.h:137
vlc_input_event::thumbnail
picture_t * thumbnail
Definition: input_internal.h:303
input_thread_private_t::i_stop
vlc_tick_t i_stop
Definition: input_internal.h:486
input_thread_private_t::slave_subs_rate
float slave_subs_rate
Definition: input_internal.h:519
INPUT_CONTROL_SET_VBI_PAGE
@ INPUT_CONTROL_SET_VBI_PAGE
Definition: input_internal.h:601
input_source_IsAutoSelected
bool input_source_IsAutoSelected(input_source_t *in)
Returns true if a given source should be auto-selected.
Definition: input.c:2861
vlc_input_event::title
struct vlc_input_event_title title
Definition: input_internal.h:277
input_source_t::i_seekpoint_start
int i_seekpoint_start
Definition: input_internal.h:394
vlc_input_event_vout::VLC_INPUT_EVENT_VOUT_STOPPED
@ VLC_INPUT_EVENT_VOUT_STOPPED
Definition: input_internal.h:254
vlc_input_event_title::VLC_INPUT_TITLE_SELECTED
@ VLC_INPUT_TITLE_SELECTED
Definition: input_internal.h:184
audio_replay_gain_t
Definition: vlc_es.h:55
vlc_input_event_chapter
Definition: input_internal.h:197
vlc_input_event_output_clock::rate
double rate
Definition: input_internal.h:175
input_item_t
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:77
input_stats::demux_discontinuity
atomic_uintmax_t demux_discontinuity
Definition: input_internal.h:734
vlc_access.h
input_control_param_t::str_ids
char * str_ids
Definition: input_internal.h:441
vlc_input_event_chapter::title
int title
Definition: input_internal.h:199
vlc_input_event::capabilities
int capabilities
cf.
Definition: input_internal.h:271
input_stats::decoded_video
atomic_uintmax_t decoded_video
Definition: input_internal.h:736
input_thread_private_t::b_thumbnailing
bool b_thumbnailing
Definition: input_internal.h:480
input_thread_events_cb
void(* input_thread_events_cb)(input_thread_t *input, const struct vlc_input_event *event, void *userdata)
Definition: input_internal.h:307
input_thread_private_t::interrupt
vlc_interrupt_t interrupt
Definition: input_internal.h:534
vlc_input_event::program
struct vlc_input_event_program program
Definition: input_internal.h:281
input_source_GetNewAutoId
int input_source_GetNewAutoId(input_source_t *in)
Get a new fmt.i_id from the input source.
Definition: input.c:2856
INPUT_EVENT_RECORD
@ INPUT_EVENT_RECORD
Definition: input_internal.h:110
input_rate_t::value
uintmax_t value
Definition: input_internal.h:722
vlc_input_event_es
Definition: input_internal.h:218
vlc_input_event_title::array
input_title_t *const * array
Definition: input_internal.h:190
input_thread_private_t::b_recording
bool b_recording
Definition: input_internal.h:479
INPUT_CONTROL_NAV_UP
@ INPUT_CONTROL_NAV_UP
Definition: input_internal.h:572
vlc_input_event::chapter
struct vlc_input_event_chapter chapter
Definition: input_internal.h:279
INPUT_CONTROL_SET_PROGRAM
@ INPUT_CONTROL_SET_PROGRAM
Definition: input_internal.h:559
input_source_t::b_slave_sub
bool b_slave_sub
Definition: input_internal.h:406
INPUT_CONTROL_SET_BOOKMARK
@ INPUT_CONTROL_SET_BOOKMARK
Definition: input_internal.h:569
vlc_input_event_program::VLC_INPUT_PROGRAM_SCRAMBLED
@ VLC_INPUT_PROGRAM_SCRAMBLED
Definition: input_internal.h:209
input_source_t::auto_id
int auto_id
Definition: input_internal.h:381
INPUT_CONTROL_NAV_MENU
@ INPUT_CONTROL_NAV_MENU
Definition: input_internal.h:577
input_stats::lost_abuffers
atomic_uintmax_t lost_abuffers
Definition: input_internal.h:738
INPUT_EVENT_CAPABILITIES
@ INPUT_EVENT_CAPABILITIES
Definition: input_internal.h:89
input_thread_private_t::slave
input_source_t ** slave
Definition: input_internal.h:518
input_stats_t
Definition: vlc_input_item.h:507
input_SetEsIdDelay
void input_SetEsIdDelay(input_thread_t *input, vlc_es_id_t *es_id, vlc_tick_t delay)
Set the delay of an ES identifier.
vlc_viewpoint_t
Viewpoints.
Definition: vlc_viewpoint.h:41
input_source_t::i_title_start
int i_title_start
Definition: input_internal.h:392
vlc_input_event_vout::VLC_INPUT_EVENT_VOUT_STARTED
@ VLC_INPUT_EVENT_VOUT_STARTED
Definition: input_internal.h:253
input_rate_t::lock
vlc_mutex_t lock
Definition: input_internal.h:720
INPUT_CONTROL_UNSET_ES
@ INPUT_CONTROL_UNSET_ES
Definition: input_internal.h:581
input_thread_private_t::stats
struct input_stats * stats
Definition: input_internal.h:525
vlc_input_event_times::time
vlc_tick_t time
Definition: input_internal.h:164
vlc_input_event
Definition: input_internal.h:261
vlc_input_event_program::VLC_INPUT_PROGRAM_ADDED
@ VLC_INPUT_PROGRAM_ADDED
Definition: input_internal.h:205
vlc_input_event::vbi_page
unsigned vbi_page
Definition: input_internal.h:297
input_thread_private_t::thread
vlc_thread_t thread
Definition: input_internal.h:533
vlc_input.h
vlc_input_event::subitems
input_item_node_t * subitems
Definition: input_internal.h:295
vlc_input_event_output_clock::frame_rate
unsigned frame_rate
Definition: input_internal.h:176
INPUT_CONTROL_SET_ES_LIST
@ INPUT_CONTROL_SET_ES_LIST
Definition: input_internal.h:580
input_source_t::b_title_demux
bool b_title_demux
Definition: input_internal.h:385
vlc_input_event::times
struct vlc_input_event_times times
Definition: input_internal.h:273
input_source_t::b_eof
bool b_eof
Definition: input_internal.h:412
input_thread_private_t::i_slave
int i_slave
Definition: input_internal.h:517
vlc_input_event_es::forced
bool forced
Only valid with VLC_INPUT_ES_SELECTED, true if the track was selected by the user.
Definition: input_internal.h:242
input_source_t::b_can_pause
bool b_can_pause
Definition: input_internal.h:398
INPUT_EVENT_SIGNAL
@ INPUT_EVENT_SIGNAL
Definition: input_internal.h:122
input_control_param_t::i_val
vlc_tick_t i_val
Definition: input_internal.h:427
input_source_t::i_title
int i_title
Definition: input_internal.h:386
input_control_param_t::id
vlc_es_id_t * id
Definition: input_internal.h:420
input_stats
Definition: input_internal.h:730
picture_t
Video picture.
Definition: vlc_picture.h:120
INPUT_CONTROL_NAV_RIGHT
@ INPUT_CONTROL_NAV_RIGHT
Definition: input_internal.h:575
vlc_input_event_program::scrambled
bool scrambled
Definition: input_internal.h:214
INPUT_CONTROL_SET_TITLE
@ INPUT_CONTROL_SET_TITLE
Definition: input_internal.h:561
input_stats::demux_corrupted
atomic_uintmax_t demux_corrupted
Definition: input_internal.h:733
INPUT_EVENT_CACHE
@ INPUT_EVENT_CACHE
Definition: input_internal.h:128
INPUT_CONTROL_SET_VIEWPOINT
@ INPUT_CONTROL_SET_VIEWPOINT
Definition: input_internal.h:585
vlc_mutex_t
Mutex.
Definition: vlc_threads.h:225
INPUT_CONTROL_SET_RATE
@ INPUT_CONTROL_SET_RATE
Definition: input_internal.h:551
vlc_input_event_title::count
size_t count
Definition: input_internal.h:191
vlc_meta_t
Definition: meta.c:39
vlc_input_event_output_clock::system_ts
vlc_tick_t system_ts
Definition: input_internal.h:173
INPUT_CONTROL_UPDATE_VIEWPOINT
@ INPUT_CONTROL_UPDATE_VIEWPOINT
Definition: input_internal.h:587
vlc_input_event_program::action
enum vlc_input_event_program::@31 action
vlc_input_event::record
bool record
Definition: input_internal.h:285
vlc_input_event_output_clock::ts
vlc_tick_t ts
Definition: input_internal.h:174
es_format_category_e
es_format_category_e
ES Categories.
Definition: vlc_es.h:600
input_control_e
input_control_e
Definition: input_internal.h:545
input_event_type_e
input_event_type_e
Input events.
Definition: input_internal.h:78
input_stats_Destroy
void input_stats_Destroy(struct input_stats *)
Definition: stats.c:74
vlc_input_event_vout::action
enum vlc_input_event_vout::@35 action
es_out_t
Definition: vlc_es_out.h:143
INPUT_EVENT_DEAD
@ INPUT_EVENT_DEAD
Definition: input_internal.h:83
input_thread_private_t::is_stopped
bool is_stopped
Definition: input_internal.h:478
input_stats_Compute
void input_stats_Compute(struct input_stats *, input_stats_t *)
Definition: stats.c:79
vlc_input_event_signal::strength
float strength
Definition: input_internal.h:247
input_thread_private_t::b_low_delay
bool b_low_delay
Definition: input_internal.h:489
INPUT_CONTROL_SET_ES_CAT_IDS
@ INPUT_CONTROL_SET_ES_CAT_IDS
Definition: input_internal.h:583
interrupt.h
input_SetProgramId
void input_SetProgramId(input_thread_t *input, int group_id)
Set the program id.
Definition: input.c:1871
input_rate_Add
void input_rate_Add(input_rate_t *, uintmax_t)
Update a counter element with new values.
Definition: stats.c:121
input_source_t::autoselected
bool autoselected
Definition: input_internal.h:382
input_control_param_t::ids
vlc_es_id_t ** ids
Definition: input_internal.h:423
input_SetEsCatIds
void input_SetEsCatIds(input_thread_t *, enum es_format_category_e cat, const char *str_ids)
Set the list of string ids to enable for a category.
Definition: input.c:1889
i_type
int i_type
Definition: httpd.c:1269
INPUT_CONTROL_SET_RENDERER
@ INPUT_CONTROL_SET_RENDERER
Definition: input_internal.h:599
INPUT_EVENT_STATE
@ INPUT_EVENT_STATE
Definition: input_internal.h:81
vlc_input_event_es::VLC_INPUT_ES_UPDATED
@ VLC_INPUT_ES_UPDATED
Definition: input_internal.h:222
input_rate_t::samples
struct input_rate_t::@46 samples[2]
input_CreateThumbnailer
VLC_EXPORT input_thread_t * input_CreateThumbnailer(vlc_object_t *obj, input_thread_events_cb events_cb, void *events_data, input_item_t *item)
Definition: input.c:152
vlc_input_event::stats
const struct input_stats_t * stats
Definition: input_internal.h:287
es_format_t
Definition: vlc_es.h:617
vlc_input_event_title::VLC_INPUT_TITLE_NEW_LIST
@ VLC_INPUT_TITLE_NEW_LIST
Definition: input_internal.h:183
vlc_atomic.h
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
input_thread_private_t
struct input_thread_private_t input_thread_private_t
Private input fields.
vlc_input_event::signal
struct vlc_input_event_signal signal
Definition: input_internal.h:289
input_stats::input_bitrate
input_rate_t input_bitrate
Definition: input_internal.h:731
input_ConfigVarInit
void input_ConfigVarInit(input_thread_t *)
Definition: var.c:39
input_control_param_t::b_fast_seek
bool b_fast_seek
Definition: input_internal.h:426
input_rate_t
struct input_rate_t input_rate_t
input_thread_private_t::p_item
input_item_t * p_item
Definition: input_internal.h:512
vlc_input_event_program::VLC_INPUT_PROGRAM_SELECTED
@ VLC_INPUT_PROGRAM_SELECTED
Definition: input_internal.h:208
input_thread_private_t
Private input fields.
Definition: input_internal.h:465
input_control_param_t
Definition: input_internal.h:416
INPUT_EVENT_ITEM_INFO
@ INPUT_EVENT_ITEM_INFO
Definition: input_internal.h:115
INPUT_CONTROL_JUMP_TIME
@ INPUT_CONTROL_JUMP_TIME
Definition: input_internal.h:557
input_rate_t
Definition: input_internal.h:718
input_source_t::i_seekpoint_offset
int i_seekpoint_offset
Definition: input_internal.h:390
input_stats_Create
struct input_stats * input_stats_Create(void)
Definition: stats.c:54
vlc_input_event_program::VLC_INPUT_PROGRAM_UPDATED
@ VLC_INPUT_PROGRAM_UPDATED
Definition: input_internal.h:207
INPUT_CONTROL_SET_TIME
@ INPUT_CONTROL_SET_TIME
Definition: input_internal.h:556
input_control_t
Definition: input_internal.h:458
input_thread_private_t::input
struct input_thread_t input
Definition: input_internal.h:467
vlc_input_event_times::normal_time
vlc_tick_t normal_time
Definition: input_internal.h:165
vlc_input_event_state
Definition: input_internal.h:154
INPUT_CONTROL_SET_FRAME_NEXT
@ INPUT_CONTROL_SET_FRAME_NEXT
Definition: input_internal.h:597
input_source_t::i_title_end
int i_title_end
Definition: input_internal.h:393
INPUT_EVENT_CHAPTER
@ INPUT_EVENT_CHAPTER
Definition: input_internal.h:101
vlc_input_event::vout
struct vlc_input_event_vout vout
Definition: input_internal.h:293
input_thread_private_t::i_jitter_max
vlc_tick_t i_jitter_max
Definition: input_internal.h:490
input_thread_private_t::b_out_pace_control
bool b_out_pace_control
Definition: input_internal.h:493
vlc_input_event::subs_fps
float subs_fps
Definition: input_internal.h:301
vlc_thread_t
Thread handle.
Definition: vlc_threads.h:180
input_source_t
Definition: input_internal.h:373
subtitles_Detect
int subtitles_Detect(input_thread_t *, char *, const char *, input_item_slave_t ***, int *)
Detect subtitle files.
Definition: subtitles.c:213
input_thread_private_t::events_cb
input_thread_events_cb events_cb
Definition: input_internal.h:469
stream_t
stream_t definition
Definition: vlc_stream.h:46
vlc_input_event_vout::id
vlc_es_id_t * id
Definition: input_internal.h:258
vlc_input_event_es::VLC_INPUT_ES_DELETED
@ VLC_INPUT_ES_DELETED
Definition: input_internal.h:221
input_thread_private_t::control
input_control_t control[100]
Definition: input_internal.h:531
input_stats::demux_bitrate
input_rate_t demux_bitrate
Definition: input_internal.h:732
INPUT_CONTROL_NAV_POPUP
@ INPUT_CONTROL_NAV_POPUP
Definition: input_internal.h:576
input_source_t::i_seekpoint_end
int i_seekpoint_end
Definition: input_internal.h:395
INPUT_EVENT_ITEM_META
@ INPUT_EVENT_ITEM_META
Definition: input_internal.h:113
OPENING_S
@ OPENING_S
Definition: input_internal.h:67
input_title_t
Definition: vlc_input.h:93
vlc_interrupt
Definition: interrupt.h:32
input_stats::played_abuffers
atomic_uintmax_t played_abuffers
Definition: input_internal.h:737
INIT_S
@ INIT_S
Definition: input_internal.h:66
vlc_es_id_t
Opaque structure representing an ES (Elementary Stream) track.
Definition: es_out.c:94
INPUT_CONTROL_SET_SEEKPOINT
@ INPUT_CONTROL_SET_SEEKPOINT
Definition: input_internal.h:565
input_ControlPushHelper
static int input_ControlPushHelper(input_thread_t *p_input, int i_type, vlc_value_t *val)
Definition: input_internal.h:610
container_of
#define container_of(ptr, type, member)
Definition: vlc_common.h:1140
input_SetPosition
void input_SetPosition(input_thread_t *, float f_position, bool b_fast)
Definition: input.c:232
vlc_input_event_es::title
const char * title
Title of ES track, can be updated after the VLC_INPUT_ES_UPDATED event.
Definition: input_internal.h:233
vlc_input_event_es::id
vlc_es_id_t * id
ES track id: only valid from the event callback, unless the id is held by the user with vlc_es_Hold()...
Definition: input_internal.h:229
vlc_input_event_vout
Definition: input_internal.h:250
input_source_Release
void input_source_Release(input_source_t *in)
Release the input_source_t.
Definition: input.c:2842
vlc_input_event::cache
float cache
Definition: input_internal.h:291
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
input_ControlPushEsHelper
static int input_ControlPushEsHelper(input_thread_t *p_input, int i_type, vlc_es_id_t *id)
Definition: input_internal.h:623
input_source_Hold
input_source_t * input_source_Hold(input_source_t *in)
Hold the input_source_t.
Definition: input.c:2836
input_thread_private_t::events_data
void * events_data
Definition: input_internal.h:470
input_thread_private_t::viewpoint_changed
bool viewpoint_changed
Definition: input_internal.h:498
vlc_input_event_es::VLC_INPUT_ES_UNSELECTED
@ VLC_INPUT_ES_UNSELECTED
Definition: input_internal.h:224
INPUT_EVENT_TIMES
@ INPUT_EVENT_TIMES
Definition: input_internal.h:92
vlc_input_event_signal::quality
float quality
Definition: input_internal.h:246
input_interface.h
vlc_audio_replay_gain_MergeFromMeta
void vlc_audio_replay_gain_MergeFromMeta(audio_replay_gain_t *p_dst, const vlc_meta_t *p_meta)
Definition: meta.c:274
INPUT_EVENT_OUTPUT_CLOCK
@ INPUT_EVENT_OUTPUT_CLOCK
Definition: input_internal.h:95
input_SetTime
void input_SetTime(input_thread_t *, vlc_tick_t i_time, bool b_fast)
Definition: input.c:223
vlc_input_event::type
input_event_type_e type
Definition: input_internal.h:263
vlc_input_event_times::length
vlc_tick_t length
Definition: input_internal.h:166
vlc_input_event_es::action
enum vlc_input_event_es::@34 action
INPUT_CONTROL_NAV_DOWN
@ INPUT_CONTROL_NAV_DOWN
Definition: input_internal.h:573
INPUT_CONTROL_SET_STATE
@ INPUT_CONTROL_SET_STATE
Definition: input_internal.h:549
input_thread_private_t::is_running
bool is_running
Definition: input_internal.h:477
INPUT_EVENT_SUBS_FPS
@ INPUT_EVENT_SUBS_FPS
Definition: input_internal.h:142
VLC_USED
#define VLC_USED
Definition: fourcc_gen.c:32
vlc_input_event_program
Definition: input_internal.h:203
INPUT_EVENT_SUBITEMS
@ INPUT_EVENT_SUBITEMS
Definition: input_internal.h:134
input_thread_private_t::i_attachment
int i_attachment
Definition: input_internal.h:506
input_thread_private_t::i_state
int i_state
Definition: input_internal.h:476
input_GetAttachment
input_attachment_t * input_GetAttachment(input_thread_t *input, const char *name)
Definition: input.c:3528
INPUT_CONTROL_SET_VBI_TRANSPARENCY
@ INPUT_CONTROL_SET_VBI_TRANSPARENCY
Definition: input_internal.h:602
vlc_input_event_es::VLC_INPUT_ES_SELECTED
@ VLC_INPUT_ES_SELECTED
Definition: input_internal.h:223
vlc_es_id_Hold
vlc_es_id_t * vlc_es_id_Hold(vlc_es_id_t *id)
Increase the ES track id reference count.
Definition: es_out.c:4507
input_priv
static input_thread_private_t * input_priv(input_thread_t *input)
Definition: input_internal.h:537
input_thread_private_t::p_resource
input_resource_t * p_resource
Definition: input_internal.h:522
vlc_input_event_title::list
struct vlc_input_event_title::@28::@30 list
list
module_config_t ** list
Definition: core.c:400
input_GetItem
input_item_t * input_GetItem(input_thread_t *)
Get the input item for an input thread.
Definition: input.c:247
input_state_e
input_state_e
Input state.
Definition: input_internal.h:62
name
const char name[16]
Definition: httpd.c:1268
vlc_input_event_es::fmt
const es_format_t * fmt
ES track information, can be updated after the VLC_INPUT_ES_UPDATED event.
Definition: input_internal.h:237
vlc_renderer_item_t
Definition: renderer_discovery.c:34
vlc_input_event_es::VLC_INPUT_ES_ADDED
@ VLC_INPUT_ES_ADDED
Definition: input_internal.h:220
input_CanPaceControl
bool input_CanPaceControl(input_thread_t *input)
Definition: input.c:3547
input_control_t::i_type
int i_type
Definition: input_internal.h:460
input_ExtractAttachmentAndCacheArt
void input_ExtractAttachmentAndCacheArt(input_thread_t *, const char *name)
Definition: meta.c:204
input_item_slave
Definition: vlc_input_item.h:186
vlc_cond_t
Condition variable.
Definition: vlc_threads.h:349
INPUT_CONTROL_NAV_LEFT
@ INPUT_CONTROL_NAV_LEFT
Definition: input_internal.h:574
input_thread_private_t::p_es_out
es_out_t * p_es_out
Definition: input_internal.h:495
vlc_vout_order
vlc_vout_order
vout or spu_channel order
Definition: vlc_vout.h:70
input_stats::decoded_audio
atomic_uintmax_t decoded_audio
Definition: input_internal.h:735
PLAYING_S
@ PLAYING_S
Definition: input_internal.h:68
vlc_input_event::rate
float rate
Definition: input_internal.h:269
vlc_input_event_title
Definition: input_internal.h:180
INPUT_CONTROL_SET_INITIAL_VIEWPOINT
@ INPUT_CONTROL_SET_INITIAL_VIEWPOINT
Definition: input_internal.h:586
input_thread_private_t::i_seekpoint_offset
int i_seekpoint_offset
Definition: input_internal.h:503
INPUT_CONTROL_JUMP_POSITION
@ INPUT_CONTROL_JUMP_POSITION
Definition: input_internal.h:554
input_Stopped
bool input_Stopped(input_thread_t *)
Definition: input.c:505
input_control_param_t::enabled
bool enabled
Definition: input_internal.h:454
input_stats::lost_pictures
atomic_uintmax_t lost_pictures
Definition: input_internal.h:741
input_source_t::p_slave_es_out
es_out_t * p_slave_es_out
Slave es out.
Definition: input_internal.h:378
input_control_param_t::page
unsigned page
Definition: input_internal.h:450
vlc_input_event_state::date
vlc_tick_t date
Definition: input_internal.h:158
input_source_t::b_can_stream_record
bool b_can_stream_record
Definition: input_internal.h:401
input_stats::late_pictures
atomic_uintmax_t late_pictures
Definition: input_internal.h:740
vlc_input_event_title::action
enum vlc_input_event_title::@27 action
ERROR_S
@ ERROR_S
Definition: input_internal.h:71
input_rate_t::updates
uintmax_t updates
Definition: input_internal.h:721
INPUT_EVENT_RATE
@ INPUT_EVENT_RATE
Definition: input_internal.h:86
libvlc.h
INPUT_CONTROL_SET_ES_DELAY
@ INPUT_CONTROL_SET_ES_DELAY
Definition: input_internal.h:590
vlc_viewpoint.h
INPUT_EVENT_VOUT
@ INPUT_EVENT_VOUT
Definition: input_internal.h:131
INPUT_CONTROL_SET_CATEGORY_DELAY
@ INPUT_CONTROL_SET_CATEGORY_DELAY
Definition: input_internal.h:589
INPUT_CONTROL_RESTART_ES
@ INPUT_CONTROL_RESTART_ES
Definition: input_internal.h:582
vlc_input_event_vout::vout
vout_thread_t * vout
Definition: input_internal.h:256
input_thread_t
struct input_thread_t input_thread_t
Main structure representing an input thread.
input_GetAttachments
int input_GetAttachments(input_thread_t *input, input_attachment_t ***attachments)
Definition: input.c:3500
input_source_t::b_can_rate_control
bool b_can_rate_control
Definition: input_internal.h:400
INPUT_EVENT_ITEM_EPG
@ INPUT_EVENT_ITEM_EPG
Definition: input_internal.h:117
INPUT_CONTROL_SET_POSITION
@ INPUT_CONTROL_SET_POSITION
Definition: input_internal.h:553
input_thread_private_t::normal_time
vlc_tick_t normal_time
Definition: input_internal.h:482
INPUT_CONTROL_SET_TITLE_PREV
@ INPUT_CONTROL_SET_TITLE_PREV
Definition: input_internal.h:563
input_source_t::b_can_pace_control
bool b_can_pace_control
Definition: input_internal.h:399
vout_thread_t
Video output thread descriptor.
Definition: vlc_vout.h:55
input_thread_private_t::attachment
input_attachment_t ** attachment
Definition: input_internal.h:507
vlc_input_event_signal
Definition: input_internal.h:245
INPUT_EVENT_VBI_TRANSPARENCY
@ INPUT_EVENT_VBI_TRANSPARENCY
Definition: input_internal.h:139
input_thread_t::obj
struct vlc_object_t obj
Definition: input_internal.h:52
input_thread_t
Main structure representing an input thread.
Definition: input_internal.h:48
input_control_param_t::val
vlc_value_t val
Definition: input_internal.h:418
input_control_param_t::viewpoint
vlc_viewpoint_t viewpoint
Definition: input_internal.h:419
input_item_node_t
Definition: vlc_input_item.h:194
vlc_input_event_output_clock::frame_rate_base
unsigned frame_rate_base
Definition: input_internal.h:177
input_source_GetStrId
const char * input_source_GetStrId(input_source_t *in)
Returns the string identifying this input source.
Definition: input.c:2851
input_source_t::rc
vlc_atomic_rc_t rc
Definition: input_internal.h:375
input_resource_t
Definition: resource.c:56
input_source_t::title
input_title_t ** title
Definition: input_internal.h:387
vlc_input_event_output_clock::master
bool master
Definition: input_internal.h:172
vlc_input_event_chapter::seekpoint
int seekpoint
Definition: input_internal.h:200
input_thread_private_t::b_preparsing
bool b_preparsing
Definition: input_internal.h:473
vlc_input_event_program::id
int id
Definition: input_internal.h:211
vlc_input_event_output_clock::id
vlc_es_id_t * id
Definition: input_internal.h:171
INPUT_EVENT_STATISTICS
@ INPUT_EVENT_STATISTICS
Definition: input_internal.h:120
vlc_value_t
VLC value structure.
Definition: vlc_common.h:457
sout_instance_t
Stream output instance.
Definition: stream_output.h:33
vlc_input_event::state
struct vlc_input_event_state state
Definition: input_internal.h:267
vlc_input_event_times::position
float position
Definition: input_internal.h:163
vlc_input_event::output_clock
struct vlc_input_event_output_clock output_clock
Definition: input_internal.h:275
input_thread_private_t::i_control
size_t i_control
Definition: input_internal.h:530
input_rate_t::date
vlc_tick_t date
Definition: input_internal.h:726
input_source_t::p_demux
demux_t * p_demux
Demux object (most downstream)
Definition: input_internal.h:377
vlc_atomic_rc_t
Definition: vlc_atomic.h:41
input_ControlPush
int input_ControlPush(input_thread_t *, int, const input_control_param_t *)
Definition: input.c:1532
INPUT_CONTROL_SET_TITLE_NEXT
@ INPUT_CONTROL_SET_TITLE_NEXT
Definition: input_internal.h:562
INPUT_EVENT_BOOKMARK
@ INPUT_EVENT_BOOKMARK
Definition: input_internal.h:125
vlc_input_event_program::title
const char * title
Definition: input_internal.h:213
input_control_t::param
input_control_param_t param
Definition: input_internal.h:461
input_control_param_t::delay
vlc_tick_t delay
Definition: input_internal.h:436
vlc_input_event_times
Definition: input_internal.h:161
input_Stop
void input_Stop(input_thread_t *)
Request a running input thread to stop and die.
Definition: input.c:192
INPUT_CONTROL_FIFO_SIZE
#define INPUT_CONTROL_FIFO_SIZE
Definition: input_internal.h:370
END_S
@ END_S
Definition: input_internal.h:70
input_thread_private_t::i_title_offset
int i_title_offset
Definition: input_internal.h:502
input_thread_private_t::p_es_out_display
es_out_t * p_es_out_display
Definition: input_internal.h:496
input_source_t::i_pts_delay
vlc_tick_t i_pts_delay
Definition: input_internal.h:410
vlc_input_event_state::value
input_state_e value
Definition: input_internal.h:156
input_source_t::b_rescale_ts
bool b_rescale_ts
Definition: input_internal.h:402