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