VLC 4.0.0-dev
Loading...
Searching...
No Matches
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_list.h>
35#include <vlc_vector.h>
36#include <vlc_threads.h>
37#include <vlc_es.h>
38
39#include <string.h>
40
44struct info_t
46 char *psz_name; /**< Name of this info */
47 char *psz_value; /**< Value of the info */
48 struct vlc_list node;
49};
50
51#define info_foreach(info, cat) vlc_list_foreach(info, cat, node)
53struct info_category_t
55 char *psz_name; /**< Name of this category */
56 struct vlc_list infos; /**< Infos in the category */
57 struct vlc_list node; /**< node, to put this category in a list */
58};
59
60/**
61 * Returns true if the category is hidden
62 *
63 * Infos from hidden categories should not be displayed directly by UI modules.
64 */
65static inline bool info_category_IsHidden(info_category_t *cat)
67 return cat->psz_name[0] == '.';
68}
69
85struct input_item_es
88 char *id;
90};
91typedef struct VLC_VECTOR(struct input_item_es) input_item_es_vector;
93/**
94 * Describes an input and is used to spawn input_thread_t objects.
95 */
96struct input_item_t
98 char *psz_name; /**< text describing this item */
99 char *psz_uri; /**< mrl of this item */
101 int i_options; /**< Number of input options */
102 char **ppsz_options; /**< Array of input options */
103 uint8_t *optflagv; /**< Some flags of input options */
104 unsigned optflagc;
105 input_item_opaque_t *opaques; /**< List of opaque pointer values */
107 vlc_tick_t i_duration; /**< Duration in vlc ticks */
109
110 struct vlc_list categories; /**< List of categories */
112 input_item_es_vector es_vec; /**< ES formats */
114 input_stats_t *p_stats; /**< Statistics */
118 int i_epg; /**< Number of EPG entries */
119 vlc_epg_t **pp_epg; /**< EPG entries */
120 int64_t i_epg_time; /** EPG timedate as epoch time */
121 const vlc_epg_t *p_epg_table; /** running/selected program cur/next EPG table */
123 int i_slaves; /**< Number of slaves */
124 input_item_slave_t **pp_slaves; /**< Slave entries that will be loaded by
125 the input_thread */
126
127 vlc_mutex_t lock; /**< Lock for the item */
129 enum input_item_type_e i_type; /**< Type (file, disc, ... see input_item_type_e) */
130 bool b_net; /**< Net: always true for TYPE_STREAM, it
131 depends for others types */
132
133 int i_preparse_depth; /**< How many level of sub items can be preparsed:
134 -1: recursive, 0: none, >0: n levels */
135
136 bool b_preparse_interact; /**< Force interaction with the user when
137 preparsing.*/
138
139 void *libvlc_owner; /**< LibVLC private data, can only be set
140 before events are registered. */
141};
142
143#define INPUT_ITEM_URI_NOP "vlc://nop" /* dummy URI for node/directory items */
145/* placeholder duration for items with no known duration at time of creation
146 * it may remain the duration for items like a node/directory */
147#define INPUT_DURATION_UNSET VLC_TICK_INVALID
148#define INPUT_DURATION_INDEFINITE (-1) /* item with a known indefinite duration (live/continuous source) */
157enum slave_type
160 SLAVE_TYPE_GENERIC, /* audio, video or subtitle not matched in SLAVE_SPU_EXTENSIONS */
162
172/* Extensions must be in alphabetical order */
173#define MASTER_EXTENSIONS \
174 "asf", "avi", "divx", \
175 "f4v", "flv", "m1v", \
176 "m2v", "m4v", "mkv", \
177 "mov", "mp2", "mp2v", \
178 "mp4", "mp4v", "mpe", \
179 "mpeg", "mpeg1", "mpeg2", \
180 "mpeg4", "mpg", "mpv2", \
181 "mxf", "ogv", "ogx", \
182 "ps", "vro","webm", \
183 "wmv", "wtv"
184
185#define SLAVE_SPU_EXTENSIONS \
186 "aqt", "ass", "cdg", \
187 "dks", "idx", "jss", \
188 "mpl2", "mpsub", "pjs", \
189 "psb", "rt", "sami", "sbv", \
190 "scc", "smi", "srt", \
191 "ssa", "stl", "sub", \
192 "tt", "ttml", "usf", \
193 "vtt", "webvtt"
194
195#define SLAVE_AUDIO_EXTENSIONS \
196 "aac", "ac3", "dts", \
197 "dtshd", "eac3", "flac", \
198 "m4a", "mp3", "pcm" \
199
200struct input_item_slave
202 enum slave_type i_type; /**< Slave type (spu, audio) */
203 enum slave_priority i_priority; /**< Slave priority */
204 bool b_forced; /**< Slave should be selected */
205 char psz_uri[]; /**< Slave mrl */
207
215VLC_API void input_item_CopyOptions( input_item_t *p_child, input_item_t *p_parent );
216VLC_API void input_item_SetName( input_item_t *p_item, const char *psz_name );
217
218/**
219 * Start adding multiple subitems.
220 *
221 * Create a root node to hold a tree of subitems for given item
222 */
224
225/**
226 * Add a new child node to this parent node that will point to this subitem.
227 */
229
230/**
231 * Add an already created node to children of this parent node.
232 */
234
235/**
236 * Remove a node from its parent.
237 */
239 input_item_node_t *child );
240
241/**
242 * Delete a node created with input_item_node_Create() and all its children.
243 */
245
246/**
247 * Option flags
248 */
251 /* Allow VLC to trust the given option.
252 * By default options are untrusted */
255 /* Add the option, unless the same option
256 * is already present. */
259
260/**
261 * This function allows to add an option to an existing input_item_t.
262 */
263VLC_API int input_item_AddOption(input_item_t *, const char *, unsigned i_flags );
264/**
265 * This function add several options to an existing input_item_t.
266 */
267VLC_API int input_item_AddOptions(input_item_t *, int i_options,
268 const char *const *ppsz_options,
269 unsigned i_flags );
270VLC_API int input_item_AddOpaque(input_item_t *, const char *, void *);
271
273
274/**
275 * This function checks whether the input item is of a type that can be played.
276 * It does this by checking the extension of the input item.
277 */
278VLC_API bool input_item_Playable(const char *);
279
280VLC_API bool input_item_slave_GetType(const char *, enum slave_type *);
281
283 enum slave_priority);
284#define input_item_slave_Delete(p_slave) free(p_slave)
286/**
287 * This function allows adding a slave to an existing input item.
288 * The slave is owned by the input item after this call.
289 */
291
292/* */
293VLC_API void input_item_SetMeta( input_item_t *, vlc_meta_type_t meta_type, const char *psz_val );
294VLC_API bool input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz );
301VLC_API void input_item_SetURI( input_item_t * p_i, const char *psz_uri );
303VLC_API void input_item_SetDuration( input_item_t * p_i, vlc_tick_t i_duration );
307VLC_API unsigned input_item_GetMetaExtraNames( input_item_t *p_i, char ***pppsz_names ) VLC_USED;
308VLC_API void input_item_SetMetaExtra( input_item_t *p_i, const char *psz_name, const char *psz_value );
309
310#define INPUT_META( name ) \
311static inline \
312void input_item_Set ## name (input_item_t *p_input, const char *val) \
313{ \
314 input_item_SetMeta (p_input, vlc_meta_ ## name, val); \
315} \
316static inline \
317char *input_item_Get ## name (input_item_t *p_input) \
318{ \
319 return input_item_GetMeta (p_input, vlc_meta_ ## name); \
320}
321
322INPUT_META(Title)
324INPUT_META(AlbumArtist)
326INPUT_META(Copyright)
328INPUT_META(TrackNumber)
329INPUT_META(Description)
334INPUT_META(Language)
335INPUT_META(NowPlaying)
336INPUT_META(ESNowPlaying)
337INPUT_META(Publisher)
338INPUT_META(EncodedBy)
339INPUT_META(ArtworkURL)
341INPUT_META(TrackTotal)
342INPUT_META(Director)
345INPUT_META(ShowName)
347INPUT_META(DiscNumber)
348INPUT_META(DiscTotal)
350#define input_item_SetTrackNum input_item_SetTrackNumber
351#define input_item_GetTrackNum input_item_GetTrackNumber
352#define input_item_SetArtURL input_item_SetArtworkURL
353#define input_item_GetArtURL input_item_GetArtworkURL
355VLC_API char * input_item_GetInfo( input_item_t *p_i, const char *psz_cat,const char *psz_name ) VLC_USED;
356VLC_API char * input_item_GetInfoLocked( input_item_t *p_i, const char *psz_cat,const char *psz_name );
357VLC_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 );
358VLC_API int input_item_DelInfo( input_item_t *p_i, const char *psz_cat, const char *psz_name );
361
362#define input_item_AddStat(item, type, value) \
363 input_item_AddInfo(item, ".stat", type, "%" PRIu64, (uint64_t) value)
364
365/**
366 * This function creates a new input_item_t with the provided information.
367 *
368 * XXX You may also use input_item_New, as they need less arguments.
369 */
370VLC_API input_item_t * input_item_NewExt( const char *psz_uri,
371 const char *psz_name,
372 vlc_tick_t i_duration, enum input_item_type_e i_type,
373 enum input_item_net_type i_net ) VLC_USED;
374
375#define input_item_New( psz_uri, psz_name ) \
376 input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_UNKNOWN, ITEM_NET_UNKNOWN )
377
378#define input_item_NewCard( psz_uri, psz_name ) \
379 input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_INDEFINITE, ITEM_TYPE_CARD, ITEM_LOCAL )
380
381#define input_item_NewDisc( psz_uri, psz_name, i_duration ) \
382 input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_DISC, ITEM_LOCAL )
383
384#define input_item_NewStream( psz_uri, psz_name, i_duration ) \
385 input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_STREAM, ITEM_NET )
386
387#define input_item_NewDirectory( psz_uri, psz_name, i_net ) \
388 input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_DIRECTORY, i_net )
389
390#define input_item_NewFile( psz_uri, psz_name, i_duration, i_net ) \
391 input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_FILE, i_net )
392
393/**
394 * This function creates a new input_item_t as a copy of another.
395 */
397
398/** Holds an input item, i.e. creates a new reference. */
400
401/** Releases an input item, i.e. decrements its reference counter. */
403
404/**
405 * Record prefix string.
406 * TODO make it configurable.
407 */
408#define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p"
410/**
411 * This function creates a sane filename path.
412 */
414 const char *psz_path, const char *psz_prefix,
415 const char *psz_extension ) VLC_USED;
416
417/**
418 * input item parser opaque structure
419 */
422/**
423 * input item parser callbacks
424 */
425typedef struct input_item_parser_cbs_t
427 /**
428 * Event received when the parser ends
429 *
430 * @note This callback is mandatory.
431 *
432 * @param item the parsed item
433 * @param status VLC_SUCCESS in case of success, an error otherwise
434 * @param userdata user data set by input_item_Parse()
435 */
436 void (*on_ended)(input_item_t *item, int status, void *userdata);
438 /**
439 * Event received when a new subtree is added
440 *
441 * @note This callback is optional.
442 *
443 * @param item the parsed item
444 * @param subtree sub items of the current item
445 * @param userdata user data set by input_item_Parse()
446 */
447 void (*on_subtree_added)(input_item_t *item, input_item_node_t *subtree, void *userdata);
449 /**
450 * Event received when new attachments are added
451 *
452 * @note This callback is optional. It can be called several times for one
453 * parse request. The array contains only new elements after a second call.
454 *
455 * @param item the parsed item
456 * @param array valid array containing new elements, should only be used
457 * within the callback. One and all elements can be held and stored on a
458 * new variable or new array.
459 * @param count number of elements in the array
460 * @param userdata user data set by input_item_Parse()
461 */
463 input_attachment_t *const *array,
464 size_t count, void *userdata);
467/**
468 * Parse an item asynchronously
469 *
470 * @note The parsing is done asynchronously. The user can call
471 * input_item_parser_id_Interrupt() before receiving the on_ended() event in
472 * order to interrupt it.
473 *
474 * @param item the item to parse
475 * @param parent the parent obj
476 * @param cbs callbacks to be notified of the end of the parsing
477 * @param userdata opaque data used by parser callbacks
478 *
479 * @return a parser instance or NULL in case of error, the parser needs to be
480 * released with input_item_parser_id_Release()
481 */
484 const input_item_parser_cbs_t *cbs, void *userdata) VLC_USED;
485
486/**
487 * Interrupts & cancels the parsing
488 *
489 * @note The parser still needs to be released with input_item_parser_id_Release
490 * afterward.
491 * @note Calling this function will cause the on_ended callback to be invoked.
492 *
493 * @param parser the parser to interrupt
494 */
495VLC_API void
497
498/**
499 * Release (and interrupt if needed) a parser
500 *
501 * @param parser the parser returned by input_item_Parse
502 */
503VLC_API void
505
521/* status of the on_preparse_ended() callback */
530struct vlc_metadata_cbs {
531 void (*on_preparse_ended)(input_item_t *, enum input_item_preparse_status status, void *userdata);
532 void (*on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata);
533 void (*on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata);
535 input_attachment_t *const *array,
536 size_t count, void *userdata);
537};
538
541 const struct vlc_metadata_cbs *cbs,
542 void *cbs_userdata,
543 int, void * );
545
546/******************
547 * Input stats
548 ******************/
549struct input_stats_t
551 /* Input */
552 uint64_t i_read_packets;
553 uint64_t i_read_bytes;
556 /* Demux */
557 uint64_t i_demux_read_packets;
563 /* Decoders */
564 uint64_t i_decoded_audio;
567 /* Vout */
568 uint64_t i_displayed_pictures;
572 /* Aout */
573 uint64_t i_played_abuffers;
576
577/**
578 * Access pf_readdir helper struct
579 * \see vlc_readdir_helper_init()
580 * \see vlc_readdir_helper_additem()
581 * \see vlc_readdir_helper_finish()
582 */
596/**
597 * Init a vlc_readdir_helper struct
598 *
599 * \param p_rdh need to be cleaned with vlc_readdir_helper_finish()
600 * \param p_obj the VLC object to use for logging
601 * \param p_node node that will be used to add items
602 */
604 vlc_object_t *p_obj, input_item_node_t *p_node);
605#define vlc_readdir_helper_init(p_rdh, p_obj, p_node) \
606 vlc_readdir_helper_init(p_rdh, VLC_OBJECT(p_obj), p_node)
607
608/**
609 * Finish adding items to the node
610 *
611 * \param p_rdh a readdir helper initialized with ::vlc_readdir_helper_init
612 * \param b_success if true, items of the node will be sorted.
613 */
614VLC_API void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success);
615
616/**
617 * Add a new input_item_t entry to the node of the vlc_readdir_helper struct.
618 *
619 * \param p_rdh a readdir helper initialized with ::vlc_readdir_helper_init
620 * \param psz_uri uri of the new item
621 * \param psz_flatpath flattened path of the new item. If not NULL, this
622 * function will create an input item for each sub folders (separated
623 * by '/') of psz_flatpath (so, this will un-flatten the folder
624 * hierarchy). Either psz_flatpath or psz_filename must be valid.
625 * \param psz_filename file name of the new item. If NULL, the file part of path
626 * will be used as a filename. Either psz_flatpath or psz_filename must
627 * be valid.
628 * \param i_type see \ref input_item_type_e
629 * \param i_net see \ref input_item_net_type
630 * \param[out] created_item if an input item is created. The item should not be
631 * released and is valid until vlc_readdir_helper_finish() is called.
632 * \returns status VLC_SUCCESS in case of success, an error otherwise. Parsing
633 * should be aborted in case of error.
634 */
636 const char *psz_uri, const char *psz_flatpath,
637 const char *psz_filename,
638 int i_type, int i_net, input_item_t **created_item);
639
640#endif
size_t count
Definition core.c:403
#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:193
#define VLC_VECTOR(type)
Vector struct body.
Definition vlc_vector.h:66
int i_type
Definition httpd.c:1299
Definition vlc_es.h:633
Definition vlc_input_item.h:55
struct vlc_list node
node, to put this category in a list
Definition vlc_input_item.h:58
char * psz_name
Name of this category.
Definition vlc_input_item.h:56
struct vlc_list infos
Infos in the category.
Definition vlc_input_item.h:57
Definition vlc_input_item.h:46
struct vlc_list node
Definition vlc_input_item.h:49
char * psz_value
Value of the info.
Definition vlc_input_item.h:48
char * psz_name
Name of this info.
Definition vlc_input_item.h:47
Definition vlc_input.h:169
Definition vlc_input_item.h:92
Definition vlc_input_item.h:87
char * id
Definition vlc_input_item.h:89
bool id_stable
Definition vlc_input_item.h:90
es_format_t es
Definition vlc_input_item.h:88
Definition vlc_input_item.h:210
int i_children
Definition vlc_input_item.h:212
input_item_node_t ** pp_children
Definition vlc_input_item.h:213
input_item_t * p_item
Definition vlc_input_item.h:211
Definition item.c:43
input item parser callbacks
Definition vlc_input_item.h:427
void(* on_attachments_added)(input_item_t *item, input_attachment_t *const *array, size_t count, void *userdata)
Event received when new attachments are added.
Definition vlc_input_item.h:463
void(* on_ended)(input_item_t *item, int status, void *userdata)
Event received when the parser ends.
Definition vlc_input_item.h:437
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:448
Definition item.c:1303
Definition vlc_input_item.h:202
enum slave_priority i_priority
Slave priority.
Definition vlc_input_item.h:204
bool b_forced
Slave should be selected.
Definition vlc_input_item.h:205
char psz_uri[]
Slave mrl.
Definition vlc_input_item.h:206
enum slave_type i_type
Slave type (spu, audio)
Definition vlc_input_item.h:203
Describes an input and is used to spawn input_thread_t objects.
Definition vlc_input_item.h:98
input_item_es_vector es_vec
ES formats.
Definition vlc_input_item.h:113
int64_t i_epg_time
Definition vlc_input_item.h:121
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:134
input_item_opaque_t * opaques
List of opaque pointer values.
Definition vlc_input_item.h:106
input_item_slave_t ** pp_slaves
Slave entries that will be loaded by the input_thread.
Definition vlc_input_item.h:125
int i_options
Number of input options.
Definition vlc_input_item.h:102
int i_slaves
running/selected program cur/next EPG table
Definition vlc_input_item.h:124
int i_epg
Number of EPG entries.
Definition vlc_input_item.h:119
uint8_t * optflagv
Some flags of input options.
Definition vlc_input_item.h:104
vlc_epg_t ** pp_epg
EPG entries.
Definition vlc_input_item.h:120
void * libvlc_owner
LibVLC private data, can only be set before events are registered.
Definition vlc_input_item.h:140
unsigned optflagc
Definition vlc_input_item.h:105
vlc_mutex_t lock
Lock for the item.
Definition vlc_input_item.h:128
vlc_tick_t i_duration
Duration in vlc ticks.
Definition vlc_input_item.h:108
enum input_item_type_e i_type
Type (file, disc, ... see input_item_type_e)
Definition vlc_input_item.h:130
input_stats_t * p_stats
Statistics.
Definition vlc_input_item.h:115
char * psz_uri
mrl of this item
Definition vlc_input_item.h:100
const vlc_epg_t * p_epg_table
EPG timedate as epoch time.
Definition vlc_input_item.h:122
struct vlc_list categories
List of categories.
Definition vlc_input_item.h:111
vlc_meta_t * p_meta
Definition vlc_input_item.h:117
char ** ppsz_options
Array of input options.
Definition vlc_input_item.h:103
char * psz_name
text describing this item
Definition vlc_input_item.h:99
bool b_net
Net: always true for TYPE_STREAM, it depends for others types.
Definition vlc_input_item.h:131
bool b_preparse_interact
Force interaction with the user when preparsing.
Definition vlc_input_item.h:137
Definition vlc_input_item.h:551
uint64_t i_demux_discontinuity
Definition vlc_input_item.h:562
uint64_t i_displayed_pictures
Definition vlc_input_item.h:569
float f_input_bitrate
Definition vlc_input_item.h:555
uint64_t i_demux_corrupted
Definition vlc_input_item.h:561
uint64_t i_demux_read_packets
Definition vlc_input_item.h:558
uint64_t i_read_packets
Definition vlc_input_item.h:553
uint64_t i_read_bytes
Definition vlc_input_item.h:554
uint64_t i_played_abuffers
Definition vlc_input_item.h:574
uint64_t i_decoded_video
Definition vlc_input_item.h:566
uint64_t i_demux_read_bytes
Definition vlc_input_item.h:559
float f_demux_bitrate
Definition vlc_input_item.h:560
uint64_t i_decoded_audio
Definition vlc_input_item.h:565
uint64_t i_late_pictures
Definition vlc_input_item.h:570
uint64_t i_lost_pictures
Definition vlc_input_item.h:571
uint64_t i_lost_abuffers
Definition vlc_input_item.h:575
Definition vlc_objects.h:103
Definition vlc_epg.h:52
Doubly-linked list node.
Definition vlc_list.h:44
Definition meta.c:40
Definition vlc_input_item.h:531
void(* on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata)
Definition vlc_input_item.h:534
void(* on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata)
Definition vlc_input_item.h:533
void(* on_preparse_ended)(input_item_t *, enum input_item_preparse_status status, void *userdata)
Definition vlc_input_item.h:532
void(* on_attachments_added)(input_item_t *item, input_attachment_t *const *array, size_t count, void *userdata)
Definition vlc_input_item.h:535
Mutex.
Definition vlc_threads.h:143
VLC object common members.
Definition vlc_objects.h:53
Access pf_readdir helper struct.
Definition vlc_input_item.h:585
char * psz_ignored_exts
Definition vlc_input_item.h:594
void ** pp_slaves
Definition vlc_input_item.h:587
input_item_node_t * p_node
Definition vlc_input_item.h:586
bool b_flatten
Definition vlc_input_item.h:593
int i_sub_autodetect_fuzzy
Definition vlc_input_item.h:591
bool b_show_hiddenfiles
Definition vlc_input_item.h:592
size_t i_slaves
Definition vlc_input_item.h:588
size_t i_dirs
Definition vlc_input_item.h:590
void ** pp_dirs
Definition vlc_input_item.h:589
const char * psz_name
Definition text_style.c:33
This file is a collection of common definitions and types.
This file defines functions and structures for storing dvb epg information.
This file defines the elementary streams format types.
int libvlc_MetadataRequest(libvlc_int_t *, input_item_t *, input_item_meta_request_option_t, const struct vlc_metadata_cbs *cbs, void *cbs_userdata, int, void *)
Requests extraction of the meta data for an input item (a.k.a.
Definition libvlc.c:477
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:1227
void input_item_parser_id_Release(input_item_parser_id_t *parser)
Release (and interrupt if needed) a parser.
Definition item.c:1378
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:1282
void input_item_node_RemoveNode(input_item_node_t *parent, input_item_node_t *child)
Remove a node from its parent.
Definition item.c:1235
#define INPUT_META(name)
Definition vlc_input_item.h:311
void input_item_Release(input_item_t *)
Releases an input item, i.e.
Definition item.c:420
input_item_t * input_item_Hold(input_item_t *)
Holds an input item, i.e.
Definition item.c:412
unsigned input_item_GetMetaExtraNames(input_item_t *p_i, char ***pppsz_names)
Definition item.c:227
slave_type
Definition vlc_input_item.h:159
@ SLAVE_TYPE_GENERIC
Definition vlc_input_item.h:161
@ SLAVE_TYPE_SPU
Definition vlc_input_item.h:160
bool input_item_MetaMatch(input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz)
Definition item.c:182
input_item_node_t * input_item_node_Create(input_item_t *p_input)
Start adding multiple subitems.
Definition item.c:1180
void input_item_MergeInfos(input_item_t *, info_category_t *)
Definition item.c:790
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:985
int input_item_AddOpaque(input_item_t *, const char *, void *)
Definition item.c:517
bool input_item_Playable(const char *)
This function checks whether the input item is of a type that can be played.
Definition item.c:651
void input_item_SetName(input_item_t *p_item, const char *psz_name)
Definition item.c:261
vlc_tick_t input_item_GetDuration(input_item_t *p_i)
Definition item.c:349
void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success)
Finish adding items to the node.
Definition item.c:1769
char * input_item_GetInfoLocked(input_item_t *p_i, const char *psz_cat, const char *psz_name)
Definition item.c:684
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:1038
input_item_preparse_status
Definition vlc_input_item.h:524
@ ITEM_PREPARSE_FAILED
Definition vlc_input_item.h:526
@ ITEM_PREPARSE_TIMEOUT
Definition vlc_input_item.h:527
@ ITEM_PREPARSE_DONE
Definition vlc_input_item.h:528
@ ITEM_PREPARSE_SKIPPED
Definition vlc_input_item.h:525
#define vlc_readdir_helper_init(p_rdh, p_obj, p_node)
Definition vlc_input_item.h:606
char * input_item_GetName(input_item_t *p_i)
Definition item.c:252
const char * input_item_GetMetaLocked(input_item_t *, vlc_meta_type_t meta_type)
Definition item.c:195
int input_item_AddInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format,...)
Definition item.c:725
input_item_option_e
Option flags.
Definition vlc_input_item.h:251
@ VLC_INPUT_OPTION_UNIQUE
Definition vlc_input_item.h:258
@ VLC_INPUT_OPTION_TRUSTED
Definition vlc_input_item.h:254
char * input_item_GetNowPlayingFb(input_item_t *p_item)
Definition item.c:371
void input_item_SetURI(input_item_t *p_i, const char *psz_uri)
Definition item.c:281
bool input_item_IsPreparsed(input_item_t *p_i)
Definition item.c:383
int input_item_DelInfo(input_item_t *p_i, const char *psz_cat, const char *psz_name)
Definition item.c:743
void libvlc_MetadataCancel(libvlc_int_t *, void *)
Cancels extraction of the meta data for an input item.
Definition libvlc.c:504
void input_item_parser_id_Interrupt(input_item_parser_id_t *parser)
Interrupts & cancels the parsing.
Definition item.c:1372
void input_item_SetMeta(input_item_t *, vlc_meta_type_t meta_type, const char *psz_val)
Definition item.c:95
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:671
char * input_item_GetURI(input_item_t *p_i)
Definition item.c:271
void input_item_ApplyOptions(vlc_object_t *, input_item_t *)
Definition item.c:536
input_item_net_type
Definition vlc_input_item.h:152
@ ITEM_NET_UNKNOWN
Definition vlc_input_item.h:153
@ ITEM_NET
Definition vlc_input_item.h:154
@ ITEM_LOCAL
Definition vlc_input_item.h:155
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:507
bool input_item_IsArtFetched(input_item_t *p_i)
Definition item.c:392
bool input_item_slave_GetType(const char *, enum slave_type *)
Definition item.c:572
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.
void input_item_SetDuration(input_item_t *p_i, vlc_tick_t i_duration)
Definition item.c:363
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:466
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:1197
input_item_meta_request_option_t
Definition vlc_input_item.h:508
@ META_REQUEST_OPTION_FETCH_LOCAL
Definition vlc_input_item.h:515
@ META_REQUEST_OPTION_NONE
Definition vlc_input_item.h:509
@ META_REQUEST_OPTION_SCOPE_ANY
Definition vlc_input_item.h:512
@ META_REQUEST_OPTION_SCOPE_NETWORK
Definition vlc_input_item.h:511
@ META_REQUEST_OPTION_SCOPE_FORCED
Definition vlc_input_item.h:514
@ META_REQUEST_OPTION_FETCH_ANY
Definition vlc_input_item.h:517
@ META_REQUEST_OPTION_DO_INTERACT
Definition vlc_input_item.h:519
@ META_REQUEST_OPTION_SCOPE_LOCAL
Definition vlc_input_item.h:510
@ META_REQUEST_OPTION_FETCH_NETWORK
Definition vlc_input_item.h:516
slave_priority
Definition vlc_input_item.h:165
@ SLAVE_PRIORITY_USER
Definition vlc_input_item.h:170
@ SLAVE_PRIORITY_MATCH_LEFT
Definition vlc_input_item.h:168
@ SLAVE_PRIORITY_MATCH_ALL
Definition vlc_input_item.h:169
@ SLAVE_PRIORITY_MATCH_RIGHT
Definition vlc_input_item.h:167
@ SLAVE_PRIORITY_MATCH_NONE
Definition vlc_input_item.h:166
void input_item_ReplaceInfos(input_item_t *, info_category_t *)
Definition item.c:775
char * input_item_GetMetaExtra(input_item_t *p_i, const char *psz_name)
Definition item.c:218
char * input_item_GetMeta(input_item_t *p_i, vlc_meta_type_t meta_type)
Definition item.c:203
static bool info_category_IsHidden(info_category_t *cat)
Returns true if the category is hidden.
Definition vlc_input_item.h:66
void input_item_SetMetaExtra(input_item_t *p_i, const char *psz_name, const char *psz_value)
Definition item.c:102
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:1207
input_item_slave_t * input_item_slave_New(const char *, enum slave_type, enum slave_priority)
Definition item.c:603
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:621
char * input_item_GetTitleFbName(input_item_t *p_i)
Definition item.c:237
input_item_type_e
Definition vlc_input_item.h:72
@ ITEM_TYPE_NODE
Definition vlc_input_item.h:80
@ ITEM_TYPE_DISC
Definition vlc_input_item.h:76
@ ITEM_TYPE_NUMBER
Definition vlc_input_item.h:83
@ ITEM_TYPE_DIRECTORY
Definition vlc_input_item.h:75
@ ITEM_TYPE_FILE
Definition vlc_input_item.h:74
@ ITEM_TYPE_STREAM
Definition vlc_input_item.h:78
@ ITEM_TYPE_UNKNOWN
Definition vlc_input_item.h:73
@ ITEM_TYPE_PLAYLIST
Definition vlc_input_item.h:79
@ ITEM_TYPE_CARD
Definition vlc_input_item.h:77
void input_item_CopyOptions(input_item_t *p_child, input_item_t *p_parent)
Definition item.c:109
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:1348
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
Thread primitive declarations.
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48
This provides convenience helpers for vectors.
char psz_value[8]
Definition vout_intf.c:100