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,
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 percentage;
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;
257  enum vlc_vout_order order;
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 */
273  struct vlc_input_event_times times;
274  /* INPUT_EVENT_OUTPUT_CLOCK */
275  struct vlc_input_event_output_clock output_clock;
276  /* INPUT_EVENT_TITLE */
277  struct vlc_input_event_title title;
278  /* INPUT_EVENT_CHAPTER */
279  struct vlc_input_event_chapter chapter;
280  /* INPUT_EVENT_PROGRAM */
281  struct vlc_input_event_program 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 */
289  struct vlc_input_event_signal 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;
382  bool autoselect_cats[ES_CATEGORY_COUNT];
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 {
467  struct input_thread_t input;
468 
470  void *events_data;
471 
472  /* Global properties */
477 
478  /* Current state */
479  int i_state;
484  float rate;
486 
487  /* Playtime configuration and state */
488  vlc_tick_t i_start; /* :start-time,0 by default */
489  vlc_tick_t i_stop; /* :stop-time, 0 if none */
490 
491  /* Delays */
493 
494  /* Output */
495  bool b_out_pace_control; /* XXX Move it ot es_sout ? */
496  sout_instance_t *p_sout; /* Idem ? */
502 
503 
506 
507  /* Input attachment */
511 
512  /* Main input properties */
513 
514  /* Input item */
516 
517  /* Main source */
519  /* Slave sources (subs, and others) */
520  int i_slave;
523 
524  /* Resources */
526 
527  /* Stats counters */
529 
530  /* Buffer of pending actions */
533  size_t i_control;
535 
539 
541 {
542  return container_of(input, input_thread_private_t, input);
543 }
544 
545 /***************************************************************************
546  * Internal control helpers
547  ***************************************************************************/
549 {
551 
553 
556 
559 
561 
565 
569 
571 
572  INPUT_CONTROL_NAV_ACTIVATE, // NOTE: INPUT_CONTROL_NAV_* values must be
573  INPUT_CONTROL_NAV_UP, // contiguous and in the same order as
574  INPUT_CONTROL_NAV_DOWN, // INPUT_NAV_* and DEMUX_NAV_*.
579 
581  INPUT_CONTROL_SET_ES_LIST, // select a list of ES atomically
585 
586  INPUT_CONTROL_SET_VIEWPOINT, // new absolute viewpoint
587  INPUT_CONTROL_SET_INITIAL_VIEWPOINT, // set initial viewpoint (generally from video)
588  INPUT_CONTROL_UPDATE_VIEWPOINT, // update viewpoint relative to current
589 
592 
595 
597 
599 
601 
604 };
605 
606 /* Internal helpers */
607 
609 
610 /* XXX for string value you have to allocate it before calling
611  * input_ControlPushHelper
612  */
613 static inline int input_ControlPushHelper( input_thread_t *p_input, int i_type, vlc_value_t *val )
614 {
615  if( val != NULL )
616  {
617  input_control_param_t param = { .val = *val };
618  return input_ControlPush( p_input, i_type, &param );
619  }
620  else
621  {
622  return input_ControlPush( p_input, i_type, NULL );
623  }
624 }
625 
626 static inline int input_ControlPushEsHelper( input_thread_t *p_input, int i_type,
627  vlc_es_id_t *id )
628 {
629  assert( i_type == INPUT_CONTROL_SET_ES || i_type == INPUT_CONTROL_UNSET_ES ||
630  i_type == INPUT_CONTROL_RESTART_ES );
631  return input_ControlPush( p_input, i_type, &(input_control_param_t) {
632  .id = vlc_es_id_Hold( id ),
633  } );
634 }
635 
636 /**
637  * Set the list of string ids to enable for a category
638  *
639  * cf. ES_OUT_SET_ES_CAT_IDS
640  * This function can be called before start or while started.
641  */
643  const char *str_ids);
644 
645 bool input_Stopped( input_thread_t * );
646 
647 int input_GetAttachments(input_thread_t *input, input_attachment_t ***attachments);
648 
650 
651 /**
652  * Hold the input_source_t
653  */
655 
656 /**
657  * Release the input_source_t
658  */
660 
661 /**
662  * Returns the string identifying this input source
663  *
664  * @return a string id or NULL if the source is the master
665  */
666 const char *input_source_GetStrId( input_source_t *in );
667 
668 /**
669  * Get a new fmt.i_id from the input source
670  *
671  * This auto id will be relative to this input source. It allows to have stable
672  * ids across different playback instances, by not relying on the input source
673  * addition order.
674  */
676 
677 /**
678  * Returns true if a category should be auto-selected for a given source
679  */
681  enum es_format_category_e cat );
682 
683 /* Bound pts_delay */
684 #define INPUT_PTS_DELAY_MAX VLC_TICK_FROM_SEC(60)
685 
686 /**********************************************************************
687  * Item metadata
688  **********************************************************************/
689 /* input_ExtractAttachmentAndCacheArt:
690  * Be careful: p_item lock will be taken! */
692 
693 /***************************************************************************
694  * Internal prototypes
695  ***************************************************************************/
696 
697 /* var.c */
698 
700 
701 /* Subtitles */
702 int subtitles_Detect( input_thread_t *, char *, const char *, input_item_slave_t ***, int * );
703 int subtitles_Filter( const char *);
704 
705 /* meta.c */
707  const vlc_meta_t *p_meta );
708 
709 /* stats.c */
710 typedef struct input_rate_t
711 {
713  uintmax_t updates;
714  uintmax_t value;
715  struct
716  {
717  uintmax_t value;
719  } samples[2];
720 } input_rate_t;
721 
722 struct input_stats {
725  atomic_uintmax_t demux_corrupted;
726  atomic_uintmax_t demux_discontinuity;
727  atomic_uintmax_t decoded_audio;
728  atomic_uintmax_t decoded_video;
729  atomic_uintmax_t played_abuffers;
730  atomic_uintmax_t lost_abuffers;
731  atomic_uintmax_t displayed_pictures;
732  atomic_uintmax_t lost_pictures;
733 };
734 
735 struct input_stats *input_stats_Create(void);
736 void input_stats_Destroy(struct input_stats *);
737 void input_rate_Add(input_rate_t *, uintmax_t);
739 
740 #endif
Definition: vlc_input.h:160
Definition: resource.c:47
Definition: input_internal.h:65
vlc_value_t val
Definition: input_internal.h:418
int seekpoint
Definition: input_internal.h:200
vlc_es_id_t * id
Definition: input_internal.h:420
Definition: input_internal.h:598
bool viewpoint_changed
Definition: input_internal.h:500
bool forced
Only valid with VLC_INPUT_ES_SELECTED, true if the track was selected by the user.
Definition: input_internal.h:242
double f_fps
Definition: input_internal.h:403
Definition: input_internal.h:128
Definition: input_internal.h:563
const struct input_stats_t * stats
Definition: input_internal.h:287
float percentage
Definition: input_internal.h:163
Definition: input_internal.h:117
vlc_tick_t i_val
Definition: input_internal.h:427
bool b_rescale_ts
Definition: input_internal.h:402
vlc_tick_t date
Definition: input_internal.h:718
bool enabled
Definition: input_internal.h:454
vlc_tick_t system_ts
Definition: input_internal.h:173
bool is_running
Definition: input_internal.h:480
vlc_tick_t delay
Definition: input_internal.h:436
module_config_t ** list
Definition: core.c:401
Definition: input_internal.h:572
int i_slave
Definition: input_internal.h:520
atomic_uintmax_t played_abuffers
Definition: input_internal.h:729
Definition: vlc_atomic.h:38
Video picture.
Definition: vlc_picture.h:127
int i_seekpoint_start
Definition: input_internal.h:394
const es_format_t * fmt
ES track information, can be updated after the VLC_INPUT_ES_UPDATED event.
Definition: input_internal.h:237
Input byte stream modules interface.
vlc_renderer_item_t * p_renderer
Definition: input_internal.h:501
Definition: input_internal.h:562
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:77
Definition: input_internal.h:552
Demultiplexer modules interface.
Definition: vlc_es.h:55
es_out_t * p_es_out_display
Definition: input_internal.h:498
static thread_local struct @77 state
Definition: input_internal.h:557
input_thread_events_cb events_cb
Definition: input_internal.h:469
Definition: input_internal.h:67
void input_rate_Add(input_rate_t *, uintmax_t)
Update a counter element with new values.
Definition: stats.c:118
Definition: input_internal.h:142
void input_Close(input_thread_t *)
Close an input.
Definition: input.c:216
Definition: input_internal.h:588
float f_val
Definition: input_internal.h:431
Definition: vlc_input_item.h:191
Definition: input_internal.h:576
Definition: input_internal.h:218
Definition: input_internal.h:120
input_event_type_e type
Definition: input_internal.h:263
Definition: input_internal.h:554
Definition: input_internal.h:86
bool is_stopped
Definition: input_internal.h:481
int input_GetAttachments(input_thread_t *input, input_attachment_t ***attachments)
Definition: input.c:3467
input_rate_t input_bitrate
Definition: input_internal.h:723
char * str_ids
Definition: input_internal.h:441
float slave_subs_rate
Definition: input_internal.h:522
int auto_id
Definition: input_internal.h:381
Definition: input_internal.h:578
picture_t * thumbnail
Definition: input_internal.h:303
Definition: input_internal.h:69
Definition: input_internal.h:107
Definition: input_internal.h:566
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:145
int i_state
Definition: input_internal.h:479
Definition: input_internal.h:722
input_item_t * input_GetItem(input_thread_t *)
Get the input item for an input thread.
Definition: input.c:248
Definition: input_internal.h:591
vlc_tick_t ms
Definition: input_internal.h:164
atomic_uintmax_t decoded_video
Definition: input_internal.h:728
bool b_title_demux
Definition: input_internal.h:385
vlc_viewpoint_t viewpoint
Definition: input_internal.h:419
bool b_can_pause
Definition: input_internal.h:398
Private input fields.
Definition: input_internal.h:465
bool b_eof
Definition: input_internal.h:412
int i_seekpoint_offset
Definition: input_internal.h:505
int i_title
Definition: input_internal.h:386
bool vbi_transparent
Definition: input_internal.h:299
const char * title
Title of ES track, can be updated after the VLC_INPUT_ES_UPDATED event.
Definition: input_internal.h:233
vlc_tick_t i_start
Definition: input_internal.h:488
bool b_slave_sub
Definition: input_internal.h:406
bool record
Definition: input_internal.h:285
void input_ConfigVarInit(input_thread_t *)
Definition: var.c:39
struct input_thread_private_t input_thread_private_t
Private input fields.
double rate
Definition: input_internal.h:175
Definition: input_internal.h:458
VLC value structure.
Definition: vlc_common.h:455
input_attachment_t ** attachment
Definition: input_internal.h:509
vlc_mutex_t lock
Definition: input_internal.h:712
int i_title_offset
Definition: input_internal.h:504
bool b_fast_seek
Definition: input_internal.h:426
Definition: input_internal.h:573
void(* input_thread_events_cb)(input_thread_t *input, const struct vlc_input_event *event, void *userdata)
Definition: input_internal.h:307
vlc_cond_t wait_control
Definition: input_internal.h:532
input_event_type_e
Input events.
Definition: input_internal.h:78
Definition: renderer_discovery.c:34
Definition: input_internal.h:161
Definition: input_internal.h:197
es_format_category_e
ES Categories.
Definition: vlc_es.h:600
input_source_t * master
Definition: input_internal.h:518
int i_title_start
Definition: input_internal.h:392
vlc_viewpoint_t viewpoint
Definition: input_internal.h:499
Definition: input_internal.h:169
unsigned vbi_page
Definition: input_internal.h:297
Definition: input_internal.h:583
unsigned frame_rate
Definition: input_internal.h:176
Definition: input_internal.h:89
size_t selected_idx
Definition: input_internal.h:193
Definition: input_internal.h:139
Definition: input_internal.h:593
Definition: input_internal.h:183
Definition: input_internal.h:125
Definition: input_internal.h:575
vlc_interrupt_t interrupt
Definition: input_internal.h:537
Definition: input_internal.h:137
atomic_uintmax_t lost_abuffers
Definition: input_internal.h:730
Definition: input_internal.h:180
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
Definition: input_internal.h:101
bool b_low_delay
Definition: input_internal.h:492
bool input_Stopped(input_thread_t *)
Definition: input.c:512
vlc_tick_t normal_time
Definition: input_internal.h:485
Definition: vlc_es_out.h:143
Atomic operations do not require locking, but they are not very powerful.
Definition: input_internal.h:92
Definition: input_internal.h:416
float rate
Definition: input_internal.h:269
vlc_es_id_t * id
Definition: input_internal.h:171
Definition: input_internal.h:145
input_attachment_t * input_GetAttachment(input_thread_t *input, const char *name)
Definition: input.c:3492
int i_seekpoint_offset
Definition: input_internal.h:390
Definition: input_internal.h:203
bool b_recording
Definition: input_internal.h:482
float rate
Definition: input_internal.h:484
Definition: input_internal.h:590
int i_type
Definition: httpd.c:1270
Viewpoints.
Definition: vlc_viewpoint.h:41
int i_title_end
Definition: input_internal.h:393
Definition: input_internal.h:710
Thread handle.
Definition: vlc_threads.h:208
const char * input_source_GetStrId(input_source_t *in)
Returns the string identifying this input source.
Definition: input.c:2812
Definition: vlc_es.h:617
Definition: input_internal.h:113
void vlc_audio_replay_gain_MergeFromMeta(audio_replay_gain_t *p_dst, const vlc_meta_t *p_meta)
Definition: meta.c:274
int subtitles_Filter(const char *)
Definition: subtitles.c:137
bool b_can_rate_control
Definition: input_internal.h:475
void input_stats_Destroy(struct input_stats *)
Definition: stats.c:73
Definition: input_internal.h:564
Video output thread descriptor.
Definition: vlc_vout.h:60
Definition: input_internal.h:600
const demux_t ** attachment_demux
Definition: input_internal.h:510
Definition: input_internal.h:582
input_state_e value
Definition: input_internal.h:156
int i_seekpoint_end
Definition: input_internal.h:395
Mutex.
Definition: vlc_threads.h:266
float quality
Definition: input_internal.h:246
Definition: input_internal.h:223
Definition: input_internal.h:603
Definition: input_internal.h:83
static input_thread_private_t * input_priv(input_thread_t *input)
Definition: input_internal.h:540
Definition: input_internal.h:584
Definition: input_internal.h:567
int capabilities
cf.
Definition: input_internal.h:271
Definition: input_internal.h:110
void * events_data
Definition: input_internal.h:470
input_control_param_t param
Definition: input_internal.h:461
vlc_tick_t i_stop
Definition: input_internal.h:489
input_item_node_t * subitems
Definition: input_internal.h:295
Opaque structure representing an ES (Elementary Stream) track.
Definition: es_out.c:92
const char name[16]
Definition: httpd.c:1269
Definition: input_internal.h:66
void input_SetPosition(input_thread_t *, float f_position, bool b_fast)
Definition: input.c:233
struct input_stats * stats
Definition: input_internal.h:528
float subs_fps
Definition: input_internal.h:301
#define container_of(ptr, type, member)
Definition: vlc_common.h:1137
int i_attachment
Definition: input_internal.h:508
Video and audio viewpoint struct and helpers.
Definition: input_internal.h:555
Definition: input_internal.h:568
Definition: input_internal.h:560
static int input_ControlPushHelper(input_thread_t *p_input, int i_type, vlc_value_t *val)
Definition: input_internal.h:613
Definition: input_internal.h:64
Definition: input_internal.h:122
input_item_t * p_item
Definition: input_internal.h:515
vlc_vout_order
vout or spu_channel order
Definition: vlc_vout.h:78
bool b_can_pace_control
Definition: input_internal.h:476
#define VLC_API
Definition: fourcc_gen.c:31
Condition variable.
Definition: vlc_threads.h:390
sout_instance_t * p_sout
Definition: input_internal.h:496
float strength
Definition: input_internal.h:247
vlc_es_id_t ** ids
Definition: input_internal.h:423
bool input_source_IsCatAutoselected(input_source_t *in, enum es_format_category_e cat)
Returns true if a category should be auto-selected for a given source.
Definition: input.c:2822
Definition: interrupt.h:32
Main structure representing an input thread.
Definition: input_internal.h:48
stream_t definition
Definition: vlc_stream.h:46
uintmax_t value
Definition: input_internal.h:714
atomic_uintmax_t demux_discontinuity
Definition: input_internal.h:726
void input_SetEsIdDelay(input_thread_t *input, vlc_es_id_t *es_id, vlc_tick_t delay)
Set the delay of an ES identifier.
unsigned page
Definition: input_internal.h:450
Definition: input_internal.h:95
Definition: input_internal.h:550
void input_ExtractAttachmentAndCacheArt(input_thread_t *, const char *name)
Definition: meta.c:204
Definition: input_internal.h:570
static int input_ControlPushEsHelper(input_thread_t *p_input, int i_type, vlc_es_id_t *id)
Definition: input_internal.h:626
vlc_tick_t normal_time
Definition: input_internal.h:165
Definition: input_internal.h:184
Definition: input_internal.h:81
es_out_t * p_es_out
Definition: input_internal.h:497
Definition: meta.c:39
vlc_tick_t date
Definition: input_internal.h:158
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:1823
atomic_uintmax_t demux_corrupted
Definition: input_internal.h:725
bool b_thumbnailing
Definition: input_internal.h:483
void input_stats_Compute(struct input_stats *, input_stats_t *)
Definition: stats.c:78
vlc_tick_t ts
Definition: input_internal.h:174
Definition: input_internal.h:587
Definition: input_internal.h:222
vlc_es_id_t * vlc_es_id_Hold(vlc_es_id_t *id)
Increase the ES track id reference count.
Definition: es_out.c:4360
Stream output instance (FIXME: should be private to src/ to avoid invalid unsynchronized access) ...
Definition: vlc_sout.h:48
Definition: input_internal.h:261
Definition: input_internal.h:221
Definition: input_internal.h:68
Definition: vlc_input_item.h:183
int input_source_GetNewAutoId(input_source_t *in)
Get a new fmt.i_id from the input source.
Definition: input.c:2817
Definition: input_internal.h:596
struct input_stats * input_stats_Create(void)
Definition: stats.c:54
struct input_thread_t input_thread_t
Main structure representing an input thread.
const char * title
Definition: input_internal.h:213
input_source_t ** slave
Definition: input_internal.h:521
es_out_t * p_slave_es_out
Slave es out.
Definition: input_internal.h:378
int input_ControlPush(input_thread_t *, int, const input_control_param_t *)
Definition: input.c:1484
Definition: input_internal.h:558
atomic_uintmax_t lost_pictures
Definition: input_internal.h:732
struct input_rate_t input_rate_t
Definition: input_internal.h:220
Definition: vlc_input_item.h:504
void input_Stop(input_thread_t *)
Request a running input thread to stop and die.
Definition: input.c:193
int input_Start(input_thread_t *)
Start a input_thread_t created by input_Create.
Definition: input.c:168
void input_source_Release(input_source_t *in)
Release the input_source_t.
Definition: input.c:2803
Definition: input_internal.h:99
input_title_t ** title
Definition: input_internal.h:387
bool b_can_pause
Definition: input_internal.h:474
Definition: input_internal.h:105
bool b_can_pace_control
Definition: input_internal.h:399
Input thread interface.
vout_thread_t * vout
Definition: input_internal.h:256
bool b_can_stream_record
Definition: input_internal.h:401
Definition: input_internal.h:250
Definition: input_internal.h:224
bool b_out_pace_control
Definition: input_internal.h:495
bool master
Definition: input_internal.h:172
vlc_tick_t length
Definition: input_internal.h:166
input_title_t *const * array
Definition: input_internal.h:190
int title
Definition: input_internal.h:199
vlc_es_id_t * id
Definition: input_internal.h:258
Definition: input_internal.h:580
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:153
int subtitles_Detect(input_thread_t *, char *, const char *, input_item_slave_t ***, int *)
Detect subtitle files.
Definition: subtitles.c:213
Definition: input_internal.h:134
Definition: input_internal.h:205
uintmax_t updates
Definition: input_internal.h:713
atomic_uintmax_t displayed_pictures
Definition: input_internal.h:731
VLC object common members.
Definition: vlc_objects.h:43
Definition: input_internal.h:115
input_rate_t demux_bitrate
Definition: input_internal.h:724
size_t count
Definition: input_internal.h:191
input_resource_t * p_resource
Definition: input_internal.h:525
#define input_Create(a, b, c, d, e, f)
Definition: input_internal.h:318
demux_t * p_demux
Demux object (most downstream)
Definition: input_internal.h:377
bool scrambled
Definition: input_internal.h:214
float cache
Definition: input_internal.h:291
bool b_can_rate_control
Definition: input_internal.h:400
Definition: input_internal.h:594
vlc_thread_t thread
Definition: input_internal.h:536
Definition: input_internal.h:586
input_source_t * input_source_Hold(input_source_t *in)
Hold the input_source_t.
Definition: input.c:2797
Definition: input_internal.h:245
#define INPUT_CONTROL_FIFO_SIZE
Definition: input_internal.h:370
Definition: input_internal.h:581
Definition: input_internal.h:154
input_state_e
Input state.
Definition: input_internal.h:62
#define VLC_USED
Definition: fourcc_gen.c:32
unsigned frame_rate_base
Definition: input_internal.h:177
LibVLC core external API.
struct vlc_object_t obj
Definition: input_internal.h:50
bool b_preparsing
Definition: input_internal.h:473
float sub_rate
Definition: input_internal.h:407
int i_type
Definition: input_internal.h:460
Definition: input_internal.h:373
Definition: input_internal.h:574
int id
Definition: input_internal.h:211
input_control_e
Definition: input_internal.h:548
vlc_mutex_t lock_control
Definition: input_internal.h:531
vlc_tick_t i_pts_delay
Definition: input_internal.h:410
Definition: vlc_input.h:94
#define ES_CATEGORY_COUNT
Definition: vlc_es.h:608
char * str_id
Definition: input_internal.h:380
Definition: input_internal.h:602
atomic_uintmax_t decoded_audio
Definition: input_internal.h:727
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
size_t i_control
Definition: input_internal.h:533
vlc_atomic_rc_t rc
Definition: input_internal.h:375
Definition: input_internal.h:577
void input_SetTime(input_thread_t *, vlc_tick_t i_time, bool b_fast)
Definition: input.c:224
Definition: input_internal.h:131
int i_title_offset
Definition: input_internal.h:389