]> git.sesse.net Git - vlc/blob - include/vlc_filter.h
A bit of headers cleanup
[vlc] / include / vlc_filter.h
1 /*****************************************************************************
2  * vlc_filter.h: filter related structures
3  *****************************************************************************
4  * Copyright (C) 1999-2003 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Gildas Bazin <gbazin@videolan.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 #ifndef _VLC_FILTER_H
24 #define _VLC_FILTER_H 1
25
26 #include <vlc_es.h>
27
28 /**
29  * \file
30  * This file defines the structure and types used by video and audio filters
31  */
32
33 typedef struct filter_owner_sys_t filter_owner_sys_t;
34
35 /** Structure describing a filter
36  * @warning BIG FAT WARNING : the code relies in the first 4 members of
37  * filter_t and decoder_t to be the same, so if you have anything to add,
38  * do it at the end of the structure.
39  */
40 struct filter_t
41 {
42     VLC_COMMON_MEMBERS
43
44     /* Module properties */
45     module_t *          p_module;
46     filter_sys_t *      p_sys;
47
48     /* Input format */
49     es_format_t         fmt_in;
50
51     /* Output format of filter */
52     es_format_t         fmt_out;
53
54     /* Filter configuration */
55     config_chain_t *    p_cfg;
56
57     picture_t *         ( * pf_video_filter ) ( filter_t *, picture_t * );
58     block_t *           ( * pf_audio_filter ) ( filter_t *, block_t * );
59     void                ( * pf_video_blend )  ( filter_t *, picture_t *,
60                                                 picture_t *, picture_t *,
61                                                 int, int, int );
62
63     subpicture_t *      ( *pf_sub_filter ) ( filter_t *, mtime_t );
64     int                 ( *pf_render_text ) ( filter_t *, subpicture_region_t *,
65                                               subpicture_region_t * );
66
67     /*
68      * Buffers allocation
69      */
70
71     /* Audio output callbacks */
72     block_t *       ( * pf_audio_buffer_new) ( filter_t *, int );
73
74     /* Video output callbacks */
75     picture_t     * ( * pf_vout_buffer_new) ( filter_t * );
76     void            ( * pf_vout_buffer_del) ( filter_t *, picture_t * );
77     void            ( * pf_picture_link)    ( filter_t *, picture_t * );
78     void            ( * pf_picture_unlink)  ( filter_t *, picture_t * );
79
80     /* SPU output callbacks */
81     subpicture_t *  ( * pf_sub_buffer_new) ( filter_t * );
82     void            ( * pf_sub_buffer_del) ( filter_t *, subpicture_t * );
83
84     /* Private structure for the owner of the decoder */
85     filter_owner_sys_t *p_owner;
86 };
87
88 #endif /* _VLC_FILTER_H */