]> git.sesse.net Git - vlc/blob - modules/text_renderer/tdummy.c
mux: avi: fix leak on format failure
[vlc] / modules / text_renderer / tdummy.c
1 /*****************************************************************************
2  * tdummy.c : dummy text rendering functions
3  *****************************************************************************
4  * Copyright (C) 2000, 2001 VLC authors and VideoLAN
5  * $Id$
6  *
7  * Authors: Sigmund Augdal Helberg <dnumgis@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 #ifdef HAVE_CONFIG_H
25 # include "config.h"
26 #endif
27
28 #include <vlc_common.h>
29 #include <vlc_plugin.h>
30 #include <vlc_filter.h>
31
32 static int OpenRenderer( vlc_object_t * );
33
34 vlc_module_begin ()
35     set_shortname( N_("Dummy") )
36     set_description( N_("Dummy font renderer") )
37     set_capability( "text renderer", 1 )
38     set_callbacks( OpenRenderer, NULL )
39 vlc_module_end ()
40
41
42 static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
43                        subpicture_region_t *p_region_in,
44                        const vlc_fourcc_t *p_chroma_list )
45 {
46     VLC_UNUSED(p_filter); VLC_UNUSED(p_region_out); VLC_UNUSED(p_region_in);
47     VLC_UNUSED(p_chroma_list);
48     return VLC_EGENERIC;
49 }
50
51 static int OpenRenderer( vlc_object_t *p_this )
52 {
53     filter_t *p_filter = (filter_t *)p_this;
54     p_filter->pf_render_text = RenderText;
55     p_filter->pf_render_html = NULL;
56     return VLC_SUCCESS;
57 }