Mercurial > mplayer.hg
annotate libass/ass_types.h @ 36965:5fb43d5efdca
configure: add CONFIG_CABAC
fix ffmpeg linking
author | michael |
---|---|
date | Tue, 25 Mar 2014 00:15:02 +0000 |
parents | c3aaaf17c721 |
children |
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 * |
34011 | 6 * Permission to use, copy, modify, and distribute this software for any |
7 * purpose with or without fee is hereby granted, provided that the above | |
8 * copyright notice and this permission notice appear in all copies. | |
26723 | 9 * |
34011 | 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
26723 | 17 */ |
20008
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19638
diff
changeset
|
18 |
25897
aaebaf255b23
Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents:
25535
diff
changeset
|
19 #ifndef LIBASS_TYPES_H |
aaebaf255b23
Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents:
25535
diff
changeset
|
20 #define LIBASS_TYPES_H |
18937 | 21 |
26138
74055622161d
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
25897
diff
changeset
|
22 #include <stdint.h> |
74055622161d
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
25897
diff
changeset
|
23 |
18937 | 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 | |
30200 | 31 /* Opaque objects internally used by libass. Contents are private. */ |
32 typedef struct ass_renderer ASS_Renderer; | |
33 typedef struct render_priv ASS_RenderPriv; | |
34 typedef struct parser_priv ASS_ParserPriv; | |
35 typedef struct ass_library ASS_Library; | |
18937 | 36 |
30200 | 37 /* ASS Style: line */ |
38 typedef struct ass_style { | |
39 char *Name; | |
40 char *FontName; | |
41 double FontSize; | |
42 uint32_t PrimaryColour; | |
43 uint32_t SecondaryColour; | |
44 uint32_t OutlineColour; | |
45 uint32_t BackColour; | |
46 int Bold; | |
47 int Italic; | |
48 int Underline; | |
49 int StrikeOut; | |
50 double ScaleX; | |
51 double ScaleY; | |
52 double Spacing; | |
36363 | 53 double Angle; |
30200 | 54 int BorderStyle; |
55 double Outline; | |
56 double Shadow; | |
57 int Alignment; | |
58 int MarginL; | |
59 int MarginR; | |
60 int MarginV; | |
61 int Encoding; | |
62 int treat_fontname_as_pattern; | |
36363 | 63 double Blur; |
30200 | 64 } ASS_Style; |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
65 |
30200 | 66 /* |
67 * ASS_Event corresponds to a single Dialogue line; | |
68 * text is stored as-is, style overrides will be parsed later. | |
69 */ | |
70 typedef struct ass_event { | |
71 long long Start; // ms | |
72 long long Duration; // ms | |
18937 | 73 |
30200 | 74 int ReadOrder; |
75 int Layer; | |
76 int Style; | |
77 char *Name; | |
78 int MarginL; | |
79 int MarginR; | |
80 int MarginV; | |
81 char *Effect; | |
82 char *Text; | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
83 |
30200 | 84 ASS_RenderPriv *render_priv; |
85 } ASS_Event; | |
20477 | 86 |
30200 | 87 /* |
88 * ass track represent either an external script or a matroska subtitle stream | |
89 * (no real difference between them); it can be used in rendering after the | |
90 * headers are parsed (i.e. events format line read). | |
91 */ | |
92 typedef struct ass_track { | |
93 int n_styles; // amount used | |
94 int max_styles; // amount allocated | |
95 int n_events; | |
96 int max_events; | |
97 ASS_Style *styles; // array of styles, max_styles length, n_styles used | |
98 ASS_Event *events; // the same as styles | |
18937 | 99 |
30200 | 100 char *style_format; // style format line (everything after "Format: ") |
101 char *event_format; // event format line | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28860
diff
changeset
|
102 |
30200 | 103 enum { |
104 TRACK_TYPE_UNKNOWN = 0, | |
105 TRACK_TYPE_ASS, | |
106 TRACK_TYPE_SSA | |
107 } track_type; | |
18937 | 108 |
30200 | 109 // Script header fields |
110 int PlayResX; | |
111 int PlayResY; | |
112 double Timer; | |
113 int WrapStyle; | |
114 int ScaledBorderAndShadow; | |
115 int Kerning; | |
34295 | 116 char *Language; |
36363 | 117 enum { |
118 YCBCR_DEFAULT = 0, // TV.601 on YCbCr video, None on RGB video | |
119 YCBCR_UNKNOWN, | |
120 YCBCR_NONE, // untouched RGB values | |
121 YCBCR_BT601_TV, | |
122 YCBCR_BT601_PC, | |
123 YCBCR_BT709_TV, | |
124 YCBCR_BT709_PC, | |
125 YCBCR_SMPTE240M_TV, | |
126 YCBCR_SMPTE240M_PC, | |
127 YCBCR_FCC_TV, | |
128 YCBCR_FCC_PC | |
129 } YCbCrMatrix; | |
19492 | 130 |
30200 | 131 int default_style; // index of default style |
132 char *name; // file name in case of external subs, 0 for streams | |
133 | |
134 ASS_Library *library; | |
135 ASS_ParserPriv *parser_priv; | |
136 } ASS_Track; | |
18937 | 137 |
25897
aaebaf255b23
Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents:
25535
diff
changeset
|
138 #endif /* LIBASS_TYPES_H */ |