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 
98  vlc_meta_t *p_meta;
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 */
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 
109  vlc_event_manager_t event_manager;
111  vlc_mutex_t lock; /**< Lock for the item */
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 */
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 
125 #define INPUT_ITEM_URI_NOP "vlc://nop" /* dummy URI for node/directory items */
127 /* placeholder duration for items with no known duration at time of creation
128  * it may remain the duration for items like a node/directory */
129 #define INPUT_DURATION_UNSET VLC_TICK_INVALID
130 #define INPUT_DURATION_INDEFINITE (-1) /* item with a known indefinite duration (live/continuous source) */
133 {
137 };
138 
139 enum slave_type
140 {
143 };
144 
145 enum slave_priority
146 {
152 };
153 
154 /* Extensions must be in alphabetical order */
155 #define MASTER_EXTENSIONS \
156  "asf", "avi", "divx", \
157  "f4v", "flv", "m1v", \
158  "m2v", "m4v", "mkv", \
159  "mov", "mp2", "mp2v", \
160  "mp4", "mp4v", "mpe", \
161  "mpeg", "mpeg1", "mpeg2", \
162  "mpeg4", "mpg", "mpv2", \
163  "mxf", "ogv", "ogx", \
164  "ps", "vro","webm", \
165  "wmv", "wtv"
166 
167 #define SLAVE_SPU_EXTENSIONS \
168  "aqt", "ass", "cdg", \
169  "dks", "idx", "jss", \
170  "mpl2", "mpsub", "pjs", \
171  "psb", "rt", "sami", "sbv", \
172  "scc", "smi", "srt", \
173  "ssa", "stl", "sub", \
174  "tt", "ttml", "usf", \
175  "vtt", "webvtt"
176 
177 #define SLAVE_AUDIO_EXTENSIONS \
178  "aac", "ac3", "dts", \
179  "dtshd", "eac3", "flac", \
180  "m4a", "mp3", "pcm" \
181 
182 struct input_item_slave
183 {
184  enum slave_type i_type; /**< Slave type (spu, audio) */
185  enum slave_priority i_priority; /**< Slave priority */
186  bool b_forced; /**< Slave should be selected */
187  char psz_uri[]; /**< Slave mrl */
188 };
189 
190 struct input_item_node_t
191 {
192  input_item_t * p_item;
193  int i_children;
194  input_item_node_t **pp_children;
195 };
196 
197 VLC_API void input_item_CopyOptions( input_item_t *p_child, input_item_t *p_parent );
198 VLC_API void input_item_SetName( input_item_t *p_item, const char *psz_name );
199 
200 /**
201  * Start adding multiple subitems.
202  *
203  * Create a root node to hold a tree of subitems for given item
204  */
205 VLC_API input_item_node_t * input_item_node_Create( input_item_t *p_input ) VLC_USED;
206 
207 /**
208  * Add a new child node to this parent node that will point to this subitem.
209  */
210 VLC_API input_item_node_t * input_item_node_AppendItem( input_item_node_t *p_node, input_item_t *p_item );
211 
212 /**
213  * Add an already created node to children of this parent node.
214  */
216 
217 /**
218  * Remove a node from its parent.
219  */
221  input_item_node_t *child );
222 
223 /**
224  * Delete a node created with input_item_node_Create() and all its children.
225  */
227 
228 /**
229  * Option flags
230  */
232 {
233  /* Allow VLC to trust the given option.
234  * By default options are untrusted */
237  /* Add the option, unless the same option
238  * is already present. */
239  VLC_INPUT_OPTION_UNIQUE = 0x100,
240 };
241 
242 /**
243  * This function allows to add an option to an existing input_item_t.
244  */
245 VLC_API int input_item_AddOption(input_item_t *, const char *, unsigned i_flags );
246 /**
247  * This function add several options to an existing input_item_t.
248  */
249 VLC_API int input_item_AddOptions(input_item_t *, int i_options,
250  const char *const *ppsz_options,
251  unsigned i_flags );
252 VLC_API int input_item_AddOpaque(input_item_t *, const char *, void *);
253 
254 void input_item_ApplyOptions(vlc_object_t *, input_item_t *);
255 
256 VLC_API bool input_item_slave_GetType(const char *, enum slave_type *);
257 
259  enum slave_priority);
260 #define input_item_slave_Delete(p_slave) free(p_slave)
262 /**
263  * This function allows adding a slave to an existing input item.
264  * The slave is owned by the input item after this call.
265  */
266 VLC_API int input_item_AddSlave(input_item_t *, input_item_slave_t *);
267 
268 /* */
269 VLC_API bool input_item_HasErrorWhenReading( input_item_t * );
270 VLC_API void input_item_SetMeta( input_item_t *, vlc_meta_type_t meta_type, const char *psz_val );
271 VLC_API bool input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz );
272 VLC_API char * input_item_GetMeta( input_item_t *p_i, vlc_meta_type_t meta_type ) VLC_USED;
273 VLC_API const char *input_item_GetMetaLocked(input_item_t *, vlc_meta_type_t meta_type);
274 VLC_API char * input_item_GetName( input_item_t * p_i ) VLC_USED;
275 VLC_API char * input_item_GetTitleFbName( input_item_t * p_i ) VLC_USED;
276 VLC_API char * input_item_GetURI( input_item_t * p_i ) VLC_USED;
277 VLC_API char * input_item_GetNowPlayingFb( input_item_t *p_item ) VLC_USED;
278 VLC_API void input_item_SetURI( input_item_t * p_i, const char *psz_uri );
279 VLC_API vlc_tick_t input_item_GetDuration( input_item_t * p_i );
280 VLC_API void input_item_SetDuration( input_item_t * p_i, vlc_tick_t i_duration );
281 VLC_API bool input_item_IsPreparsed( input_item_t *p_i );
282 VLC_API bool input_item_IsArtFetched( input_item_t *p_i );
283 
284 #define INPUT_META( name ) \
285 static inline \
286 void input_item_Set ## name (input_item_t *p_input, const char *val) \
287 { \
288  input_item_SetMeta (p_input, vlc_meta_ ## name, val); \
289 } \
290 static inline \
291 char *input_item_Get ## name (input_item_t *p_input) \
292 { \
293  return input_item_GetMeta (p_input, vlc_meta_ ## name); \
294 }
295 
296 INPUT_META(Title)
297 INPUT_META(Artist)
298 INPUT_META(AlbumArtist)
300 INPUT_META(Copyright)
302 INPUT_META(TrackNumber)
303 INPUT_META(Description)
304 INPUT_META(Rating)
306 INPUT_META(Setting)
308 INPUT_META(Language)
309 INPUT_META(NowPlaying)
310 INPUT_META(ESNowPlaying)
311 INPUT_META(Publisher)
312 INPUT_META(EncodedBy)
313 INPUT_META(ArtworkURL)
314 INPUT_META(TrackID)
315 INPUT_META(TrackTotal)
316 INPUT_META(Director)
317 INPUT_META(Season)
318 INPUT_META(Episode)
319 INPUT_META(ShowName)
320 INPUT_META(Actors)
321 INPUT_META(DiscNumber)
322 INPUT_META(DiscTotal)
324 #define input_item_SetTrackNum input_item_SetTrackNumber
325 #define input_item_GetTrackNum input_item_GetTrackNumber
326 #define input_item_SetArtURL input_item_SetArtworkURL
327 #define input_item_GetArtURL input_item_GetArtworkURL
329 VLC_API char * input_item_GetInfo( input_item_t *p_i, const char *psz_cat,const char *psz_name ) VLC_USED;
330 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 );
331 VLC_API int input_item_DelInfo( input_item_t *p_i, const char *psz_cat, const char *psz_name );
332 VLC_API void input_item_ReplaceInfos( input_item_t *, info_category_t * );
333 VLC_API void input_item_MergeInfos( input_item_t *, info_category_t * );
334 
335 /**
336  * This function creates a new input_item_t with the provided information.
337  *
338  * XXX You may also use input_item_New, as they need less arguments.
339  */
340 VLC_API input_item_t * input_item_NewExt( const char *psz_uri,
341  const char *psz_name,
342  vlc_tick_t i_duration, enum input_item_type_e i_type,
343  enum input_item_net_type i_net ) VLC_USED;
344 
345 #define input_item_New( psz_uri, psz_name ) \
346  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_UNKNOWN, ITEM_NET_UNKNOWN )
347 
348 #define input_item_NewCard( psz_uri, psz_name ) \
349  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_INDEFINITE, ITEM_TYPE_CARD, ITEM_LOCAL )
350 
351 #define input_item_NewDisc( psz_uri, psz_name, i_duration ) \
352  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_DISC, ITEM_LOCAL )
353 
354 #define input_item_NewStream( psz_uri, psz_name, i_duration ) \
355  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_STREAM, ITEM_NET )
356 
357 #define input_item_NewDirectory( psz_uri, psz_name, i_net ) \
358  input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_DIRECTORY, i_net )
359 
360 #define input_item_NewFile( psz_uri, psz_name, i_duration, i_net ) \
361  input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_FILE, i_net )
362 
363 /**
364  * This function creates a new input_item_t as a copy of another.
365  */
366 VLC_API input_item_t * input_item_Copy(input_item_t * ) VLC_USED;
367 
368 /** Holds an input item, i.e. creates a new reference. */
369 VLC_API input_item_t *input_item_Hold(input_item_t *);
370 
371 /** Releases an input item, i.e. decrements its reference counter. */
372 VLC_API void input_item_Release(input_item_t *);
373 
374 /**
375  * Record prefix string.
376  * TODO make it configurable.
377  */
378 #define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p"
380 /**
381  * This function creates a sane filename path.
382  */
383 VLC_API char * input_item_CreateFilename( input_item_t *,
384  const char *psz_path, const char *psz_prefix,
385  const char *psz_extension ) VLC_USED;
386 
387 /**
388  * input item parser opaque structure
389  */
392 /**
393  * input item parser callbacks
394  */
395 typedef struct input_item_parser_cbs_t
396 {
397  /**
398  * Event received when the parser ends
399  *
400  * @note This callback is mandatory.
401  *
402  * @param item the parsed item
403  * @param status VLC_SUCCESS in case of success, an error otherwise
404  * @param userdata user data set by input_item_Parse()
405  */
406  void (*on_ended)(input_item_t *item, int status, void *userdata);
408  /**
409  * Event received when a new subtree is added
410  *
411  * @note This callback is optional.
412  *
413  * @param item the parsed item
414  * @param subtree sub items of the current item
415  * @param userdata user data set by input_item_Parse()
416  */
417  void (*on_subtree_added)(input_item_t *item, input_item_node_t *subtree, void *userdata);
419 
420 /**
421  * Parse an item asynchronously
422  *
423  * @note The parsing is done asynchronously. The user can call
424  * input_item_parser_id_Interrupt() before receiving the on_ended() event in
425  * order to interrupt it.
426  *
427  * @param item the item to parse
428  * @param parent the parent obj
429  * @param cbs callbacks to be notified of the end of the parsing
430  * @param userdata opaque data used by parser callbacks
431  *
432  * @return a parser instance or NULL in case of error, the parser needs to be
433  * released with input_item_parser_id_Release()
434  */
436 input_item_Parse(input_item_t *item, vlc_object_t *parent,
437  const input_item_parser_cbs_t *cbs, void *userdata) VLC_USED;
438 
439 /**
440  * Interrupts & cancels the parsing
441  *
442  * @note The parser still needs to be released with input_item_parser_id_Release
443  * afterward.
444  * @note Calling this function will cause the on_ended callback to be invoked.
445  *
446  * @param the parser to interrupt
447  */
448 VLC_API void
450 
451 /**
452  * Release (and interrupt if needed) a parser
453  *
454  * @param parser the parser returned by input_item_Parse
455  */
456 VLC_API void
458 
460 {
470 
471 /* status of the on_preparse_ended() callback */
473 {
478 };
479 
480 typedef struct input_preparser_callbacks_t {
481  void (*on_preparse_ended)(input_item_t *, enum input_item_preparse_status status, void *userdata);
482  void (*on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata);
484 
485 typedef struct input_fetcher_callbacks_t {
486  void (*on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata);
488 
489 VLC_API int libvlc_MetadataRequest( libvlc_int_t *, input_item_t *,
491  const input_preparser_callbacks_t *cbs,
492  void *cbs_userdata,
493  int, void * );
494 VLC_API int libvlc_ArtRequest(libvlc_int_t *, input_item_t *,
496  const input_fetcher_callbacks_t *cbs,
497  void *cbs_userdata );
498 VLC_API void libvlc_MetadataCancel( libvlc_int_t *, void * );
499 
500 /******************
501  * Input stats
502  ******************/
503 struct input_stats_t
504 {
505  /* Input */
506  int64_t i_read_packets;
507  int64_t i_read_bytes;
508  float f_input_bitrate;
510  /* Demux */
511  int64_t i_demux_read_packets;
512  int64_t i_demux_read_bytes;
513  float f_demux_bitrate;
514  int64_t i_demux_corrupted;
515  int64_t i_demux_discontinuity;
517  /* Decoders */
518  int64_t i_decoded_audio;
519  int64_t i_decoded_video;
521  /* Vout */
522  int64_t i_displayed_pictures;
523  int64_t i_lost_pictures;
525  /* Aout */
526  int64_t i_played_abuffers;
527  int64_t i_lost_abuffers;
528 };
529 
530 /**
531  * Access pf_readdir helper struct
532  * \see vlc_readdir_helper_init()
533  * \see vlc_readdir_helper_additem()
534  * \see vlc_readdir_helper_finish()
535  */
536 struct vlc_readdir_helper
537 {
538  input_item_node_t *p_node;
539  void **pp_slaves;
540  size_t i_slaves;
541  void **pp_dirs;
542  size_t i_dirs;
543  int i_sub_autodetect_fuzzy;
544  bool b_show_hiddenfiles;
545  bool b_flatten;
546  char *psz_ignored_exts;
547 };
548 
549 /**
550  * Init a vlc_readdir_helper struct
551  *
552  * \param p_rdh need to be cleaned with vlc_readdir_helper_finish()
553  * \param p_node node that will be used to add items
554  */
556  vlc_object_t *p_obj, input_item_node_t *p_node);
557 #define vlc_readdir_helper_init(p_rdh, p_obj, p_node) \
558  vlc_readdir_helper_init(p_rdh, VLC_OBJECT(p_obj), p_node)
559 
560 /**
561  * Finish adding items to the node
562  *
563  * \param b_success if true, items of the node will be sorted.
564  */
565 VLC_API void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success);
566 
567 /**
568  * Add a new input_item_t entry to the node of the vlc_readdir_helper struct.
569  *
570  * \param p_rdh previously inited vlc_readdir_helper struct
571  * \param psz_uri uri of the new item
572  * \param psz_flatpath flattened path of the new item. If not NULL, this
573  * function will create an input item for each sub folders (separated
574  * by '/') of psz_flatpath (so, this will un-flatten the folder
575  * hierarchy). Either psz_flatpath or psz_filename must be valid.
576  * \param psz_filename file name of the new item. If NULL, the file part of path
577  * will be used as a filename. Either psz_flatpath or psz_filename must
578  * be valid.
579  * \param i_type see \ref input_item_type_e
580  * \param i_net see \ref input_item_net_type
581  */
583  const char *psz_uri, const char *psz_flatpath,
584  const char *psz_filename,
585  int i_type, int i_net);
586 
587 #endif
Definition: vlc_input_item.h:465
int input_item_AddInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format,...)
Definition: item.c:764
input_item_preparse_status
Definition: vlc_input_item.h:473
Definition: vlc_input_item.h:152
char * psz_name
Name of this info.
Definition: vlc_input_item.h:46
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:1344
slave_type
Definition: vlc_input_item.h:140
void input_item_parser_id_Interrupt(input_item_parser_id_t *parser)
Interrupts & cancels the parsing.
Definition: item.c:1427
#define vlc_readdir_helper_init(p_rdh, p_obj, p_node)
Definition: vlc_input_item.h:558
Definition: vlc_input_item.h:65
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:1403
void input_item_SetDuration(input_item_t *p_i, vlc_tick_t i_duration)
Definition: item.c:407
Definition: vlc_input_item.h:477
Definition: item.c:41
This file defines functions and structures for stream meta-data in vlc.
Definition: vlc_input_item.h:191
struct input_fetcher_callbacks_t input_fetcher_callbacks_t
vlc_mutex_t lock
Definition: rand.c:32
Definition: vlc_input_item.h:137
Definition: vlc_input_item.h:476
Definition: vlc_input_item.h:135
Definition: vlc_input_item.h:464
Definition: vlc_events.h:114
Definition: vlc_input_item.h:64
void input_item_SetMeta(input_item_t *, vlc_meta_type_t meta_type, const char *psz_val)
Definition: item.c:137
Definition: item.c:1364
#define INPUT_META(name)
Definition: vlc_input_item.h:285
Definition: vlc_objects.h:115
Definition: vlc_input_item.h:150
slave_priority
Definition: vlc_input_item.h:146
input_item_t * input_item_Hold(input_item_t *)
Holds an input item, i.e.
Definition: item.c:468
void input_item_ApplyOptions(vlc_object_t *, input_item_t *)
Definition: item.c:595
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:1300
struct input_item_parser_cbs_t input_item_parser_cbs_t
input item parser callbacks
Definition: vlc_input_item.h:142
char * psz_value
Value of the info.
Definition: vlc_input_item.h:47
Definition: vlc_input_item.h:136
Definition: vlc_input_item.h:481
Definition: vlc_input_item.h:478
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:1270
vlc_tick_t input_item_GetDuration(input_item_t *p_i)
Definition: item.c:393
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:566
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:722
bool input_item_slave_GetType(const char *, enum slave_type *)
Definition: item.c:631
Definition: vlc_input_item.h:149
This provides convenience helpers for linked lists.
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:1280
input_item_net_type
Definition: vlc_input_item.h:133
Definition: vlc_input_item.h:61
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:499
input_item_slave_t * input_item_slave_New(const char *, enum slave_type, enum slave_priority)
Definition: item.c:662
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
bool input_item_IsArtFetched(input_item_t *p_i)
Definition: item.c:448
Definition: vlc_input_item.h:469
int i_type
Definition: httpd.c:1267
Definition: vlc_input_item.h:240
bool input_item_MetaMatch(input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz)
Definition: item.c:235
Definition: vlc_es.h:617
Definition: vlc_input_item.h:66
Definition: vlc_input_item.h:486
Definition: vlc_input_item.h:468
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:1104
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:1851
char * input_item_GetTitleFbName(input_item_t *p_i)
Definition: item.c:274
input_item_option_e
Option flags.
Definition: vlc_input_item.h:232
Definition: vlc_input_item.h:151
Mutex.
Definition: vlc_threads.h:243
void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success)
Finish adding items to the node.
Definition: item.c:1824
static void on_preparse_ended(input_item_t *media, enum input_item_preparse_status status, void *userdata)
Definition: preparse.c:92
input_item_type_e
Definition: vlc_input_item.h:59
bool input_item_IsPreparsed(input_item_t *p_i)
Definition: item.c:439
bool input_item_HasErrorWhenReading(input_item_t *)
Definition: item.c:224
This file defines functions and structures for storing dvb epg information.
int input_item_DelInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name)
Definition: item.c:787
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:475
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:680
Definition: vlc_epg.h:51
char * input_item_GetURI(input_item_t *p_i)
Definition: item.c:315
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:525
Definition: vlc_input_item.h:44
#define VLC_API
Definition: fourcc_gen.c:31
input item parser callbacks
Definition: vlc_input_item.h:396
void input_item_SetURI(input_item_t *p_i, const char *psz_uri)
Definition: item.c:325
char * input_item_GetName(input_item_t *p_i)
Definition: item.c:296
#define VLC_FORMAT(x, y)
String format function annotation.
Definition: vlc_common.h:141
void input_item_Release(input_item_t *)
Releases an input item, i.e.
Definition: item.c:476
Definition: vlc_input_item.h:148
Definition: meta.c:39
Definition: vlc_input_item.h:467
Definition: vlc_input_item.h:463
Definition: vlc_input_item.h:475
Definition: vlc_input_item.h:236
Definition: vlc_input_item.h:143
Definition: vlc_input_item.h:462
Doubly-linked list node.
Definition: vlc_list.h:43
static void on_art_fetch_ended(input_item_t *item, bool fetched, void *userdata)
Definition: preparser.c:159
int input_item_AddOpaque(input_item_t *, const char *, void *)
Definition: item.c:576
Definition: vlc_input_item.h:183
char * input_item_GetNowPlayingFb(input_item_t *p_item)
Definition: item.c:427
const char * input_item_GetMetaLocked(input_item_t *, vlc_meta_type_t meta_type)
Definition: item.c:253
Definition: vlc_input_item.h:62
Definition: vlc_input_item.h:67
Definition: vlc_input_item.h:63
Definition: vlc_input_item.h:504
Definition: vlc_input_item.h:71
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:1053
Definition: vlc_input_item.h:466
char * input_item_GetMeta(input_item_t *p_i, vlc_meta_type_t meta_type)
Definition: item.c:264
void input_item_MergeInfos(input_item_t *, info_category_t *)
Definition: item.c:841
VLC object common members.
Definition: vlc_objects.h:43
input_item_node_t * input_item_node_Create(input_item_t *p_input)
Start adding multiple subitems.
Definition: item.c:1253
input_item_meta_request_option_t
Definition: vlc_input_item.h:460
Access pf_readdir helper struct.
Definition: vlc_input_item.h:537
void input_item_CopyOptions(input_item_t *p_child, input_item_t *p_parent)
Definition: item.c:151
void input_item_ReplaceInfos(input_item_t *, info_category_t *)
Definition: item.c:823
void input_item_node_RemoveNode(input_item_node_t *parent, input_item_node_t *child)
Remove a node from its parent.
Definition: item.c:1308
#define VLC_USED
Definition: fourcc_gen.c:32
vlc_meta_type_t
Definition: vlc_meta.h:33
static void on_subtree_added(input_item_t *media, input_item_node_t *subtree, void *userdata)
Definition: preparse.c:80
void input_item_parser_id_Release(input_item_parser_id_t *parser)
Release (and interrupt if needed) a parser.
Definition: item.c:1433
struct input_preparser_callbacks_t input_preparser_callbacks_t
Definition: vlc_input_item.h:42
Definition: vlc_input_item.h:68
void input_item_SetName(input_item_t *p_item, const char *psz_name)
Definition: item.c:305
This file is the interface definition for events (implementation in src/misc/events.c)
void libvlc_MetadataCancel(libvlc_int_t *, void *)
Cancels extraction of the meta data for an input item.
Definition: libvlc.c:521