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