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 void *libvlc_owner; /**< LibVLC private data, can only be set
134 before events are registered. */
135};
136
137#define INPUT_ITEM_URI_NOP "vlc://nop" /* dummy URI for node/directory items */
139/* placeholder duration for items with no known duration at time of creation
140 * it may remain the duration for items like a node/directory */
141#define INPUT_DURATION_UNSET VLC_TICK_INVALID
142#define INPUT_DURATION_INDEFINITE (-1) /* item with a known indefinite duration (live/continuous source) */
151enum slave_type
154 SLAVE_TYPE_GENERIC, /* audio, video or subtitle not matched in SLAVE_SPU_EXTENSIONS */
156
166/* Extensions must be in alphabetical order */
167#define MASTER_EXTENSIONS \
168 "asf", "avi", "divx", \
169 "f4v", "flv", "m1v", \
170 "m2v", "m4v", "mkv", \
171 "mov", "mp2", "mp2v", \
172 "mp4", "mp4v", "mpe", \
173 "mpeg", "mpeg1", "mpeg2", \
174 "mpeg4", "mpg", "mpv2", \
175 "mxf", "ogv", "ogx", \
176 "ps", "vro","webm", \
177 "wmv", "wtv"
178
179#define SLAVE_SPU_EXTENSIONS \
180 "aqt", "ass", "cdg", \
181 "dks", "idx", "jss", \
182 "mpl2", "mpsub", "pjs", \
183 "psb", "rt", "sami", "sbv", \
184 "scc", "smi", "srt", \
185 "ssa", "stl", "sub", \
186 "tt", "ttml", "usf", \
187 "vtt", "webvtt"
188
189#define SLAVE_AUDIO_EXTENSIONS \
190 "aac", "ac3", "dts", \
191 "dtshd", "eac3", "flac", \
192 "m4a", "mp3", "pcm" \
193
194struct input_item_slave
196 enum slave_type i_type; /**< Slave type (spu, audio) */
197 enum slave_priority i_priority; /**< Slave priority */
198 bool b_forced; /**< Slave should be selected */
199 char psz_uri[]; /**< Slave mrl */
201
209VLC_API void input_item_CopyOptions( input_item_t *p_child, input_item_t *p_parent );
210VLC_API void input_item_SetName( input_item_t *p_item, const char *psz_name );
211
212/**
213 * Start adding multiple subitems.
214 *
215 * Create a root node to hold a tree of subitems for given item
216 */
218
219/**
220 * Add a new child node to this parent node that will point to this subitem.
221 */
223
224/**
225 * Add an already created node to children of this parent node.
226 */
228
229/**
230 * Remove a node from its parent.
231 */
233 input_item_node_t *child );
234
235/**
236 * Delete a node created with input_item_node_Create() and all its children.
237 */
239
240/**
241 * Option flags
242 */
245 /* Allow VLC to trust the given option.
246 * By default options are untrusted */
249 /* Add the option, unless the same option
250 * is already present. */
253
254/**
255 * This function allows to add an option to an existing input_item_t.
256 */
257VLC_API int input_item_AddOption(input_item_t *, const char *, unsigned i_flags );
258/**
259 * This function add several options to an existing input_item_t.
260 */
261VLC_API int input_item_AddOptions(input_item_t *, int i_options,
262 const char *const *ppsz_options,
263 unsigned i_flags );
264VLC_API int input_item_AddOpaque(input_item_t *, const char *, void *);
265
267
268/**
269 * This function checks whether the input item is of a type that can be played.
270 * It does this by checking the extension of the input item.
271 */
272VLC_API bool input_item_Playable(const char *);
273
274VLC_API bool input_item_slave_GetType(const char *, enum slave_type *);
275
277 enum slave_priority);
278#define input_item_slave_Delete(p_slave) free(p_slave)
280/**
281 * This function allows adding a slave to an existing input item.
282 * The slave is owned by the input item after this call.
283 */
285
286/* */
287VLC_API void input_item_SetMeta( input_item_t *, vlc_meta_type_t meta_type, const char *psz_val );
288VLC_API bool input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz );
295VLC_API void input_item_SetURI( input_item_t * p_i, const char *psz_uri );
297VLC_API void input_item_SetDuration( input_item_t * p_i, vlc_tick_t i_duration );
301VLC_API unsigned input_item_GetMetaExtraNames( input_item_t *p_i, char ***pppsz_names ) VLC_USED;
302VLC_API void input_item_SetMetaExtra( input_item_t *p_i, const char *psz_name, const char *psz_value );
303
304#define INPUT_META( name ) \
305static inline \
306void input_item_Set ## name (input_item_t *p_input, const char *val) \
307{ \
308 input_item_SetMeta (p_input, vlc_meta_ ## name, val); \
309} \
310static inline \
311char *input_item_Get ## name (input_item_t *p_input) \
312{ \
313 return input_item_GetMeta (p_input, vlc_meta_ ## name); \
314}
315
316INPUT_META(Title)
318INPUT_META(AlbumArtist)
320INPUT_META(Copyright)
322INPUT_META(TrackNumber)
323INPUT_META(Description)
328INPUT_META(Language)
329INPUT_META(NowPlaying)
330INPUT_META(ESNowPlaying)
331INPUT_META(Publisher)
332INPUT_META(EncodedBy)
333INPUT_META(ArtworkURL)
335INPUT_META(TrackTotal)
336INPUT_META(Director)
339INPUT_META(ShowName)
341INPUT_META(DiscNumber)
342INPUT_META(DiscTotal)
344#define input_item_SetTrackNum input_item_SetTrackNumber
345#define input_item_GetTrackNum input_item_GetTrackNumber
346#define input_item_SetArtURL input_item_SetArtworkURL
347#define input_item_GetArtURL input_item_GetArtworkURL
349VLC_API char * input_item_GetInfo( input_item_t *p_i, const char *psz_cat,const char *psz_name ) VLC_USED;
350VLC_API char * input_item_GetInfoLocked( input_item_t *p_i, const char *psz_cat,const char *psz_name );
351VLC_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 );
352VLC_API int input_item_DelInfo( input_item_t *p_i, const char *psz_cat, const char *psz_name );
355
356#define input_item_AddStat(item, type, value) \
357 input_item_AddInfo(item, ".stat", type, "%" PRIu64, (uint64_t) value)
358
359/**
360 * This function creates a new input_item_t with the provided information.
361 *
362 * XXX You may also use input_item_New, as they need less arguments.
363 */
364VLC_API input_item_t * input_item_NewExt( const char *psz_uri,
365 const char *psz_name,
366 vlc_tick_t i_duration, enum input_item_type_e i_type,
367 enum input_item_net_type i_net ) VLC_USED;
368
369#define input_item_New( psz_uri, psz_name ) \
370 input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_UNKNOWN, ITEM_NET_UNKNOWN )
371
372#define input_item_NewCard( psz_uri, psz_name ) \
373 input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_INDEFINITE, ITEM_TYPE_CARD, ITEM_LOCAL )
374
375#define input_item_NewDisc( psz_uri, psz_name, i_duration ) \
376 input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_DISC, ITEM_LOCAL )
377
378#define input_item_NewStream( psz_uri, psz_name, i_duration ) \
379 input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_STREAM, ITEM_NET )
380
381#define input_item_NewDirectory( psz_uri, psz_name, i_net ) \
382 input_item_NewExt( psz_uri, psz_name, INPUT_DURATION_UNSET, ITEM_TYPE_DIRECTORY, i_net )
383
384#define input_item_NewFile( psz_uri, psz_name, i_duration, i_net ) \
385 input_item_NewExt( psz_uri, psz_name, i_duration, ITEM_TYPE_FILE, i_net )
386
387/**
388 * This function creates a new input_item_t as a copy of another.
389 */
391
392/** Holds an input item, i.e. creates a new reference. */
394
395/** Releases an input item, i.e. decrements its reference counter. */
397
398static inline enum input_item_type_e
399input_item_GetType( input_item_t *p_i, bool *is_network )
401 vlc_mutex_lock( &p_i->lock );
402 enum input_item_type_e type = p_i->i_type;
403 *is_network = p_i->b_net;
404 vlc_mutex_unlock( &p_i->lock );
405 return type;
406}
407
408/**
409 * Record prefix string.
410 * TODO make it configurable.
411 */
412#define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p"
414/**
415 * This function creates a sane filename path.
416 */
418 const char *psz_path, const char *psz_prefix,
419 const char *psz_extension ) VLC_USED;
420
421/**
422 * input item parser opaque structure
423 */
426/**
427 * input item parser callbacks
428 */
429typedef struct input_item_parser_cbs_t
431 /**
432 * Event received when the parser ends
433 *
434 * @note This callback is mandatory.
435 *
436 * @param item the parsed item
437 * @param status VLC_SUCCESS in case of success, VLC_ETIMEOUT in case of
438 * timeout, -EINTR if cancelled, an error otherwise
439 * @param userdata user data set by input_item_Parse()
440 */
441 void (*on_ended)(input_item_t *item, int status, void *userdata);
443 /**
444 * Event received when a new subtree is added
445 *
446 * @note This callback is optional.
447 *
448 * @param item the parsed item
449 * @param subtree sub items of the current item
450 * @param userdata user data set by input_item_Parse()
451 */
452 void (*on_subtree_added)(input_item_t *item, input_item_node_t *subtree, void *userdata);
454 /**
455 * Event received when new attachments are added
456 *
457 * @note This callback is optional. It can be called several times for one
458 * parse request. The array contains only new elements after a second call.
459 *
460 * @param item the parsed item
461 * @param array valid array containing new elements, should only be used
462 * within the callback. One and all elements can be held and stored on a
463 * new variable or new array.
464 * @param count number of elements in the array
465 * @param userdata user data set by input_item_Parse()
466 */
468 input_attachment_t *const *array,
469 size_t count, void *userdata);
472/**
473 * input item parser configuration struct
474 */
476 /** Callbacks to be notified of the end of the parsing, can't be NULL */
478 /** Opaque data used by parser callbacks */
479 void *cbs_data;
480 /** true to parse subitems (from a folder or a playlist file) */
481 bool subitems;
482 /** true to trigger dialog interactions when needed */
483 bool interact;
485
486/**
487 * Parse an item asynchronously
488 *
489 * @note The parsing is done asynchronously. The user can call
490 * input_item_parser_id_Interrupt() before receiving the on_ended() event in
491 * order to interrupt it.
492 *
493 * @param parent the parent obj
494 * @param item the item to parse
495 * @param cfg pointer to a configuration struct, can't be NULL
496 *
497 * @return a parser instance or NULL in case of error, the parser needs to be
498 * released with input_item_parser_id_Release()
499 */
502 const struct input_item_parser_cfg *cfg) VLC_USED;
503
504/**
505 * Interrupts & cancels the parsing
506 *
507 * @note The parser still needs to be released with input_item_parser_id_Release
508 * afterward.
509 * @note Calling this function will cause the on_ended callback to be invoked.
510 *
511 * @param parser the parser to interrupt
512 */
513VLC_API void
515
516/**
517 * Release (and interrupt if needed) a parser
518 *
519 * @param parser the parser returned by input_item_Parse
520 */
521VLC_API void
523
524/******************
525 * Input stats
526 ******************/
527struct input_stats_t
529 /* Input */
530 uint64_t i_read_packets;
531 uint64_t i_read_bytes;
534 /* Demux */
535 uint64_t i_demux_read_packets;
541 /* Decoders */
542 uint64_t i_decoded_audio;
545 /* Vout */
546 uint64_t i_displayed_pictures;
550 /* Aout */
551 uint64_t i_played_abuffers;
554
555/**
556 * Access pf_readdir helper struct
557 * \see vlc_readdir_helper_init()
558 * \see vlc_readdir_helper_additem()
559 * \see vlc_readdir_helper_finish()
560 */
574/**
575 * Init a vlc_readdir_helper struct
576 *
577 * \param p_rdh need to be cleaned with vlc_readdir_helper_finish()
578 * \param p_obj the VLC object to use for logging
579 * \param p_node node that will be used to add items
580 */
582 vlc_object_t *p_obj, input_item_node_t *p_node);
583#define vlc_readdir_helper_init(p_rdh, p_obj, p_node) \
584 vlc_readdir_helper_init(p_rdh, VLC_OBJECT(p_obj), p_node)
585
586/**
587 * Finish adding items to the node
588 *
589 * \param p_rdh a readdir helper initialized with ::vlc_readdir_helper_init
590 * \param b_success if true, items of the node will be sorted.
591 */
592VLC_API void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success);
593
594/**
595 * Add a new input_item_t entry to the node of the vlc_readdir_helper struct.
596 *
597 * \param p_rdh a readdir helper initialized with ::vlc_readdir_helper_init
598 * \param psz_uri uri of the new item
599 * \param psz_flatpath flattened path of the new item. If not NULL, this
600 * function will create an input item for each sub folders (separated
601 * by '/') of psz_flatpath (so, this will un-flatten the folder
602 * hierarchy). Either psz_flatpath or psz_filename must be valid.
603 * \param psz_filename file name of the new item. If NULL, the file part of path
604 * will be used as a filename. Either psz_flatpath or psz_filename must
605 * be valid.
606 * \param i_type see \ref input_item_type_e
607 * \param i_net see \ref input_item_net_type
608 * \param[out] created_item if an input item is created. The item should not be
609 * released and is valid until vlc_readdir_helper_finish() is called.
610 * \returns status VLC_SUCCESS in case of success, an error otherwise. Parsing
611 * should be aborted in case of error.
612 */
614 const char *psz_uri, const char *psz_flatpath,
615 const char *psz_filename,
616 int i_type, int i_net, input_item_t **created_item);
617
618#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
void vlc_mutex_unlock(vlc_mutex_t *mtx)
Releases a mutex.
Definition threads.c:149
void vlc_mutex_lock(vlc_mutex_t *mtx)
Acquires a mutex.
Definition threads.c:95
#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:204
int i_children
Definition vlc_input_item.h:206
input_item_node_t ** pp_children
Definition vlc_input_item.h:207
input_item_t * p_item
Definition vlc_input_item.h:205
Definition item.c:43
input item parser callbacks
Definition vlc_input_item.h:431
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:468
void(* on_ended)(input_item_t *item, int status, void *userdata)
Event received when the parser ends.
Definition vlc_input_item.h:442
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:453
input item parser configuration struct
Definition vlc_input_item.h:476
const input_item_parser_cbs_t * cbs
Callbacks to be notified of the end of the parsing, can't be NULL.
Definition vlc_input_item.h:478
bool interact
true to trigger dialog interactions when needed
Definition vlc_input_item.h:484
void * cbs_data
Opaque data used by parser callbacks.
Definition vlc_input_item.h:480
bool subitems
true to parse subitems (from a folder or a playlist file)
Definition vlc_input_item.h:482
Definition parse.c:43
Definition vlc_input_item.h:196
enum slave_priority i_priority
Slave priority.
Definition vlc_input_item.h:198
bool b_forced
Slave should be selected.
Definition vlc_input_item.h:199
char psz_uri[]
Slave mrl.
Definition vlc_input_item.h:200
enum slave_type i_type
Slave type (spu, audio)
Definition vlc_input_item.h:197
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
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:134
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
Definition vlc_input_item.h:529
uint64_t i_demux_discontinuity
Definition vlc_input_item.h:540
uint64_t i_displayed_pictures
Definition vlc_input_item.h:547
float f_input_bitrate
Definition vlc_input_item.h:533
uint64_t i_demux_corrupted
Definition vlc_input_item.h:539
uint64_t i_demux_read_packets
Definition vlc_input_item.h:536
uint64_t i_read_packets
Definition vlc_input_item.h:531
uint64_t i_read_bytes
Definition vlc_input_item.h:532
uint64_t i_played_abuffers
Definition vlc_input_item.h:552
uint64_t i_decoded_video
Definition vlc_input_item.h:544
uint64_t i_demux_read_bytes
Definition vlc_input_item.h:537
float f_demux_bitrate
Definition vlc_input_item.h:538
uint64_t i_decoded_audio
Definition vlc_input_item.h:543
uint64_t i_late_pictures
Definition vlc_input_item.h:548
uint64_t i_lost_pictures
Definition vlc_input_item.h:549
uint64_t i_lost_abuffers
Definition vlc_input_item.h:553
Definition vlc_epg.h:52
Doubly-linked list node.
Definition vlc_list.h:44
Definition meta.c:46
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:563
char * psz_ignored_exts
Definition vlc_input_item.h:572
void ** pp_slaves
Definition vlc_input_item.h:565
input_item_node_t * p_node
Definition vlc_input_item.h:564
bool b_flatten
Definition vlc_input_item.h:571
int i_sub_autodetect_fuzzy
Definition vlc_input_item.h:569
bool b_show_hiddenfiles
Definition vlc_input_item.h:570
size_t i_slaves
Definition vlc_input_item.h:566
size_t i_dirs
Definition vlc_input_item.h:568
void ** pp_dirs
Definition vlc_input_item.h:567
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.
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:1205
void input_item_parser_id_Release(input_item_parser_id_t *parser)
Release (and interrupt if needed) a parser.
Definition parse.c:133
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:1260
void input_item_node_RemoveNode(input_item_node_t *parent, input_item_node_t *child)
Remove a node from its parent.
Definition item.c:1213
#define INPUT_META(name)
Definition vlc_input_item.h:305
void input_item_Release(input_item_t *)
Releases an input item, i.e.
Definition item.c:409
input_item_t * input_item_Hold(input_item_t *)
Holds an input item, i.e.
Definition item.c:401
unsigned input_item_GetMetaExtraNames(input_item_t *p_i, char ***pppsz_names)
Definition item.c:227
slave_type
Definition vlc_input_item.h:153
@ SLAVE_TYPE_GENERIC
Definition vlc_input_item.h:155
@ SLAVE_TYPE_SPU
Definition vlc_input_item.h:154
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:1169
void input_item_MergeInfos(input_item_t *, info_category_t *)
Definition item.c:779
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:974
int input_item_AddOpaque(input_item_t *, const char *, void *)
Definition item.c:506
bool input_item_Playable(const char *)
This function checks whether the input item is of a type that can be played.
Definition item.c:640
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
input_item_parser_id_t * input_item_Parse(vlc_object_t *parent, input_item_t *item, const struct input_item_parser_cfg *cfg)
Parse an item asynchronously.
Definition parse.c:91
void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success)
Finish adding items to the node.
Definition item.c:1664
char * input_item_GetInfoLocked(input_item_t *p_i, const char *psz_cat, const char *psz_name)
Definition item.c:673
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:1027
#define vlc_readdir_helper_init(p_rdh, p_obj, p_node)
Definition vlc_input_item.h:584
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:714
input_item_option_e
Option flags.
Definition vlc_input_item.h:245
@ VLC_INPUT_OPTION_UNIQUE
Definition vlc_input_item.h:252
@ VLC_INPUT_OPTION_TRUSTED
Definition vlc_input_item.h:248
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:732
void input_item_parser_id_Interrupt(input_item_parser_id_t *parser)
Interrupts & cancels the parsing.
Definition parse.c:127
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:660
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:525
input_item_net_type
Definition vlc_input_item.h:146
@ ITEM_NET_UNKNOWN
Definition vlc_input_item.h:147
@ ITEM_NET
Definition vlc_input_item.h:148
@ ITEM_LOCAL
Definition vlc_input_item.h:149
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:496
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:561
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:455
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:1186
slave_priority
Definition vlc_input_item.h:159
@ SLAVE_PRIORITY_USER
Definition vlc_input_item.h:164
@ SLAVE_PRIORITY_MATCH_LEFT
Definition vlc_input_item.h:162
@ SLAVE_PRIORITY_MATCH_ALL
Definition vlc_input_item.h:163
@ SLAVE_PRIORITY_MATCH_RIGHT
Definition vlc_input_item.h:161
@ SLAVE_PRIORITY_MATCH_NONE
Definition vlc_input_item.h:160
static enum input_item_type_e input_item_GetType(input_item_t *p_i, bool *is_network)
Definition vlc_input_item.h:400
void input_item_ReplaceInfos(input_item_t *, info_category_t *)
Definition item.c:764
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:1196
input_item_slave_t * input_item_slave_New(const char *, enum slave_type, enum slave_priority)
Definition item.c:592
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:610
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
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:102