player: osd: fix zoom
[vlc.git] / src / preparser / preparser.h
blobd37dab1b112a2371bbd3530ea5b8fb20564b2dc2
1 /*****************************************************************************
2 * preparser.h
3 *****************************************************************************
4 * Copyright (C) 1999-2008 VLC authors and VideoLAN
5 * $Id$
7 * Authors: Samuel Hocevar <sam@zoy.org>
8 * Clément Stenac <zorglub@videolan.org>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef _INPUT_PREPARSER_H
26 #define _INPUT_PREPARSER_H 1
28 #include <vlc_input_item.h>
29 /**
30 * Preparser opaque structure.
32 * The preparser object will retrieve the meta data of any given input item in
33 * an asynchronous way.
34 * It will also issue art fetching requests.
36 typedef struct input_preparser_t input_preparser_t;
38 /**
39 * This function creates the preparser object and thread.
41 input_preparser_t *input_preparser_New( vlc_object_t * );
43 /**
44 * This function enqueues the provided item to be preparsed.
46 * The input item is retained until the preparsing is done or until the
47 * preparser object is deleted.
49 * @param timeout maximum time allowed to preparse the item. If -1, the default
50 * "preparse-timeout" option will be used as a timeout. If 0, it will wait
51 * indefinitely. If > 0, the timeout will be used (in milliseconds).
52 * @param id unique id provided by the caller. This is can be used to cancel
53 * the request with input_preparser_Cancel()
55 void input_preparser_Push( input_preparser_t *, input_item_t *,
56 input_item_meta_request_option_t,
57 const input_preparser_callbacks_t *cbs,
58 void *cbs_userdata,
59 int timeout, void *id );
61 void input_preparser_fetcher_Push( input_preparser_t *, input_item_t *,
62 input_item_meta_request_option_t,
63 const input_fetcher_callbacks_t *cbs,
64 void *cbs_userdata );
66 /**
67 * This function cancel all preparsing requests for a given id
69 * @param id unique id given to input_preparser_Push()
71 void input_preparser_Cancel( input_preparser_t *, void *id );
73 /**
74 * This function destroys the preparser object and thread.
76 * All pending input items will be released.
78 void input_preparser_Delete( input_preparser_t * );
80 /**
81 * This function deactivates the preparser
83 * All pending requests will be removed, and it will block until the currently
84 * running entity has finished (if any).
86 void input_preparser_Deactivate( input_preparser_t * );
88 #endif