Mercurial > mplayer.hg
annotate libass/ass_types.h @ 26534:432ba8dbef54
Merge test program compilation rules using patterns.
author | diego |
---|---|
date | Mon, 28 Apr 2008 12:35:20 +0000 |
parents | 74055622161d |
children | 0f892cd714b2 |
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 /* |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
4 Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
5 |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
6 This program is free software; you can redistribute it and/or modify |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
7 it under the terms of the GNU General Public License as published by |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
8 the Free Software Foundation; either version 2 of the License, or |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
9 (at your option) any later version. |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
10 |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
11 This program is distributed in the hope that it will be useful, |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
14 GNU General Public License for more details. |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
15 |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
16 You should have received a copy of the GNU General Public License |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
17 along with this program; if not, write to the Free Software |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
19 */ |
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 | |
33 /// ass Style: line | |
34 typedef struct ass_style_s { | |
35 char* Name; | |
36 char* FontName; | |
23300 | 37 double FontSize; |
18937 | 38 uint32_t PrimaryColour; |
39 uint32_t SecondaryColour; | |
40 uint32_t OutlineColour; | |
41 uint32_t BackColour; | |
42 int Bold; | |
43 int Italic; | |
44 int Underline; | |
45 int StrikeOut; | |
46 double ScaleX; | |
47 double ScaleY; | |
22259 | 48 double Spacing; |
18937 | 49 int Angle; |
50 int BorderStyle; | |
51 double Outline; | |
52 double Shadow; | |
53 int Alignment; | |
54 int MarginL; | |
55 int MarginR; | |
56 int MarginV; | |
57 // int AlphaLevel; | |
58 int Encoding; | |
59 } ass_style_t; | |
60 | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
61 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
|
62 |
18937 | 63 /// ass_event_t corresponds to a single Dialogue line |
64 /// Text is stored as-is, style overrides will be parsed later | |
65 typedef struct ass_event_s { | |
66 long long Start; // ms | |
67 long long Duration; // ms | |
68 | |
69 int ReadOrder; | |
70 int Layer; | |
71 int Style; | |
72 char* Name; | |
73 int MarginL; | |
74 int MarginR; | |
75 int MarginV; | |
76 char* Effect; | |
77 char* Text; | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
78 |
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
79 render_priv_t* render_priv; |
18937 | 80 } ass_event_t; |
81 | |
19492 | 82 typedef struct parser_priv_s parser_priv_t; |
83 | |
20477 | 84 typedef struct ass_library_s ass_library_t; |
85 | |
18937 | 86 /// ass track represent either an external script or a matroska subtitle stream (no real difference between them) |
87 /// it can be used in rendering after the headers are parsed (i.e. events format line read) | |
88 typedef struct ass_track_s { | |
89 int n_styles; // amount used | |
90 int max_styles; // amount allocated | |
91 int n_events; | |
92 int max_events; | |
93 ass_style_t* styles; // array of styles, max_styles length, n_styles used | |
94 ass_event_t* events; // the same as styles | |
95 | |
96 char* style_format; // style format line (everything after "Format: ") | |
97 char* event_format; // event format line | |
98 | |
19492 | 99 enum {TRACK_TYPE_UNKNOWN = 0, TRACK_TYPE_ASS, TRACK_TYPE_SSA} track_type; |
18937 | 100 |
101 // script header fields | |
102 int PlayResX; | |
103 int PlayResY; | |
104 double Timer; | |
105 int WrapStyle; | |
106 | |
107 | |
108 int default_style; // index of default style | |
109 char* name; // file name in case of external subs, 0 for streams | |
19492 | 110 |
20477 | 111 ass_library_t* library; |
19492 | 112 parser_priv_t* parser_priv; |
18937 | 113 } ass_track_t; |
114 | |
25897
aaebaf255b23
Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents:
25535
diff
changeset
|
115 #endif /* LIBASS_TYPES_H */ |