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  struct vlc_list node; /**< node, to put this category in a list */
57 };
58 
59 /**
60  * Returns true if the category is hidden
61  *
62  * Infos from hidden categories should not be displayed directly by UI modules.
63  */
64 static inline bool info_category_IsHidden(info_category_t *cat)
65 {
66  return cat->psz_name[0] == '.';
67 }
68 
70 {
79 
80  /* This one is not a real type but the number of input_item types. */
82 };
83 
84 /**
85  * Describes an input and is used to spawn input_thread_t objects.
86  */
87 struct input_item_t
88 {
89  char *psz_name; /**< text describing this item */
90  char *psz_uri; /**< mrl of this item */
91 
92  int i_options; /**< Number of input options */
93  char **ppsz_options; /**< Array of input options */
94  uint8_t *optflagv; /**< Some flags of input options */
95  unsigned optflagc;
96  input_item_opaque_t *opaques; /**< List of opaque pointer values */
97 
98  vlc_tick_t i_duration; /**< Duration in vlc ticks */
99 
100 
101  struct vlc_list categories; /**< List of categories */
102 
103  int i_es; /**< Number of es format descriptions */
104  es_format_t **es; /**< Es formats */
105 
106  input_stats_t *p_stats; /**< Statistics */
107 
109 
110  int i_epg; /**< Number of EPG entries */
111  vlc_epg_t **pp_epg; /**< EPG entries */
112  int64_t i_epg_time; /** EPG timedate as epoch time */
113  const vlc_epg_t *p_epg_table; /** running/selected program cur/next EPG table */
114 
115  int i_slaves; /**< Number of slaves */
116  input_item_slave_t **pp_slaves; /**< Slave entries that will be loaded by
117  the input_thread */
118 
120 
121  vlc_mutex_t lock; /**< Lock for the item */
122 
123  enum input_item_type_e i_type; /**< Type (file, disc, ... see input_item_type_e) */
124  bool b_net; /**< Net: always true for TYPE_STREAM, it
125  depends for others types */
126  bool b_error_when_reading;/**< Error When Reading */
127 
128  int i_preparse_depth; /**< How many level of sub items can be preparsed:
129  -1: recursive, 0: none, >0: n levels */
130 
131  bool b_preparse_interact; /**< Force interaction with the user when
132  preparsing.*/
133 
134  void *libvlc_owner; /**< LibVLC private data, can only be set
135  before events are registered. */
136 };
137 
138 #define INPUT_ITEM_URI_NOP "vlc://nop" /* dummy URI for node/directory items */
139 
140 /* placeholder duration for items with no known duration at time of creation
141  * it may remain the duration for items like a node/directory */
142 #define INPUT_DURATION_UNSET VLC_TICK_INVALID
143 #define INPUT_DURATION_INDEFINITE (-1) /* item with a known indefinite duration (live/continuous source) */
144 
146 {
150 };
151 
152 enum slave_type
153 {
155  SLAVE_TYPE_GENERIC, /* audio, video or subtitle not matched in SLAVE_SPU_EXTENSIONS */
156 };
157 
158 enum slave_priority
159 {
165 };
166 
167 /* Extensions must be in alphabetical order */
168 #define MASTER_EXTENSIONS \
169  "asf", "avi", "divx", \
170  "f4v", "flv", "m1v", \
171  "m2v", "m4v", "mkv", \
172  "mov", "mp2", "mp2v", \
173  "mp4", "mp4v", "mpe", \
174  "mpeg", "mpeg1", "mpeg2", \
175  "mpeg4", "mpg", "mpv2", \
176  "mxf", "ogv", "ogx", \
177  "ps", "vro","webm", \
178  "wmv", "wtv"
179 
180 #define SLAVE_SPU_EXTENSIONS \
181  "aqt", "ass", "cdg", \
182  "dks", "idx", "jss", \
183  "mpl2", "mpsub", "pjs", \
184  "psb", "rt", "sami", "sbv", \
185  "scc", "smi", "srt", \
186  "ssa", "stl", "sub", \
187  "tt", "ttml", "usf", \
188  "vtt", "webvtt"
189 
190 #define SLAVE_AUDIO_EXTENSIONS \
191  "aac", "ac3", "dts", \
192  "dtshd", "eac3", "flac", \
193  "m4a", "mp3", "pcm" \
194 
195 struct input_item_slave
196 {
197  enum slave_type i_type; /**< Slave type (spu, audio) */
198  enum slave_priority i_priority; /**< Slave priority */
199  bool b_forced; /**< Slave should be selected */
200  char psz_uri[]; /**< Slave mrl */
201 };
202 
203 struct input_item_node_t
204 {
208 };
209 
210 VLC_API void input_item_CopyOptions( input_item_t *p_child, input_item_t *p_parent );
211 VLC_API void input_item_SetName( input_item_t *p_item, const char *psz_name );
212 
213 /**
214  * Start adding multiple subitems.
215  *
216  * Create a root node to hold a tree of subitems for given item
217  */
219 
220 /**
221  * Add a new child node to this parent node that will point to this subitem.
222  */
224 
225 /**
226  * Add an already created node to children of this parent node.
227  */
229 
230 /**
231  * Remove a node from its parent.
232  */
234  input_item_node_t *child );
235 
236 /**
237  * Delete a node created with input_item_node_Create() and all its children.
238  */
240 
241 /**
242  * Option flags
243  */
245 {
246  /* Allow VLC to trust the given option.
247  * By default options are untrusted */
249 
250  /* Add the option, unless the same option
251  * is already present. */
252  VLC_INPUT_OPTION_UNIQUE = 0x100,
253 };
254 
255 /**
256  * This function allows to add an option to an existing input_item_t.
257  */
258 VLC_API int input_item_AddOption(input_item_t *, const char *, unsigned i_flags );
259 /**
260  * This function add several options to an existing input_item_t.
261  */
262 VLC_API int input_item_AddOptions(input_item_t *, int i_options,
263  const char *const *ppsz_options,
264  unsigned i_flags );
265 VLC_API int input_item_AddOpaque(input_item_t *, const char *, void *);
266 
268 
269 VLC_API bool input_item_slave_GetType(const char *, enum slave_type *);
270 
272  enum slave_priority);
273 #define input_item_slave_Delete(p_slave) free(p_slave)
274 
275 /**
276  * This function allows adding a slave to an existing input item.
277  * The slave is owned by the input item after this call.
278  */
280 
281 /* */
283 VLC_API void input_item_SetMeta( input_item_t *, vlc_meta_type_t meta_type, const char *psz_val );
284 VLC_API bool input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz );
291 VLC_API void input_item_SetURI( input_item_t * p_i, const char *psz_uri );
293 VLC_API void input_item_SetDuration( input_item_t * p_i, vlc_tick_t i_duration );
296 
297 #define INPUT_META( name ) \
298 static inline \
299 void input_item_Set ## name (input_item_t *p_input, const char *val) \
300 { \
301  input_item_SetMeta (p_input, vlc_meta_ ## name, val); \
302 } \
303 static inline \
304 char *input_item_Get ## name (input_item_t *p_input) \
305 { \
306  return input_item_GetMeta (p_input, vlc_meta_ ## name); \
307 }
308 
309 INPUT_META(Title)
310 INPUT_META(Artist)
311 INPUT_META(AlbumArtist)
313 INPUT_META(Copyright)
315 INPUT_META(TrackNumber)
316 INPUT_META(Description)
317 INPUT_META(Rating)
319 INPUT_META(Setting)
321 INPUT_META(Language)
322 INPUT_META(NowPlaying)
323 INPUT_META(ESNowPlaying)
324 INPUT_META(Publisher)
325 INPUT_META(EncodedBy)
326 INPUT_META(ArtworkURL)
327 INPUT_META(TrackID)
328 INPUT_META(TrackTotal)
329 INPUT_META(Director)
330 INPUT_META(Season)
331 INPUT_META(Episode)
332 INPUT_META(ShowName)
333 INPUT_META(Actors)
334 INPUT_META(DiscNumber)
335 INPUT_META(DiscTotal)
336 
337 #define input_item_SetTrackNum input_item_SetTrackNumber
338 #define input_item_GetTrackNum input_item_GetTrackNumber
339 #define input_item_SetArtURL input_item_SetArtworkURL
340 #define input_item_GetArtURL input_item_GetArtworkURL
341 
342 VLC_API char * input_item_GetInfo( input_item_t *p_i, const char *psz_cat,const char *psz_name ) VLC_USED;
343 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 );
344 VLC_API int input_item_DelInfo( input_item_t *p_i, const char *psz_cat, const char *psz_name );
347 
348 #define input_item_AddStat(item, type, value) \
349  input_item_AddInfo(item, ".stat", type, "%" PRIu64, (uint64_t) value)
350 
351 /**
352  * This function creates a new input_item_t with the provided information.
353  *
354  * XXX You may also use input_item_New, as they need less arguments.
355  */
356 VLC_API input_item_t * input_item_NewExt( const char *psz_uri,
357  const char *psz_name,
358  vlc_tick_t i_duration, enum input_item_type_e i_type,
359  enum input_item_net_type i_net ) VLC_USED;
360 
361 #define input_item_New( psz_uri, psz_name ) \
362  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_UNKNOWN, ITEM_NET_UNKNOWN )
363 
364 #define input_item_NewCard( psz_uri, psz_name ) \
365  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_INDEFINITE, ITEM_TYPE_CARD, ITEM_LOCAL )
366 
367 #define input_item_NewDisc( psz_uri, psz_name, i_duration ) \
368  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_DISC, ITEM_LOCAL )
369 
370 #define input_item_NewStream( psz_uri, psz_name, i_duration ) \
371  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_STREAM, ITEM_NET )
372 
373 #define input_item_NewDirectory( psz_uri, psz_name, i_net ) \
374  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_DIRECTORY, i_net )
375 
376 #define input_item_NewFile( psz_uri, psz_name, i_duration, i_net ) \
377  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_FILE, i_net )
378 
379 /**
380  * This function creates a new input_item_t as a copy of another.
381  */
383 
384 /** Holds an input item, i.e. creates a new reference. */
386 
387 /** Releases an input item, i.e. decrements its reference counter. */
389 
390 /**
391  * Record prefix string.
392  * TODO make it configurable.
393  */
394 #define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p"
395 
396 /**
397  * This function creates a sane filename path.
398  */
400  const char *psz_path, const char *psz_prefix,
401  const char *psz_extension ) VLC_USED;
402 
403 /**
404  * input item parser opaque structure
405  */
407 
408 /**
409  * input item parser callbacks
410  */
411 typedef struct input_item_parser_cbs_t
412 {
413  /**
414  * Event received when the parser ends
415  *
416  * @note This callback is mandatory.
417  *
418  * @param item the parsed item
419  * @param status VLC_SUCCESS in case of success, an error otherwise
420  * @param userdata user data set by input_item_Parse()
421  */
422  void (*on_ended)(input_item_t *item, int status, void *userdata);
423 
424  /**
425  * Event received when a new subtree is added
426  *
427  * @note This callback is optional.
428  *
429  * @param item the parsed item
430  * @param subtree sub items of the current item
431  * @param userdata user data set by input_item_Parse()
432  */
433  void (*on_subtree_added)(input_item_t *item, input_item_node_t *subtree, void *userdata);
435 
436 /**
437  * Parse an item asynchronously
438  *
439  * @note The parsing is done asynchronously. The user can call
440  * input_item_parser_id_Interrupt() before receiving the on_ended() event in
441  * order to interrupt it.
442  *
443  * @param item the item to parse
444  * @param parent the parent obj
445  * @param cbs callbacks to be notified of the end of the parsing
446  * @param userdata opaque data used by parser callbacks
447  *
448  * @return a parser instance or NULL in case of error, the parser needs to be
449  * released with input_item_parser_id_Release()
450  */
453  const input_item_parser_cbs_t *cbs, void *userdata) VLC_USED;
454 
455 /**
456  * Interrupts & cancels the parsing
457  *
458  * @note The parser still needs to be released with input_item_parser_id_Release
459  * afterward.
460  * @note Calling this function will cause the on_ended callback to be invoked.
461  *
462  * @param parser the parser to interrupt
463  */
464 VLC_API void
466 
467 /**
468  * Release (and interrupt if needed) a parser
469  *
470  * @param parser the parser returned by input_item_Parse
471  */
472 VLC_API void
474 
476 {
486 
487 /* status of the on_preparse_ended() callback */
489 {
494 };
495 
496 typedef struct input_preparser_callbacks_t {
497  void (*on_preparse_ended)(input_item_t *, enum input_item_preparse_status status, void *userdata);
498  void (*on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata);
500 
501 typedef struct input_fetcher_callbacks_t {
502  void (*on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata);
504 
507  const input_preparser_callbacks_t *cbs,
508  void *cbs_userdata,
509  int, void * );
512  const input_fetcher_callbacks_t *cbs,
513  void *cbs_userdata );
514 VLC_API void libvlc_MetadataCancel( libvlc_int_t *, void * );
515 
516 /******************
517  * Input stats
518  ******************/
519 struct input_stats_t
520 {
521  /* Input */
522  int64_t i_read_packets;
523  int64_t i_read_bytes;
525 
526  /* Demux */
527  int64_t i_demux_read_packets;
532 
533  /* Decoders */
534  int64_t i_decoded_audio;
536 
537  /* Vout */
538  int64_t i_displayed_pictures;
541 
542  /* Aout */
543  int64_t i_played_abuffers;
545 };
546 
547 /**
548  * Access pf_readdir helper struct
549  * \see vlc_readdir_helper_init()
550  * \see vlc_readdir_helper_additem()
551  * \see vlc_readdir_helper_finish()
552  */
553 struct vlc_readdir_helper
554 {
556  void **pp_slaves;
557  size_t i_slaves;
558  void **pp_dirs;
559  size_t i_dirs;
562  bool b_flatten;
564 };
565 
566 /**
567  * Init a vlc_readdir_helper struct
568  *
569  * \param p_rdh need to be cleaned with vlc_readdir_helper_finish()
570  * \param p_node node that will be used to add items
571  */
573  vlc_object_t *p_obj, input_item_node_t *p_node);
574 #define vlc_readdir_helper_init(p_rdh, p_obj, p_node) \
575  vlc_readdir_helper_init(p_rdh, VLC_OBJECT(p_obj), p_node)
576 
577 /**
578  * Finish adding items to the node
579  *
580  * \param b_success if true, items of the node will be sorted.
581  */
582 VLC_API void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success);
583 
584 /**
585  * Add a new input_item_t entry to the node of the vlc_readdir_helper struct.
586  *
587  * \param p_rdh previously inited vlc_readdir_helper struct
588  * \param psz_uri uri of the new item
589  * \param psz_flatpath flattened path of the new item. If not NULL, this
590  * function will create an input item for each sub folders (separated
591  * by '/') of psz_flatpath (so, this will un-flatten the folder
592  * hierarchy). Either psz_flatpath or psz_filename must be valid.
593  * \param psz_filename file name of the new item. If NULL, the file part of path
594  * will be used as a filename. Either psz_flatpath or psz_filename must
595  * be valid.
596  * \param i_type see \ref input_item_type_e
597  * \param i_net see \ref input_item_net_type
598  * \param[out] created_item if an input item is created. The item should not be
599  * released and is valid until vlc_readdir_helper_finish() is called.
600  * \param status VLC_SUCCESS in case of success, an error otherwise. Parsing
601  * should be aborted in case of error.
602  */
604  const char *psz_uri, const char *psz_flatpath,
605  const char *psz_filename,
606  int i_type, int i_net, input_item_t **created_item);
607 
608 #endif
#define VLC_USED
Definition: fourcc_gen.c:32
#define VLC_API
Definition: fourcc_gen.c:31
#define VLC_FORMAT(x, y)
String format function annotation.
Definition: vlc_common.h:211
int i_type
Definition: httpd.c:1268
Definition: vlc_es.h:688
Definition: vlc_input_item.h:54
struct vlc_list node
node, to put this category in a list
Definition: vlc_input_item.h:57
char * psz_name
Name of this category.
Definition: vlc_input_item.h:55
struct vlc_list infos
Infos in the category.
Definition: vlc_input_item.h:56
Definition: vlc_input_item.h:45
struct vlc_list node
Definition: vlc_input_item.h:48
char * psz_value
Value of the info.
Definition: vlc_input_item.h:47
char * psz_name
Name of this info.
Definition: vlc_input_item.h:46
Definition: vlc_input_item.h:502
void(* on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata)
Definition: vlc_input_item.h:503
Definition: vlc_input_item.h:205
int i_children
Definition: vlc_input_item.h:207
input_item_node_t ** pp_children
Definition: vlc_input_item.h:208
input_item_t * p_item
Definition: vlc_input_item.h:206
Definition: item.c:42
input item parser callbacks
Definition: vlc_input_item.h:413
void(* on_ended)(input_item_t *item, int status, void *userdata)
Event received when the parser ends.
Definition: vlc_input_item.h:423
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:434
Definition: item.c:1333
Definition: vlc_input_item.h:197
enum slave_priority i_priority
Slave priority.
Definition: vlc_input_item.h:199
bool b_forced
Slave should be selected.
Definition: vlc_input_item.h:200
char psz_uri[]
Slave mrl.
Definition: vlc_input_item.h:201
enum slave_type i_type
Slave type (spu, audio)
Definition: vlc_input_item.h:198
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:89
bool b_error_when_reading
Error When Reading.
Definition: vlc_input_item.h:127
int64_t i_epg_time
Definition: vlc_input_item.h:113
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:129
input_item_opaque_t * opaques
List of opaque pointer values.
Definition: vlc_input_item.h:97
input_item_slave_t ** pp_slaves
Slave entries that will be loaded by the input_thread.
Definition: vlc_input_item.h:117
int i_options
Number of input options.
Definition: vlc_input_item.h:93
int i_slaves
running/selected program cur/next EPG table
Definition: vlc_input_item.h:116
int i_epg
Number of EPG entries.
Definition: vlc_input_item.h:111
uint8_t * optflagv
Some flags of input options.
Definition: vlc_input_item.h:95
vlc_epg_t ** pp_epg
EPG entries.
Definition: vlc_input_item.h:112
int i_es
Number of es format descriptions.
Definition: vlc_input_item.h:104
void * libvlc_owner
LibVLC private data, can only be set before events are registered.
Definition: vlc_input_item.h:135
unsigned optflagc
Definition: vlc_input_item.h:96
vlc_mutex_t lock
Lock for the item.
Definition: vlc_input_item.h:122
vlc_tick_t i_duration
Duration in vlc ticks.
Definition: vlc_input_item.h:99
vlc_event_manager_t event_manager
Definition: vlc_input_item.h:120
enum input_item_type_e i_type
Type (file, disc, ...
Definition: vlc_input_item.h:124
input_stats_t * p_stats
Statistics.
Definition: vlc_input_item.h:107
char * psz_uri
mrl of this item
Definition: vlc_input_item.h:91
const vlc_epg_t * p_epg_table
EPG timedate as epoch time.
Definition: vlc_input_item.h:114
struct vlc_list categories
List of categories.
Definition: vlc_input_item.h:102
es_format_t ** es
Es formats.
Definition: vlc_input_item.h:105
vlc_meta_t * p_meta
Definition: vlc_input_item.h:109
char ** ppsz_options
Array of input options.
Definition: vlc_input_item.h:94
char * psz_name
text describing this item
Definition: vlc_input_item.h:90
bool b_net
Net: always true for TYPE_STREAM, it depends for others types.
Definition: vlc_input_item.h:125
bool b_preparse_interact
Force interaction with the user when preparsing.
Definition: vlc_input_item.h:132
Definition: vlc_input_item.h:497
void(* on_preparse_ended)(input_item_t *, enum input_item_preparse_status status, void *userdata)
Definition: vlc_input_item.h:498
void(* on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata)
Definition: vlc_input_item.h:499
Definition: vlc_input_item.h:521
int64_t i_read_bytes
Definition: vlc_input_item.h:524
int64_t i_lost_pictures
Definition: vlc_input_item.h:541
int64_t i_demux_discontinuity
Definition: vlc_input_item.h:532
int64_t i_displayed_pictures
Definition: vlc_input_item.h:539
int64_t i_demux_corrupted
Definition: vlc_input_item.h:531
float f_input_bitrate
Definition: vlc_input_item.h:525
int64_t i_demux_read_packets
Definition: vlc_input_item.h:528
int64_t i_decoded_audio
Definition: vlc_input_item.h:535
int64_t i_demux_read_bytes
Definition: vlc_input_item.h:529
int64_t i_lost_abuffers
Definition: vlc_input_item.h:545
int64_t i_late_pictures
Definition: vlc_input_item.h:540
float f_demux_bitrate
Definition: vlc_input_item.h:530
int64_t i_decoded_video
Definition: vlc_input_item.h:536
int64_t i_read_packets
Definition: vlc_input_item.h:523
int64_t i_played_abuffers
Definition: vlc_input_item.h:544
Definition: vlc_objects.h:91
Definition: vlc_epg.h:52
Definition: vlc_events.h:116
Doubly-linked list node.
Definition: vlc_list.h:44
Definition: meta.c:40
Mutex.
Definition: vlc_threads.h:193
VLC object common members.
Definition: vlc_objects.h:45
Access pf_readdir helper struct.
Definition: vlc_input_item.h:555
char * psz_ignored_exts
Definition: vlc_input_item.h:564
void ** pp_slaves
Definition: vlc_input_item.h:557
input_item_node_t * p_node
Definition: vlc_input_item.h:556
bool b_flatten
Definition: vlc_input_item.h:563
int i_sub_autodetect_fuzzy
Definition: vlc_input_item.h:561
bool b_show_hiddenfiles
Definition: vlc_input_item.h:562
size_t i_slaves
Definition: vlc_input_item.h:558
size_t i_dirs
Definition: vlc_input_item.h:560
void ** pp_dirs
Definition: vlc_input_item.h:559
const char * psz_name
Definition: text_style.c:33
This file defines functions and structures for storing dvb epg information.
This file is the interface definition for events (implementation in src/misc/events....
input_item_t * input_item_Copy(input_item_t *) VLC_USED
This function creates a new input_item_t as a copy of another.
Definition: item.c:1079
input_item_node_t * input_item_node_Create(input_item_t *p_input) VLC_USED
Start adding multiple subitems.
Definition: item.c:1221
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:1268
void input_item_parser_id_Release(input_item_parser_id_t *parser)
Release (and interrupt if needed) a parser.
Definition: item.c:1401
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) VLC_USED
Parse an item asynchronously.
Definition: item.c:1371
void input_item_node_RemoveNode(input_item_node_t *parent, input_item_node_t *child)
Remove a node from its parent.
Definition: item.c:1276
#define INPUT_META(name)
Definition: vlc_input_item.h:298
void input_item_Release(input_item_t *)
Releases an input item, i.e.
Definition: item.c:450
slave_type
Definition: vlc_input_item.h:154
@ SLAVE_TYPE_GENERIC
Definition: vlc_input_item.h:156
@ SLAVE_TYPE_SPU
Definition: vlc_input_item.h:155
bool input_item_MetaMatch(input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz)
Definition: item.c:224
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:474
void input_item_MergeInfos(input_item_t *, info_category_t *)
Definition: item.c:810
char * input_item_GetInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name) VLC_USED
Get a info item from a given category in a given input item.
Definition: item.c:692
int input_item_AddOpaque(input_item_t *, const char *, void *)
Definition: item.c:548
void input_item_SetName(input_item_t *p_item, const char *psz_name)
Definition: item.c:279
vlc_tick_t input_item_GetDuration(input_item_t *p_i)
Definition: item.c:367
void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success)
Finish adding items to the node.
Definition: item.c:1792
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:498
char * input_item_GetMeta(input_item_t *p_i, vlc_meta_type_t meta_type) VLC_USED
Definition: item.c:245
const char * input_item_GetMetaLocked(input_item_t *, vlc_meta_type_t meta_type)
Definition: item.c:237
input_item_preparse_status
Definition: vlc_input_item.h:490
@ ITEM_PREPARSE_FAILED
Definition: vlc_input_item.h:492
@ ITEM_PREPARSE_TIMEOUT
Definition: vlc_input_item.h:493
@ ITEM_PREPARSE_DONE
Definition: vlc_input_item.h:494
@ ITEM_PREPARSE_SKIPPED
Definition: vlc_input_item.h:491
#define vlc_readdir_helper_init(p_rdh, p_obj, p_node)
Definition: vlc_input_item.h:575
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:1248
int input_item_AddInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format,...)
Definition: item.c:734
input_item_option_e
Option flags.
Definition: vlc_input_item.h:246
@ VLC_INPUT_OPTION_UNIQUE
Definition: vlc_input_item.h:253
@ VLC_INPUT_OPTION_TRUSTED
Definition: vlc_input_item.h:249
char * input_item_GetURI(input_item_t *p_i) VLC_USED
Definition: item.c:289
void input_item_SetURI(input_item_t *p_i, const char *psz_uri)
Definition: item.c:299
bool input_item_IsPreparsed(input_item_t *p_i)
Definition: item.c:413
int input_item_DelInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name)
Definition: item.c:757
void libvlc_MetadataCancel(libvlc_int_t *, void *)
Cancels extraction of the meta data for an input item.
Definition: libvlc.c:520
void input_item_parser_id_Interrupt(input_item_parser_id_t *parser)
Interrupts & cancels the parsing.
Definition: item.c:1395
void input_item_SetMeta(input_item_t *, vlc_meta_type_t meta_type, const char *psz_val)
Definition: item.c:128
bool input_item_HasErrorWhenReading(input_item_t *)
Definition: item.c:213
input_item_slave_t * input_item_slave_New(const char *, enum slave_type, enum slave_priority)
Definition: item.c:634
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) VLC_USED
This function creates a new input_item_t with the provided information.
Definition: item.c:1022
char * input_item_CreateFilename(input_item_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension) VLC_USED
This function creates a sane filename path.
Definition: item.c:1312
char * input_item_GetName(input_item_t *p_i) VLC_USED
Definition: item.c:270
struct input_item_parser_cbs_t input_item_parser_cbs_t
input item parser callbacks
void input_item_ApplyOptions(vlc_object_t *, input_item_t *)
Definition: item.c:567
input_item_net_type
Definition: vlc_input_item.h:147
@ ITEM_NET_UNKNOWN
Definition: vlc_input_item.h:148
@ ITEM_NET
Definition: vlc_input_item.h:149
@ ITEM_LOCAL
Definition: vlc_input_item.h:150
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
bool input_item_IsArtFetched(input_item_t *p_i)
Definition: item.c:422
bool input_item_slave_GetType(const char *, enum slave_type *)
Definition: item.c:603
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, input_item_t **created_item)
Add a new input_item_t entry to the node of the vlc_readdir_helper struct.
input_item_t * input_item_Hold(input_item_t *)
Holds an input item, i.e.
Definition: item.c:442
void input_item_SetDuration(input_item_t *p_i, vlc_tick_t i_duration)
Definition: item.c:381
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
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:1238
input_item_meta_request_option_t
Definition: vlc_input_item.h:477
@ META_REQUEST_OPTION_FETCH_LOCAL
Definition: vlc_input_item.h:482
@ META_REQUEST_OPTION_NONE
Definition: vlc_input_item.h:478
@ META_REQUEST_OPTION_SCOPE_ANY
Definition: vlc_input_item.h:481
@ META_REQUEST_OPTION_SCOPE_NETWORK
Definition: vlc_input_item.h:480
@ META_REQUEST_OPTION_FETCH_ANY
Definition: vlc_input_item.h:484
@ META_REQUEST_OPTION_DO_INTERACT
Definition: vlc_input_item.h:485
@ META_REQUEST_OPTION_SCOPE_LOCAL
Definition: vlc_input_item.h:479
@ META_REQUEST_OPTION_FETCH_NETWORK
Definition: vlc_input_item.h:483
slave_priority
Definition: vlc_input_item.h:160
@ SLAVE_PRIORITY_USER
Definition: vlc_input_item.h:165
@ SLAVE_PRIORITY_MATCH_LEFT
Definition: vlc_input_item.h:163
@ SLAVE_PRIORITY_MATCH_ALL
Definition: vlc_input_item.h:164
@ SLAVE_PRIORITY_MATCH_RIGHT
Definition: vlc_input_item.h:162
@ SLAVE_PRIORITY_MATCH_NONE
Definition: vlc_input_item.h:161
struct input_preparser_callbacks_t input_preparser_callbacks_t
Definition: vlc_input_item.h:42
char * input_item_GetTitleFbName(input_item_t *p_i) VLC_USED
Definition: item.c:255
void input_item_ReplaceInfos(input_item_t *, info_category_t *)
Definition: item.c:792
struct input_fetcher_callbacks_t input_fetcher_callbacks_t
static bool info_category_IsHidden(info_category_t *cat)
Returns true if the category is hidden.
Definition: vlc_input_item.h:65
char * input_item_GetNowPlayingFb(input_item_t *p_item) VLC_USED
Definition: item.c:401
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
input_item_type_e
Definition: vlc_input_item.h:71
@ ITEM_TYPE_NODE
Definition: vlc_input_item.h:79
@ ITEM_TYPE_DISC
Definition: vlc_input_item.h:75
@ ITEM_TYPE_NUMBER
Definition: vlc_input_item.h:82
@ ITEM_TYPE_DIRECTORY
Definition: vlc_input_item.h:74
@ ITEM_TYPE_FILE
Definition: vlc_input_item.h:73
@ ITEM_TYPE_STREAM
Definition: vlc_input_item.h:77
@ ITEM_TYPE_UNKNOWN
Definition: vlc_input_item.h:72
@ ITEM_TYPE_PLAYLIST
Definition: vlc_input_item.h:78
@ ITEM_TYPE_CARD
Definition: vlc_input_item.h:76
void input_item_CopyOptions(input_item_t *p_child, input_item_t *p_parent)
Definition: item.c:140
This provides convenience helpers for linked lists.
This file defines functions and structures for stream meta-data in vlc.
vlc_meta_type_t
Definition: vlc_meta.h:34
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:35