VLC  4.0.0-dev
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
preparser.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * preparser.h
3  *****************************************************************************
4  * Copyright (C) 1999-2008 VLC authors and VideoLAN
5  *
6  * Authors: Samuel Hocevar <sam@zoy.org>
7  * Clément Stenac <zorglub@videolan.org>
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 _INPUT_PREPARSER_H
25 #define _INPUT_PREPARSER_H 1
26 
27 #include <vlc_input_item.h>
28 /**
29  * Preparser opaque structure.
30  *
31  * The preparser object will retrieve the meta data of any given input item in
32  * an asynchronous way.
33  * It will also issue art fetching requests.
34  */
36 
37 /**
38  * This function creates the preparser object and thread.
39  */
41 
42 /**
43  * This function enqueues the provided item to be preparsed.
44  *
45  * The input item is retained until the preparsing is done or until the
46  * preparser object is deleted.
47  *
48  * @param timeout maximum time allowed to preparse the item. If -1, the default
49  * "preparse-timeout" option will be used as a timeout. If 0, it will wait
50  * indefinitely. If > 0, the timeout will be used (in milliseconds).
51  * @param id unique id provided by the caller. This is can be used to cancel
52  * the request with input_preparser_Cancel()
53  */
56  const input_preparser_callbacks_t *cbs,
57  void *cbs_userdata,
58  int timeout, void *id );
59 
62  const input_fetcher_callbacks_t *cbs,
63  void *cbs_userdata );
64 
65 /**
66  * This function cancel all preparsing requests for a given id
67  *
68  * @param id unique id given to input_preparser_Push()
69  */
70 void input_preparser_Cancel( input_preparser_t *, void *id );
71 
72 /**
73  * This function destroys the preparser object and thread.
74  *
75  * All pending input items will be released.
76  */
78 
79 /**
80  * This function deactivates the preparser
81  *
82  * All pending requests will be removed, and it will block until the currently
83  * running entity has finished (if any).
84  */
86 
87 #endif
88 
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:77
input_preparser_t * input_preparser_New(vlc_object_t *)
This function creates the preparser object and thread.
Definition: preparser.c:226
Definition: vlc_input_item.h:481
Definition: vlc_input_item.h:486
void input_preparser_Push(input_preparser_t *, input_item_t *, input_item_meta_request_option_t, const input_preparser_callbacks_t *cbs, void *cbs_userdata, int timeout, void *id)
This function enqueues the provided item to be preparsed.
Definition: preparser.c:260
void input_preparser_Cancel(input_preparser_t *, void *id)
This function cancel all preparsing requests for a given id.
Definition: preparser.c:309
This file defines functions, structures and enums for input items in vlc.
void input_preparser_Delete(input_preparser_t *)
This function destroys the preparser object and thread.
Definition: preparser.c:320
VLC object common members.
Definition: vlc_objects.h:43
void input_preparser_Deactivate(input_preparser_t *)
This function deactivates the preparser.
Definition: preparser.c:314
input_item_meta_request_option_t
Definition: vlc_input_item.h:460
void input_preparser_fetcher_Push(input_preparser_t *, input_item_t *, input_item_meta_request_option_t, const input_fetcher_callbacks_t *cbs, void *cbs_userdata)
Definition: preparser.c:300
Definition: preparser.c:34