]> git.sesse.net Git - vlc/blob - src/input/input_interface.h
Privatize input_Preparse
[vlc] / src / input / input_interface.h
1 /*****************************************************************************
2  * input_interface.h: Input functions usable ouside input code.
3  *****************************************************************************
4  * Copyright (C) 1998-2008 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Laurent Aimar < fenrir _AT_ videolan _DOT_ org >
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 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 General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
25 # error This header file can only be included from LibVLC.
26 #endif
27
28 #ifndef _INPUT_INTERFACE_H
29 #define _INPUT_INTERFACE_H 1
30
31 #include <vlc_input.h>
32 #include <libvlc.h>
33
34 /**********************************************************************
35  * Item metadata
36  **********************************************************************/
37 void input_item_SetPreparsed( input_item_t *p_i, bool b_preparsed );
38 void input_item_SetArtNotFound( input_item_t *p_i, bool b_not_found );
39 void input_item_SetArtFetched( input_item_t *p_i, bool b_art_fetched );
40
41 int input_Preparse( vlc_object_t *, input_item_t * );
42
43 /* misc/stats.c
44  * FIXME it should NOT be defined here or not coded in misc/stats.c */
45 input_stats_t *stats_NewInputStats( input_thread_t *p_input );
46
47 /**
48  * This defines an opaque input ressource handler.
49  */
50 typedef struct input_ressource_t input_ressource_t;
51
52 /**
53  * This function releases an input_ressource_t and all associated ressources.
54  */
55 void input_ressource_Delete( input_ressource_t * );
56
57 /**
58  * This function deletes the current sout in the ressources.
59  */
60 void input_ressource_TerminateSout( input_ressource_t *p_ressource );
61
62 /**
63  * This function deletes the current vout in the ressources.
64  */
65 void input_ressource_TerminateVout( input_ressource_t *p_ressource );
66
67 /**
68  * This function return true if there is at least one vout in the ressources.
69  *
70  * It can only be called on detached ressources.
71  */
72 bool input_ressource_HasVout( input_ressource_t *p_ressource );
73
74 /* input.c */
75 #define input_CreateThreadExtended(a,b,c,d) __input_CreateThreadExtended(VLC_OBJECT(a),b,c,d)
76 input_thread_t *__input_CreateThreadExtended ( vlc_object_t *, input_item_t *, const char *, input_ressource_t * );
77
78 /**
79  * This function detaches ressources from a dead input.
80  *
81  * It MUST be called on a dead input (p_input->b_dead true) otherwise
82  * it will assert.
83  * It does not support concurrent calls.
84  */
85 input_ressource_t *input_DetachRessource( input_thread_t * );
86
87 /* */
88 typedef enum
89 {
90     INPUT_STATISTIC_DECODED_VIDEO,
91     INPUT_STATISTIC_DECODED_AUDIO,
92     INPUT_STATISTIC_DECODED_SUBTITLE,
93
94     /* Use them only if you do not goes through a access_out module */
95     INPUT_STATISTIC_SENT_PACKET,
96     INPUT_STATISTIC_SENT_BYTE,
97
98 } input_statistic_t;
99 /**
100  * It will update internal input statistics from external sources.
101  * XXX For now, the only one allowed to do it is stream_out and input core.
102  */
103 void input_UpdateStatistic( input_thread_t *, input_statistic_t, int i_delta );
104
105 #endif