VLC  4.0.0-dev
vlc_input_item.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlc_input_item.h: Core input item
3  *****************************************************************************
4  * Copyright (C) 1999-2009 VLC authors and VideoLAN
5  *
6  * Authors: Christophe Massiot <massiot@via.ecp.fr>
7  * Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23 
24 #ifndef VLC_INPUT_ITEM_H
25 #define VLC_INPUT_ITEM_H 1
26 
27 /**
28  * \file
29  * This file defines functions, structures and enums for input items in vlc
30  */
31 
32 #include <vlc_meta.h>
33 #include <vlc_epg.h>
34 #include <vlc_events.h>
35 #include <vlc_list.h>
36 
37 #include <string.h>
38 
42 
43 struct info_t
44 {
45  char *psz_name; /**< Name of this info */
46  char *psz_value; /**< Value of the info */
47  struct vlc_list node;
48 };
49 
50 #define info_foreach(info, cat) vlc_list_foreach(info, cat, node)
51 
52 struct info_category_t
53 {
54  char *psz_name; /**< Name of this category */
55  struct vlc_list infos; /**< Infos in the category */
56 };
57 
59 {
68 
69  /* This one is not a real type but the number of input_item types. */
71 };
72 
73 /**
74  * Describes an input and is used to spawn input_thread_t objects.
75  */
76 struct input_item_t
77 {
78  char *psz_name; /**< text describing this item */
79  char *psz_uri; /**< mrl of this item */
80 
81  int i_options; /**< Number of input options */
82  char **ppsz_options; /**< Array of input options */
83  uint8_t *optflagv; /**< Some flags of input options */
84  unsigned optflagc;
85  input_item_opaque_t *opaques; /**< List of opaque pointer values */
86 
87  vlc_tick_t i_duration; /**< Duration in vlc ticks */
88 
89 
90  int i_categories; /**< Number of info categories */
91  info_category_t **pp_categories; /**< Pointer to the first info category */
92 
93  int i_es; /**< Number of es format descriptions */
94  es_format_t **es; /**< Es formats */
95 
96  input_stats_t *p_stats; /**< Statistics */
97 
99 
100  int i_epg; /**< Number of EPG entries */
101  vlc_epg_t **pp_epg; /**< EPG entries */
102  int64_t i_epg_time; /** EPG timedate as epoch time */
103  const vlc_epg_t *p_epg_table; /** running/selected program cur/next EPG table */
104 
105  int i_slaves; /**< Number of slaves */
106  input_item_slave_t **pp_slaves; /**< Slave entries that will be loaded by
107  the input_thread */
108 
110 
111  vlc_mutex_t lock; /**< Lock for the item */
112 
113  enum input_item_type_e i_type; /**< Type (file, disc, ... see input_item_type_e) */
114  bool b_net; /**< Net: always true for TYPE_STREAM, it
115  depends for others types */
116  bool b_error_when_reading;/**< Error When Reading */
117 
118  int i_preparse_depth; /**< How many level of sub items can be preparsed:
119  -1: recursive, 0: none, >0: n levels */
120 
121  bool b_preparse_interact; /**< Force interaction with the user when
122  preparsing.*/
123 
124  void *libvlc_owner; /**< LibVLC private data, can only be set
125  before events are registered. */
126 };
127 
128 #define INPUT_ITEM_URI_NOP "vlc://nop" /* dummy URI for node/directory items */
129 
130 /* placeholder duration for items with no known duration at time of creation
131  * it may remain the duration for items like a node/directory */
132 #define INPUT_DURATION_UNSET VLC_TICK_INVALID
133 #define INPUT_DURATION_INDEFINITE (-1) /* item with a known indefinite duration (live/continuous source) */
134 
136 {
140 };
141 
142 enum slave_type
143 {
145  SLAVE_TYPE_GENERIC, /* audio, video or subtitle not matched in SLAVE_SPU_EXTENSIONS */
146 };
147 
148 enum slave_priority
149 {
155 };
156 
157 /* Extensions must be in alphabetical order */
158 #define MASTER_EXTENSIONS \
159  "asf", "avi", "divx", \
160  "f4v", "flv", "m1v", \
161  "m2v", "m4v", "mkv", \
162  "mov", "mp2", "mp2v", \
163  "mp4", "mp4v", "mpe", \
164  "mpeg", "mpeg1", "mpeg2", \
165  "mpeg4", "mpg", "mpv2", \
166  "mxf", "ogv", "ogx", \
167  "ps", "vro","webm", \
168  "wmv", "wtv"
169 
170 #define SLAVE_SPU_EXTENSIONS \
171  "aqt", "ass", "cdg", \
172  "dks", "idx", "jss", \
173  "mpl2", "mpsub", "pjs", \
174  "psb", "rt", "sami", "sbv", \
175  "scc", "smi", "srt", \
176  "ssa", "stl", "sub", \
177  "tt", "ttml", "usf", \
178  "vtt", "webvtt"
179 
180 #define SLAVE_AUDIO_EXTENSIONS \
181  "aac", "ac3", "dts", \
182  "dtshd", "eac3", "flac", \
183  "m4a", "mp3", "pcm" \
184 
185 struct input_item_slave
186 {
187  enum slave_type i_type; /**< Slave type (spu, audio) */
188  enum slave_priority i_priority; /**< Slave priority */
189  bool b_forced; /**< Slave should be selected */
190  char psz_uri[]; /**< Slave mrl */
191 };
192 
193 struct input_item_node_t
194 {
198 };
199 
200 VLC_API void input_item_CopyOptions( input_item_t *p_child, input_item_t *p_parent );
201 VLC_API void input_item_SetName( input_item_t *p_item, const char *psz_name );
202 
203 /**
204  * Start adding multiple subitems.
205  *
206  * Create a root node to hold a tree of subitems for given item
207  */
209 
210 /**
211  * Add a new child node to this parent node that will point to this subitem.
212  */
214 
215 /**
216  * Add an already created node to children of this parent node.
217  */
219 
220 /**
221  * Remove a node from its parent.
222  */
224  input_item_node_t *child );
225 
226 /**
227  * Delete a node created with input_item_node_Create() and all its children.
228  */
230 
231 /**
232  * Option flags
233  */
235 {
236  /* Allow VLC to trust the given option.
237  * By default options are untrusted */
239 
240  /* Add the option, unless the same option
241  * is already present. */
242  VLC_INPUT_OPTION_UNIQUE = 0x100,
243 };
244 
245 /**
246  * This function allows to add an option to an existing input_item_t.
247  */
248 VLC_API int input_item_AddOption(input_item_t *, const char *, unsigned i_flags );
249 /**
250  * This function add several options to an existing input_item_t.
251  */
252 VLC_API int input_item_AddOptions(input_item_t *, int i_options,
253  const char *const *ppsz_options,
254  unsigned i_flags );
255 VLC_API int input_item_AddOpaque(input_item_t *, const char *, void *);
256 
258 
259 VLC_API bool input_item_slave_GetType(const char *, enum slave_type *);
260 
262  enum slave_priority);
263 #define input_item_slave_Delete(p_slave) free(p_slave)
264 
265 /**
266  * This function allows adding a slave to an existing input item.
267  * The slave is owned by the input item after this call.
268  */
270 
271 /* */
273 VLC_API void input_item_SetMeta( input_item_t *, vlc_meta_type_t meta_type, const char *psz_val );
274 VLC_API bool input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz );
281 VLC_API void input_item_SetURI( input_item_t * p_i, const char *psz_uri );
283 VLC_API void input_item_SetDuration( input_item_t * p_i, vlc_tick_t i_duration );
286 
287 #define INPUT_META( name ) \
288 static inline \
289 void input_item_Set ## name (input_item_t *p_input, const char *val) \
290 { \
291  input_item_SetMeta (p_input, vlc_meta_ ## name, val); \
292 } \
293 static inline \
294 char *input_item_Get ## name (input_item_t *p_input) \
295 { \
296  return input_item_GetMeta (p_input, vlc_meta_ ## name); \
297 }
298 
299 INPUT_META(Title)
300 INPUT_META(Artist)
301 INPUT_META(AlbumArtist)
303 INPUT_META(Copyright)
305 INPUT_META(TrackNumber)
306 INPUT_META(Description)
307 INPUT_META(Rating)
309 INPUT_META(Setting)
311 INPUT_META(Language)
312 INPUT_META(NowPlaying)
313 INPUT_META(ESNowPlaying)
314 INPUT_META(Publisher)
315 INPUT_META(EncodedBy)
316 INPUT_META(ArtworkURL)
317 INPUT_META(TrackID)
318 INPUT_META(TrackTotal)
319 INPUT_META(Director)
320 INPUT_META(Season)
321 INPUT_META(Episode)
322 INPUT_META(ShowName)
323 INPUT_META(Actors)
324 INPUT_META(DiscNumber)
325 INPUT_META(DiscTotal)
326 
327 #define input_item_SetTrackNum input_item_SetTrackNumber
328 #define input_item_GetTrackNum input_item_GetTrackNumber
329 #define input_item_SetArtURL input_item_SetArtworkURL
330 #define input_item_GetArtURL input_item_GetArtworkURL
331 
332 VLC_API char * input_item_GetInfo( input_item_t *p_i, const char *psz_cat,const char *psz_name ) VLC_USED;
333 VLC_API int input_item_AddInfo( input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format, ... ) VLC_FORMAT( 4, 5 );
334 VLC_API int input_item_DelInfo( input_item_t *p_i, const char *psz_cat, const char *psz_name );
337 
338 /**
339  * This function creates a new input_item_t with the provided information.
340  *
341  * XXX You may also use input_item_New, as they need less arguments.
342  */
343 VLC_API input_item_t * input_item_NewExt( const char *psz_uri,
344  const char *psz_name,
345  vlc_tick_t i_duration, enum input_item_type_e i_type,
346  enum input_item_net_type i_net ) VLC_USED;
347 
348 #define input_item_New( psz_uri, psz_name ) \
349  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_UNKNOWN, ITEM_NET_UNKNOWN )
350 
351 #define input_item_NewCard( psz_uri, psz_name ) \
352  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_INDEFINITE, ITEM_TYPE_CARD, ITEM_LOCAL )
353 
354 #define input_item_NewDisc( psz_uri, psz_name, i_duration ) \
355  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_DISC, ITEM_LOCAL )
356 
357 #define input_item_NewStream( psz_uri, psz_name, i_duration ) \
358  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_STREAM, ITEM_NET )
359 
360 #define input_item_NewDirectory( psz_uri, psz_name, i_net ) \
361  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_DIRECTORY, i_net )
362 
363 #define input_item_NewFile( psz_uri, psz_name, i_duration, i_net ) \
364  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_FILE, i_net )
365 
366 /**
367  * This function creates a new input_item_t as a copy of another.
368  */
370 
371 /** Holds an input item, i.e. creates a new reference. */
373 
374 /** Releases an input item, i.e. decrements its reference counter. */
376 
377 /**
378  * Record prefix string.
379  * TODO make it configurable.
380  */
381 #define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p"
382 
383 /**
384  * This function creates a sane filename path.
385  */
387  const char *psz_path, const char *psz_prefix,
388  const char *psz_extension ) VLC_USED;
389 
390 /**
391  * input item parser opaque structure
392  */
394 
395 /**
396  * input item parser callbacks
397  */
398 typedef struct input_item_parser_cbs_t
399 {
400  /**
401  * Event received when the parser ends
402  *
403  * @note This callback is mandatory.
404  *
405  * @param item the parsed item
406  * @param status VLC_SUCCESS in case of success, an error otherwise
407  * @param userdata user data set by input_item_Parse()
408  */
409  void (*on_ended)(input_item_t *item, int status, void *userdata);
410 
411  /**
412  * Event received when a new subtree is added
413  *
414  * @note This callback is optional.
415  *
416  * @param item the parsed item
417  * @param subtree sub items of the current item
418  * @param userdata user data set by input_item_Parse()
419  */
420  void (*on_subtree_added)(input_item_t *item, input_item_node_t *subtree, void *userdata);
422 
423 /**
424  * Parse an item asynchronously
425  *
426  * @note The parsing is done asynchronously. The user can call
427  * input_item_parser_id_Interrupt() before receiving the on_ended() event in
428  * order to interrupt it.
429  *
430  * @param item the item to parse
431  * @param parent the parent obj
432  * @param cbs callbacks to be notified of the end of the parsing
433  * @param userdata opaque data used by parser callbacks
434  *
435  * @return a parser instance or NULL in case of error, the parser needs to be
436  * released with input_item_parser_id_Release()
437  */
440  const input_item_parser_cbs_t *cbs, void *userdata) VLC_USED;
441 
442 /**
443  * Interrupts & cancels the parsing
444  *
445  * @note The parser still needs to be released with input_item_parser_id_Release
446  * afterward.
447  * @note Calling this function will cause the on_ended callback to be invoked.
448  *
449  * @param the parser to interrupt
450  */
451 VLC_API void
453 
454 /**
455  * Release (and interrupt if needed) a parser
456  *
457  * @param parser the parser returned by input_item_Parse
458  */
459 VLC_API void
461 
463 {
473 
474 /* status of the on_preparse_ended() callback */
476 {
481 };
482 
483 typedef struct input_preparser_callbacks_t {
484  void (*on_preparse_ended)(input_item_t *, enum input_item_preparse_status status, void *userdata);
485  void (*on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata);
487 
488 typedef struct input_fetcher_callbacks_t {
489  void (*on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata);
491 
494  const input_preparser_callbacks_t *cbs,
495  void *cbs_userdata,
496  int, void * );
499  const input_fetcher_callbacks_t *cbs,
500  void *cbs_userdata );
501 VLC_API void libvlc_MetadataCancel( libvlc_int_t *, void * );
502 
503 /******************
504  * Input stats
505  ******************/
506 struct input_stats_t
507 {
508  /* Input */
509  int64_t i_read_packets;
510  int64_t i_read_bytes;
511  float f_input_bitrate;
512 
513  /* Demux */
515  int64_t i_demux_read_bytes;
516  float f_demux_bitrate;
519 
520  /* Decoders */
522  int64_t i_decoded_video;
523 
524  /* Vout */
526  int64_t i_late_pictures;
527  int64_t i_lost_pictures;
528 
529  /* Aout */
531  int64_t i_lost_abuffers;
532 };
533 
534 /**
535  * Access pf_readdir helper struct
536  * \see vlc_readdir_helper_init()
537  * \see vlc_readdir_helper_additem()
538  * \see vlc_readdir_helper_finish()
539  */
540 struct vlc_readdir_helper
541 {
543  void **pp_slaves;
544  size_t i_slaves;
545  void **pp_dirs;
546  size_t i_dirs;
549  bool b_flatten;
551 };
552 
553 /**
554  * Init a vlc_readdir_helper struct
555  *
556  * \param p_rdh need to be cleaned with vlc_readdir_helper_finish()
557  * \param p_node node that will be used to add items
558  */
560  vlc_object_t *p_obj, input_item_node_t *p_node);
561 #define vlc_readdir_helper_init(p_rdh, p_obj, p_node) \
562  vlc_readdir_helper_init(p_rdh, VLC_OBJECT(p_obj), p_node)
563 
564 /**
565  * Finish adding items to the node
566  *
567  * \param b_success if true, items of the node will be sorted.
568  */
569 VLC_API void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success);
570 
571 /**
572  * Add a new input_item_t entry to the node of the vlc_readdir_helper struct.
573  *
574  * \param p_rdh previously inited vlc_readdir_helper struct
575  * \param psz_uri uri of the new item
576  * \param psz_flatpath flattened path of the new item. If not NULL, this
577  * function will create an input item for each sub folders (separated
578  * by '/') of psz_flatpath (so, this will un-flatten the folder
579  * hierarchy). Either psz_flatpath or psz_filename must be valid.
580  * \param psz_filename file name of the new item. If NULL, the file part of path
581  * will be used as a filename. Either psz_flatpath or psz_filename must
582  * be valid.
583  * \param i_type see \ref input_item_type_e
584  * \param i_net see \ref input_item_net_type
585  */
587  const char *psz_uri, const char *psz_flatpath,
588  const char *psz_filename,
589  int i_type, int i_net);
590 
591 #endif
input_item_GetInfo
VLC_EXPORT char * input_item_GetInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name)
Get a info item from a given category in a given input item.
Definition: item.c:694
input_item_t::event_manager
vlc_event_manager_t event_manager
Definition: vlc_input_item.h:110
VLC_API
#define VLC_API
Definition: fourcc_gen.c:31
vlc_events.h
input_item_type_e
input_item_type_e
Definition: vlc_input_item.h:59
input_item_t::p_meta
vlc_meta_t * p_meta
Definition: vlc_input_item.h:99
SLAVE_TYPE_SPU
@ SLAVE_TYPE_SPU
Definition: vlc_input_item.h:145
libvlc_ArtRequest
VLC_EXPORT int libvlc_ArtRequest(libvlc_int_t *, input_item_t *, input_item_meta_request_option_t, const input_fetcher_callbacks_t *cbs, void *cbs_userdata)
Requests retrieving/downloading art for an input item.
Definition: libvlc.c:494
ITEM_NET
@ ITEM_NET
Definition: vlc_input_item.h:139
input_fetcher_callbacks_t
Definition: vlc_input_item.h:489
input_item_Copy
VLC_EXPORT input_item_t * input_item_Copy(input_item_t *)
This function creates a new input_item_t as a copy of another.
Definition: item.c:1082
input_item_GetNowPlayingFb
VLC_EXPORT char * input_item_GetNowPlayingFb(input_item_t *p_item)
Definition: item.c:401
input_item_slave::i_priority
enum slave_priority i_priority
Slave priority.
Definition: vlc_input_item.h:189
input_item_t::optflagv
uint8_t * optflagv
Some flags of input options.
Definition: vlc_input_item.h:84
META_REQUEST_OPTION_SCOPE_NETWORK
@ META_REQUEST_OPTION_SCOPE_NETWORK
Definition: vlc_input_item.h:467
ITEM_NET_UNKNOWN
@ ITEM_NET_UNKNOWN
Definition: vlc_input_item.h:138
ITEM_TYPE_PLAYLIST
@ ITEM_TYPE_PLAYLIST
Definition: vlc_input_item.h:67
psz_name
const char * psz_name
Definition: text_style.c:53
input_item_GetDuration
VLC_EXPORT vlc_tick_t input_item_GetDuration(input_item_t *p_i)
Definition: item.c:367
input_item_t::i_categories
int i_categories
Number of info categories.
Definition: vlc_input_item.h:91
input_item_t::i_options
int i_options
Number of input options.
Definition: vlc_input_item.h:82
libvlc_int_t
Definition: vlc_objects.h:114
input_item_AddOption
VLC_EXPORT int input_item_AddOption(input_item_t *, const char *, unsigned i_flags)
This function allows to add an option to an existing input_item_t.
Definition: item.c:497
SLAVE_PRIORITY_MATCH_LEFT
@ SLAVE_PRIORITY_MATCH_LEFT
Definition: vlc_input_item.h:153
vlc_common.h
input_item_t::i_preparse_depth
int i_preparse_depth
How many level of sub items can be preparsed: -1: recursive, 0: none, >0: n levels.
Definition: vlc_input_item.h:119
META_REQUEST_OPTION_NONE
@ META_REQUEST_OPTION_NONE
Definition: vlc_input_item.h:465
input_item_MetaMatch
VLC_EXPORT bool input_item_MetaMatch(input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz)
Definition: item.c:224
vlc_epg.h
input_item_t::b_error_when_reading
bool b_error_when_reading
Error When Reading.
Definition: vlc_input_item.h:117
META_REQUEST_OPTION_SCOPE_ANY
@ META_REQUEST_OPTION_SCOPE_ANY
Definition: vlc_input_item.h:468
input_item_parser_cbs_t::on_subtree_added
void(* on_subtree_added)(input_item_t *item, input_item_node_t *subtree, void *userdata)
Event received when a new subtree is added.
Definition: vlc_input_item.h:421
info_category_t::psz_name
char * psz_name
Name of this category.
Definition: vlc_input_item.h:55
input_item_t
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:77
input_item_t::i_slaves
int i_slaves
running/selected program cur/next EPG table
Definition: vlc_input_item.h:106
input_item_parser_id_Release
VLC_EXPORT void input_item_parser_id_Release(input_item_parser_id_t *parser)
Release (and interrupt if needed) a parser.
Definition: item.c:1406
info_t::node
struct vlc_list node
Definition: vlc_input_item.h:48
input_item_opaque
Definition: item.c:41
input_item_t::i_epg
int i_epg
Number of EPG entries.
Definition: vlc_input_item.h:101
input_item_slave_New
VLC_EXPORT input_item_slave_t * input_item_slave_New(const char *, enum slave_type, enum slave_priority)
Definition: item.c:634
input_item_node_AppendNode
VLC_EXPORT void input_item_node_AppendNode(input_item_node_t *p_parent, input_item_node_t *p_child)
Add an already created node to children of this parent node.
Definition: item.c:1273
input_item_t::pp_categories
info_category_t ** pp_categories
Pointer to the first info category.
Definition: vlc_input_item.h:92
ITEM_TYPE_FILE
@ ITEM_TYPE_FILE
Definition: vlc_input_item.h:62
input_item_t::i_epg_time
int64_t i_epg_time
Definition: vlc_input_item.h:103
input_item_t::lock
vlc_mutex_t lock
Lock for the item.
Definition: vlc_input_item.h:112
SLAVE_PRIORITY_MATCH_RIGHT
@ SLAVE_PRIORITY_MATCH_RIGHT
Definition: vlc_input_item.h:152
ITEM_TYPE_NUMBER
@ ITEM_TYPE_NUMBER
Definition: vlc_input_item.h:71
input_item_t::optflagc
unsigned optflagc
Definition: vlc_input_item.h:85
input_item_node_t::pp_children
input_item_node_t ** pp_children
Definition: vlc_input_item.h:198
input_item_net_type
input_item_net_type
Definition: vlc_input_item.h:136
input_item_Parse
VLC_EXPORT input_item_parser_id_t * input_item_Parse(input_item_t *item, vlc_object_t *parent, const input_item_parser_cbs_t *cbs, void *userdata)
Parse an item asynchronously.
Definition: item.c:1376
input_item_t::i_type
enum input_item_type_e i_type
Type (file, disc, ...
Definition: vlc_input_item.h:114
input_item_GetMeta
VLC_EXPORT char * input_item_GetMeta(input_item_t *p_i, vlc_meta_type_t meta_type)
Definition: item.c:245
input_fetcher_callbacks_t
struct input_fetcher_callbacks_t input_fetcher_callbacks_t
info_category_t
Definition: vlc_input_item.h:53
SLAVE_TYPE_GENERIC
@ SLAVE_TYPE_GENERIC
Definition: vlc_input_item.h:146
input_item_parser_id_Interrupt
VLC_EXPORT void input_item_parser_id_Interrupt(input_item_parser_id_t *parser)
Interrupts & cancels the parsing.
Definition: item.c:1400
input_item_IsArtFetched
VLC_EXPORT bool input_item_IsArtFetched(input_item_t *p_i)
Definition: item.c:422
input_stats_t::i_decoded_video
int64_t i_decoded_video
Definition: vlc_input_item.h:525
input_stats_t
Definition: vlc_input_item.h:507
input_preparser_callbacks_t
struct input_preparser_callbacks_t input_preparser_callbacks_t
Definition: vlc_input_item.h:42
input_item_IsPreparsed
VLC_EXPORT bool input_item_IsPreparsed(input_item_t *p_i)
Definition: item.c:413
info_category_t::infos
struct vlc_list infos
Infos in the category.
Definition: vlc_input_item.h:56
input_stats_t::i_lost_pictures
int64_t i_lost_pictures
Definition: vlc_input_item.h:530
vlc_list
Doubly-linked list node.
Definition: vlc_list.h:43
input_stats_t::i_played_abuffers
int64_t i_played_abuffers
Definition: vlc_input_item.h:533
input_item_GetURI
VLC_EXPORT char * input_item_GetURI(input_item_t *p_i)
Definition: item.c:289
input_item_node_t::i_children
int i_children
Definition: vlc_input_item.h:197
ITEM_TYPE_CARD
@ ITEM_TYPE_CARD
Definition: vlc_input_item.h:65
libvlc_MetadataRequest
VLC_EXPORT int libvlc_MetadataRequest(libvlc_int_t *, input_item_t *, input_item_meta_request_option_t, const input_preparser_callbacks_t *cbs, void *cbs_userdata, int, void *)
Requests extraction of the meta data for an input item (a.k.a.
Definition: libvlc.c:470
input_item_SetURI
VLC_EXPORT void input_item_SetURI(input_item_t *p_i, const char *psz_uri)
Definition: item.c:299
vlc_mutex_t
Mutex.
Definition: vlc_threads.h:225
input_stats_t::f_input_bitrate
float f_input_bitrate
Definition: vlc_input_item.h:514
input_item_MergeInfos
VLC_EXPORT void input_item_MergeInfos(input_item_t *, info_category_t *)
Definition: item.c:813
vlc_meta_t
Definition: meta.c:39
ITEM_PREPARSE_FAILED
@ ITEM_PREPARSE_FAILED
Definition: vlc_input_item.h:479
SLAVE_PRIORITY_USER
@ SLAVE_PRIORITY_USER
Definition: vlc_input_item.h:155
input_item_AddSlave
VLC_EXPORT int input_item_AddSlave(input_item_t *, input_item_slave_t *)
This function allows adding a slave to an existing input item.
Definition: item.c:652
slave_priority
slave_priority
Definition: vlc_input_item.h:149
input_stats_t::f_demux_bitrate
float f_demux_bitrate
Definition: vlc_input_item.h:519
INPUT_META
#define INPUT_META(name)
Definition: vlc_input_item.h:288
input_stats_t::i_displayed_pictures
int64_t i_displayed_pictures
Definition: vlc_input_item.h:528
vlc_readdir_helper_finish
VLC_EXPORT void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success)
Finish adding items to the node.
Definition: item.c:1797
input_item_HasErrorWhenReading
VLC_EXPORT bool input_item_HasErrorWhenReading(input_item_t *)
Definition: item.c:213
slave_type
slave_type
Definition: vlc_input_item.h:143
input_item_node_Create
VLC_EXPORT input_item_node_t * input_item_node_Create(input_item_t *p_input)
Start adding multiple subitems.
Definition: item.c:1226
input_stats_t::i_demux_discontinuity
int64_t i_demux_discontinuity
Definition: vlc_input_item.h:521
input_item_SetDuration
VLC_EXPORT void input_item_SetDuration(input_item_t *p_i, vlc_tick_t i_duration)
Definition: item.c:381
i_type
int i_type
Definition: httpd.c:1269
input_item_t::psz_name
char * psz_name
text describing this item
Definition: vlc_input_item.h:79
es_format_t
Definition: vlc_es.h:618
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
input_item_Release
VLC_EXPORT void input_item_Release(input_item_t *)
Releases an input item, i.e.
Definition: item.c:450
ITEM_PREPARSE_DONE
@ ITEM_PREPARSE_DONE
Definition: vlc_input_item.h:481
vlc_readdir_helper::p_node
input_item_node_t * p_node
Definition: vlc_input_item.h:543
input_item_slave::b_forced
bool b_forced
Slave should be selected.
Definition: vlc_input_item.h:190
input_item_GetMetaLocked
const VLC_EXPORT char * input_item_GetMetaLocked(input_item_t *, vlc_meta_type_t meta_type)
Definition: item.c:237
input_item_AddOptions
VLC_EXPORT int input_item_AddOptions(input_item_t *, int i_options, const char *const *ppsz_options, unsigned i_flags)
This function add several options to an existing input_item_t.
Definition: item.c:538
input_item_ReplaceInfos
VLC_EXPORT void input_item_ReplaceInfos(input_item_t *, info_category_t *)
Definition: item.c:795
input_item_t::opaques
input_item_opaque_t * opaques
List of opaque pointer values.
Definition: vlc_input_item.h:86
input_preparser_callbacks_t
Definition: vlc_input_item.h:484
input_item_Hold
VLC_EXPORT input_item_t * input_item_Hold(input_item_t *)
Holds an input item, i.e.
Definition: item.c:442
vlc_readdir_helper::pp_slaves
void ** pp_slaves
Definition: vlc_input_item.h:544
input_item_t::b_preparse_interact
bool b_preparse_interact
Force interaction with the user when preparsing.
Definition: vlc_input_item.h:122
input_item_parser_id_t
Definition: item.c:1337
META_REQUEST_OPTION_FETCH_LOCAL
@ META_REQUEST_OPTION_FETCH_LOCAL
Definition: vlc_input_item.h:469
input_item_t::pp_slaves
input_item_slave_t ** pp_slaves
Slave entries that will be loaded by the input_thread.
Definition: vlc_input_item.h:107
input_item_meta_request_option_t
input_item_meta_request_option_t
Definition: vlc_input_item.h:463
vlc_list.h
input_stats_t::i_demux_corrupted
int64_t i_demux_corrupted
Definition: vlc_input_item.h:520
input_item_node_Delete
VLC_EXPORT void input_item_node_Delete(input_item_node_t *p_node)
Delete a node created with input_item_node_Create() and all its children.
Definition: item.c:1243
ITEM_TYPE_UNKNOWN
@ ITEM_TYPE_UNKNOWN
Definition: vlc_input_item.h:61
vlc_event_manager_t
Definition: vlc_events.h:115
META_REQUEST_OPTION_FETCH_ANY
@ META_REQUEST_OPTION_FETCH_ANY
Definition: vlc_input_item.h:471
ITEM_TYPE_DIRECTORY
@ ITEM_TYPE_DIRECTORY
Definition: vlc_input_item.h:63
vlc_readdir_helper::i_slaves
size_t i_slaves
Definition: vlc_input_item.h:545
SLAVE_PRIORITY_MATCH_ALL
@ SLAVE_PRIORITY_MATCH_ALL
Definition: vlc_input_item.h:154
input_stats_t::i_demux_read_packets
int64_t i_demux_read_packets
Definition: vlc_input_item.h:517
input_item_parser_cbs_t
input item parser callbacks
Definition: vlc_input_item.h:399
input_item_GetTitleFbName
VLC_EXPORT char * input_item_GetTitleFbName(input_item_t *p_i)
Definition: item.c:255
VLC_FORMAT
#define VLC_FORMAT(x, y)
String format function annotation.
Definition: vlc_common.h:141
input_item_node_t::p_item
input_item_t * p_item
Definition: vlc_input_item.h:196
input_item_node_RemoveNode
VLC_EXPORT void input_item_node_RemoveNode(input_item_node_t *parent, input_item_node_t *child)
Remove a node from its parent.
Definition: item.c:1281
input_item_preparse_status
input_item_preparse_status
Definition: vlc_input_item.h:476
META_REQUEST_OPTION_DO_INTERACT
@ META_REQUEST_OPTION_DO_INTERACT
Definition: vlc_input_item.h:472
VLC_INPUT_OPTION_UNIQUE
@ VLC_INPUT_OPTION_UNIQUE
Definition: vlc_input_item.h:243
input_stats_t::i_late_pictures
int64_t i_late_pictures
Definition: vlc_input_item.h:529
input_item_parser_cbs_t::on_ended
void(* on_ended)(input_item_t *item, int status, void *userdata)
Event received when the parser ends.
Definition: vlc_input_item.h:410
vlc_epg_t
Definition: vlc_epg.h:51
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
vlc_readdir_helper::i_dirs
size_t i_dirs
Definition: vlc_input_item.h:547
vlc_readdir_helper::psz_ignored_exts
char * psz_ignored_exts
Definition: vlc_input_item.h:551
input_item_GetName
VLC_EXPORT char * input_item_GetName(input_item_t *p_i)
Definition: item.c:270
info_t::psz_name
char * psz_name
Name of this info.
Definition: vlc_input_item.h:46
vlc_readdir_helper_init
#define vlc_readdir_helper_init(p_rdh, p_obj, p_node)
Definition: vlc_input_item.h:562
input_item_option_e
input_item_option_e
Option flags.
Definition: vlc_input_item.h:235
libvlc_MetadataCancel
VLC_EXPORT void libvlc_MetadataCancel(libvlc_int_t *, void *)
Cancels extraction of the meta data for an input item.
Definition: libvlc.c:516
VLC_INPUT_OPTION_TRUSTED
@ VLC_INPUT_OPTION_TRUSTED
Definition: vlc_input_item.h:239
vlc_readdir_helper::b_show_hiddenfiles
bool b_show_hiddenfiles
Definition: vlc_input_item.h:549
VLC_USED
#define VLC_USED
Definition: fourcc_gen.c:32
input_item_AddOpaque
VLC_EXPORT int input_item_AddOpaque(input_item_t *, const char *, void *)
Definition: item.c:548
ITEM_TYPE_NODE
@ ITEM_TYPE_NODE
Definition: vlc_input_item.h:68
input_item_t::b_net
bool b_net
Net: always true for TYPE_STREAM, it depends for others types.
Definition: vlc_input_item.h:115
input_item_slave::i_type
enum slave_type i_type
Slave type (spu, audio)
Definition: vlc_input_item.h:188
vlc_readdir_helper::pp_dirs
void ** pp_dirs
Definition: vlc_input_item.h:546
input_item_slave
Definition: vlc_input_item.h:186
input_item_parser_cbs_t
struct input_item_parser_cbs_t input_item_parser_cbs_t
input item parser callbacks
input_item_t::i_duration
vlc_tick_t i_duration
Duration in vlc ticks.
Definition: vlc_input_item.h:88
ITEM_PREPARSE_TIMEOUT
@ ITEM_PREPARSE_TIMEOUT
Definition: vlc_input_item.h:480
META_REQUEST_OPTION_FETCH_NETWORK
@ META_REQUEST_OPTION_FETCH_NETWORK
Definition: vlc_input_item.h:470
ITEM_PREPARSE_SKIPPED
@ ITEM_PREPARSE_SKIPPED
Definition: vlc_input_item.h:478
info_t
Definition: vlc_input_item.h:44
input_fetcher_callbacks_t::on_art_fetch_ended
void(* on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata)
Definition: vlc_input_item.h:490
input_item_ApplyOptions
void input_item_ApplyOptions(vlc_object_t *, input_item_t *)
Definition: item.c:567
input_stats_t::i_read_bytes
int64_t i_read_bytes
Definition: vlc_input_item.h:513
input_item_t::p_epg_table
const vlc_epg_t * p_epg_table
EPG timedate as epoch time.
Definition: vlc_input_item.h:104
input_item_DelInfo
VLC_EXPORT int input_item_DelInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name)
Definition: item.c:759
input_item_node_AppendItem
VLC_EXPORT input_item_node_t * input_item_node_AppendItem(input_item_node_t *p_node, input_item_t *p_item)
Add a new child node to this parent node that will point to this subitem.
Definition: item.c:1253
input_item_slave_GetType
VLC_EXPORT bool input_item_slave_GetType(const char *, enum slave_type *)
Definition: item.c:603
input_item_SetMeta
VLC_EXPORT void input_item_SetMeta(input_item_t *, vlc_meta_type_t meta_type, const char *psz_val)
Definition: item.c:128
input_item_CreateFilename
VLC_EXPORT char * input_item_CreateFilename(input_item_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension)
This function creates a sane filename path.
Definition: item.c:1317
input_item_t::pp_epg
vlc_epg_t ** pp_epg
EPG entries.
Definition: vlc_input_item.h:102
input_stats_t::i_lost_abuffers
int64_t i_lost_abuffers
Definition: vlc_input_item.h:534
ITEM_TYPE_STREAM
@ ITEM_TYPE_STREAM
Definition: vlc_input_item.h:66
SLAVE_PRIORITY_MATCH_NONE
@ SLAVE_PRIORITY_MATCH_NONE
Definition: vlc_input_item.h:151
input_item_NewExt
VLC_EXPORT input_item_t * input_item_NewExt(const char *psz_uri, const char *psz_name, vlc_tick_t i_duration, enum input_item_type_e i_type, enum input_item_net_type i_net)
This function creates a new input_item_t with the provided information.
Definition: item.c:1025
vlc_readdir_helper::i_sub_autodetect_fuzzy
int i_sub_autodetect_fuzzy
Definition: vlc_input_item.h:548
input_item_SetName
VLC_EXPORT void input_item_SetName(input_item_t *p_item, const char *psz_name)
Definition: item.c:279
vlc_readdir_helper
Access pf_readdir helper struct.
Definition: vlc_input_item.h:541
META_REQUEST_OPTION_SCOPE_LOCAL
@ META_REQUEST_OPTION_SCOPE_LOCAL
Definition: vlc_input_item.h:466
input_item_t::p_stats
input_stats_t * p_stats
Statistics.
Definition: vlc_input_item.h:97
input_item_t::libvlc_owner
void * libvlc_owner
LibVLC private data, can only be set before events are registered.
Definition: vlc_input_item.h:125
input_preparser_callbacks_t::on_preparse_ended
void(* on_preparse_ended)(input_item_t *, enum input_item_preparse_status status, void *userdata)
Definition: vlc_input_item.h:485
input_preparser_callbacks_t::on_subtree_added
void(* on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata)
Definition: vlc_input_item.h:486
vlc_meta_type_t
vlc_meta_type_t
Definition: vlc_meta.h:33
input_item_node_t
Definition: vlc_input_item.h:194
input_item_CopyOptions
VLC_EXPORT void input_item_CopyOptions(input_item_t *p_child, input_item_t *p_parent)
Definition: item.c:140
vlc_readdir_helper::b_flatten
bool b_flatten
Definition: vlc_input_item.h:550
input_stats_t::i_read_packets
int64_t i_read_packets
Definition: vlc_input_item.h:512
vlc_meta.h
input_stats_t::i_demux_read_bytes
int64_t i_demux_read_bytes
Definition: vlc_input_item.h:518
input_item_t::es
es_format_t ** es
Es formats.
Definition: vlc_input_item.h:95
ITEM_LOCAL
@ ITEM_LOCAL
Definition: vlc_input_item.h:140
input_item_AddInfo
VLC_EXPORT int input_item_AddInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format,...)
Definition: item.c:736
input_stats_t::i_decoded_audio
int64_t i_decoded_audio
Definition: vlc_input_item.h:524
vlc_readdir_helper_additem
VLC_EXPORT int vlc_readdir_helper_additem(struct vlc_readdir_helper *p_rdh, const char *psz_uri, const char *psz_flatpath, const char *psz_filename, int i_type, int i_net)
Add a new input_item_t entry to the node of the vlc_readdir_helper struct.
Definition: item.c:1824
input_item_t::i_es
int i_es
Number of es format descriptions.
Definition: vlc_input_item.h:94
input_item_t::psz_uri
char * psz_uri
mrl of this item
Definition: vlc_input_item.h:80
ITEM_TYPE_DISC
@ ITEM_TYPE_DISC
Definition: vlc_input_item.h:64
input_item_slave::psz_uri
char psz_uri[]
Slave mrl.
Definition: vlc_input_item.h:191
info_t::psz_value
char * psz_value
Value of the info.
Definition: vlc_input_item.h:47
input_item_t::ppsz_options
char ** ppsz_options
Array of input options.
Definition: vlc_input_item.h:83