Mercurial > mplayer.hg
annotate libass/ass_types.h @ 20049:c9e717a117d3
Also ignore shared libraries.
author | diego |
---|---|
date | Wed, 04 Oct 2006 21:40:35 +0000 |
parents | fa122b7c71c6 |
children | de4a66d99f41 |
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 |
18937 | 21 #ifndef __ASS_TYPES_H__ |
22 #define __ASS_TYPES_H__ | |
23 | |
24 #define VALIGN_SUB 0 | |
25 #define VALIGN_CENTER 8 | |
26 #define VALIGN_TOP 4 | |
27 #define HALIGN_LEFT 1 | |
28 #define HALIGN_CENTER 2 | |
29 #define HALIGN_RIGHT 3 | |
30 | |
31 /// ass Style: line | |
32 typedef struct ass_style_s { | |
33 char* Name; | |
34 char* FontName; | |
35 int FontSize; | |
36 uint32_t PrimaryColour; | |
37 uint32_t SecondaryColour; | |
38 uint32_t OutlineColour; | |
39 uint32_t BackColour; | |
40 int Bold; | |
41 int Italic; | |
42 int Underline; | |
43 int StrikeOut; | |
44 double ScaleX; | |
45 double ScaleY; | |
46 int Spacing; | |
47 int Angle; | |
48 int BorderStyle; | |
49 double Outline; | |
50 double Shadow; | |
51 int Alignment; | |
52 int MarginL; | |
53 int MarginR; | |
54 int MarginV; | |
55 // int AlphaLevel; | |
56 int Encoding; | |
57 } ass_style_t; | |
58 | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
59 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
|
60 |
18937 | 61 /// ass_event_t corresponds to a single Dialogue line |
62 /// Text is stored as-is, style overrides will be parsed later | |
63 typedef struct ass_event_s { | |
64 long long Start; // ms | |
65 long long Duration; // ms | |
66 | |
67 int ReadOrder; | |
68 int Layer; | |
69 int Style; | |
70 char* Name; | |
71 int MarginL; | |
72 int MarginR; | |
73 int MarginV; | |
74 char* Effect; | |
75 char* Text; | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
76 |
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
77 render_priv_t* render_priv; |
18937 | 78 } ass_event_t; |
79 | |
19492 | 80 typedef struct parser_priv_s parser_priv_t; |
81 | |
18937 | 82 /// ass track represent either an external script or a matroska subtitle stream (no real difference between them) |
83 /// it can be used in rendering after the headers are parsed (i.e. events format line read) | |
84 typedef struct ass_track_s { | |
85 int n_styles; // amount used | |
86 int max_styles; // amount allocated | |
87 int n_events; | |
88 int max_events; | |
89 ass_style_t* styles; // array of styles, max_styles length, n_styles used | |
90 ass_event_t* events; // the same as styles | |
91 | |
92 char* style_format; // style format line (everything after "Format: ") | |
93 char* event_format; // event format line | |
94 | |
19492 | 95 enum {TRACK_TYPE_UNKNOWN = 0, TRACK_TYPE_ASS, TRACK_TYPE_SSA} track_type; |
18937 | 96 |
97 // script header fields | |
98 int PlayResX; | |
99 int PlayResY; | |
100 double Timer; | |
101 int WrapStyle; | |
102 | |
103 | |
104 int default_style; // index of default style | |
105 char* name; // file name in case of external subs, 0 for streams | |
19492 | 106 |
107 parser_priv_t* parser_priv; | |
18937 | 108 } ass_track_t; |
109 | |
110 #endif | |
111 |