Mercurial > mplayer.hg
annotate libass/ass_types.h @ 33971:922771be85f6
Cosmetic: Rename fntRender() fntTextRender().
author | ib |
---|---|
date | Mon, 05 Sep 2011 16:19:04 +0000 |
parents | 48d020c5ceca |
children | 88eebbbbd6a0 |
rev | line source |
---|---|
20008
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
1 /* |
26723 | 2 * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
3 * | |
26738
588ce97b44f2
Speak of libass instead of MPlayer in the libass license headers.
diego
parents:
26723
diff
changeset
|
4 * This file is part of libass. |
26723 | 5 * |
26738
588ce97b44f2
Speak of libass instead of MPlayer in the libass license headers.
diego
parents:
26723
diff
changeset
|
6 * libass is free software; you can redistribute it and/or modify |
26723 | 7 * it under the terms of the GNU General Public License as published by |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
26738
588ce97b44f2
Speak of libass instead of MPlayer in the libass license headers.
diego
parents:
26723
diff
changeset
|
11 * libass is distributed in the hope that it will be useful, |
26723 | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License along | |
26738
588ce97b44f2
Speak of libass instead of MPlayer in the libass license headers.
diego
parents:
26723
diff
changeset
|
17 * with libass; if not, write to the Free Software Foundation, Inc., |
26723 | 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
19 */ | |
20008
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
20 |
25897
aaebaf255b23
Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents:
25535
diff
changeset
|
21 #ifndef LIBASS_TYPES_H |
aaebaf255b23
Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents:
25535
diff
changeset
|
22 #define LIBASS_TYPES_H |
18937 | 23 |
26138
74055622161d
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
25897
diff
changeset
|
24 #include <stdint.h> |
74055622161d
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
25897
diff
changeset
|
25 |
18937 | 26 #define VALIGN_SUB 0 |
27 #define VALIGN_CENTER 8 | |
28 #define VALIGN_TOP 4 | |
29 #define HALIGN_LEFT 1 | |
30 #define HALIGN_CENTER 2 | |
31 #define HALIGN_RIGHT 3 | |
32 | |
30200 | 33 /* Opaque objects internally used by libass. Contents are private. */ |
34 typedef struct ass_renderer ASS_Renderer; | |
35 typedef struct render_priv ASS_RenderPriv; | |
36 typedef struct parser_priv ASS_ParserPriv; | |
37 typedef struct ass_library ASS_Library; | |
18937 | 38 |
30200 | 39 /* ASS Style: line */ |
40 typedef struct ass_style { | |
41 char *Name; | |
42 char *FontName; | |
43 double FontSize; | |
44 uint32_t PrimaryColour; | |
45 uint32_t SecondaryColour; | |
46 uint32_t OutlineColour; | |
47 uint32_t BackColour; | |
48 int Bold; | |
49 int Italic; | |
50 int Underline; | |
51 int StrikeOut; | |
52 double ScaleX; | |
53 double ScaleY; | |
54 double Spacing; | |
55 int Angle; | |
56 int BorderStyle; | |
57 double Outline; | |
58 double Shadow; | |
59 int Alignment; | |
60 int MarginL; | |
61 int MarginR; | |
62 int MarginV; | |
63 int Encoding; | |
64 int treat_fontname_as_pattern; | |
65 } ASS_Style; | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
66 |
30200 | 67 /* |
68 * ASS_Event corresponds to a single Dialogue line; | |
69 * text is stored as-is, style overrides will be parsed later. | |
70 */ | |
71 typedef struct ass_event { | |
72 long long Start; // ms | |
73 long long Duration; // ms | |
18937 | 74 |
30200 | 75 int ReadOrder; |
76 int Layer; | |
77 int Style; | |
78 char *Name; | |
79 int MarginL; | |
80 int MarginR; | |
81 int MarginV; | |
82 char *Effect; | |
83 char *Text; | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
84 |
30200 | 85 ASS_RenderPriv *render_priv; |
86 } ASS_Event; | |
20477 | 87 |
30200 | 88 /* |
89 * ass track represent either an external script or a matroska subtitle stream | |
90 * (no real difference between them); it can be used in rendering after the | |
91 * headers are parsed (i.e. events format line read). | |
92 */ | |
93 typedef struct ass_track { | |
94 int n_styles; // amount used | |
95 int max_styles; // amount allocated | |
96 int n_events; | |
97 int max_events; | |
98 ASS_Style *styles; // array of styles, max_styles length, n_styles used | |
99 ASS_Event *events; // the same as styles | |
18937 | 100 |
30200 | 101 char *style_format; // style format line (everything after "Format: ") |
102 char *event_format; // event format line | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28860
diff
changeset
|
103 |
30200 | 104 enum { |
105 TRACK_TYPE_UNKNOWN = 0, | |
106 TRACK_TYPE_ASS, | |
107 TRACK_TYPE_SSA | |
108 } track_type; | |
18937 | 109 |
30200 | 110 // Script header fields |
111 int PlayResX; | |
112 int PlayResY; | |
113 double Timer; | |
114 int WrapStyle; | |
115 int ScaledBorderAndShadow; | |
116 int Kerning; | |
19492 | 117 |
30200 | 118 int default_style; // index of default style |
119 char *name; // file name in case of external subs, 0 for streams | |
120 | |
121 ASS_Library *library; | |
122 ASS_ParserPriv *parser_priv; | |
123 } ASS_Track; | |
18937 | 124 |
25897
aaebaf255b23
Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents:
25535
diff
changeset
|
125 #endif /* LIBASS_TYPES_H */ |