add_savefile: remove callback parameter
[vlc/asuraparaju-public.git] / modules / codec / subsdec.h
blobaaf307dd1b4bcd72627cdd9836c9a79e6d797dad
1 /*****************************************************************************
2 * subsdec.h : text/ASS-SSA/USF subtitles headers
3 *****************************************************************************
4 * Copyright (C) 2000-2006 the VideoLAN team
5 * $Id$
7 * Authors: Gildas Bazin <gbazin@videolan.org>
8 * Samuel Hocevar <sam@zoy.org>
9 * Derk-Jan Hartman <hartman at videolan dot org>
10 * Bernie Purcell <bitmap@videolan.org>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
27 #ifndef SUBSDEC_HEADER_H
28 #define SUBSDEC_HEADER_H
30 #include <vlc_common.h>
31 #include <vlc_codec.h>
32 #include <vlc_input.h>
34 #include <vlc_filter.h>
35 #include <vlc_image.h>
36 #include <vlc_charset.h>
37 #include <vlc_stream.h>
38 #include <vlc_xml.h>
39 #include <string.h>
42 #define DEFAULT_NAME "Default"
43 #define MAX_LINE 8192
44 #define NO_BREAKING_SPACE "&#160;"
46 enum
48 ATTRIBUTE_ALIGNMENT = (1 << 0),
49 ATTRIBUTE_X = (1 << 1),
50 ATTRIBUTE_X_PERCENT = (1 << 2),
51 ATTRIBUTE_Y = (1 << 3),
52 ATTRIBUTE_Y_PERCENT = (1 << 4),
55 typedef struct
57 char *psz_filename;
58 picture_t *p_pic;
59 } image_attach_t;
61 typedef struct
63 char * psz_stylename; /* The name of the style, no comma's allowed */
64 text_style_t font_style;
65 int i_align;
66 int i_margin_h;
67 int i_margin_v;
68 int i_margin_percent_h;
69 int i_margin_percent_v;
70 } ssa_style_t;
72 /*****************************************************************************
73 * decoder_sys_t : decoder descriptor
74 *****************************************************************************/
75 struct decoder_sys_t
77 bool b_ass; /* The subs are ASS */
79 int i_original_height;
80 int i_original_width;
81 int i_align; /* Subtitles alignment on the vout */
83 vlc_iconv_t iconv_handle; /* handle to iconv instance */
84 bool b_autodetect_utf8;
86 ssa_style_t **pp_ssa_styles;
87 int i_ssa_styles;
89 image_attach_t **pp_images;
90 int i_images;
94 char *GotoNextLine( char *psz_text );
96 void ParseSSAHeader ( decoder_t * );
97 void ParseSSAString ( decoder_t *, char *, subpicture_t * );
99 #endif