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