1 /*****************************************************************************
2 * subsdec.h : text/ASS-SSA/USF subtitles headers
3 *****************************************************************************
4 * Copyright (C) 2000-2006 the VideoLAN team
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>
35 #include <vlc_filter.h>
36 #include <vlc_image.h>
37 #include <vlc_charset.h>
38 #include <vlc_stream.h>
44 #define DEFAULT_NAME "Default"
46 #define NO_BREAKING_SPACE " "
50 ATTRIBUTE_ALIGNMENT = (1 << 0),
51 ATTRIBUTE_X = (1 << 1),
52 ATTRIBUTE_X_PERCENT = (1 << 2),
53 ATTRIBUTE_Y = (1 << 3),
54 ATTRIBUTE_Y_PERCENT = (1 << 4),
65 char * psz_stylename; /* The name of the style, no comma's allowed */
66 text_style_t font_style;
70 int i_margin_percent_h;
71 int i_margin_percent_v;
74 /*****************************************************************************
75 * decoder_sys_t : decoder descriptor
76 *****************************************************************************/
79 bool b_ass; /* The subs are ASS */
80 int i_original_height;
82 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;
89 image_attach_t **pp_images;
94 char *GotoNextLine( char *psz_text );
96 void ParseSSAHeader ( decoder_t * );
97 void ParseSSAString ( decoder_t *, char *, subpicture_t * );