Mercurial > mplayer.hg
annotate libass/ass_types.h @ 19877:f16afec4c9c0
Fix missleading msg printed when subcp_open is given NULL as parameter (like as demux_ogg and demux_mkv do)
Patch by: Zuxy Meng %zuxy.meng A gmail P com%
Original Thread:
Message-ID: <a18e06b40609160400l74263121p5f41eaf3549caf5@mail.gmail.com>
Date: Sat, 16 Sep 2006 19:00:57 +0800
To: mplayer-dev-eng@mplayerhq.hu
Subject: [MPlayer-dev-eng] [PATCH] Remove erroneaus warning message in subreader.c
author | gpoirier |
---|---|
date | Mon, 18 Sep 2006 11:47:41 +0000 |
parents | a3473d990fed |
children | fa122b7c71c6 |
rev | line source |
---|---|
18937 | 1 #ifndef __ASS_TYPES_H__ |
2 #define __ASS_TYPES_H__ | |
3 | |
4 #define VALIGN_SUB 0 | |
5 #define VALIGN_CENTER 8 | |
6 #define VALIGN_TOP 4 | |
7 #define HALIGN_LEFT 1 | |
8 #define HALIGN_CENTER 2 | |
9 #define HALIGN_RIGHT 3 | |
10 | |
11 /// ass Style: line | |
12 typedef struct ass_style_s { | |
13 char* Name; | |
14 char* FontName; | |
15 int FontSize; | |
16 uint32_t PrimaryColour; | |
17 uint32_t SecondaryColour; | |
18 uint32_t OutlineColour; | |
19 uint32_t BackColour; | |
20 int Bold; | |
21 int Italic; | |
22 int Underline; | |
23 int StrikeOut; | |
24 double ScaleX; | |
25 double ScaleY; | |
26 int Spacing; | |
27 int Angle; | |
28 int BorderStyle; | |
29 double Outline; | |
30 double Shadow; | |
31 int Alignment; | |
32 int MarginL; | |
33 int MarginR; | |
34 int MarginV; | |
35 // int AlphaLevel; | |
36 int Encoding; | |
37 } ass_style_t; | |
38 | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
39 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
|
40 |
18937 | 41 /// ass_event_t corresponds to a single Dialogue line |
42 /// Text is stored as-is, style overrides will be parsed later | |
43 typedef struct ass_event_s { | |
44 long long Start; // ms | |
45 long long Duration; // ms | |
46 | |
47 int ReadOrder; | |
48 int Layer; | |
49 int Style; | |
50 char* Name; | |
51 int MarginL; | |
52 int MarginR; | |
53 int MarginV; | |
54 char* Effect; | |
55 char* Text; | |
19638
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
56 |
a3473d990fed
Better collision detection algorithm. The idea is to keep a subtitle in place
eugeni
parents:
19492
diff
changeset
|
57 render_priv_t* render_priv; |
18937 | 58 } ass_event_t; |
59 | |
19492 | 60 typedef struct parser_priv_s parser_priv_t; |
61 | |
18937 | 62 /// ass track represent either an external script or a matroska subtitle stream (no real difference between them) |
63 /// it can be used in rendering after the headers are parsed (i.e. events format line read) | |
64 typedef struct ass_track_s { | |
65 int n_styles; // amount used | |
66 int max_styles; // amount allocated | |
67 int n_events; | |
68 int max_events; | |
69 ass_style_t* styles; // array of styles, max_styles length, n_styles used | |
70 ass_event_t* events; // the same as styles | |
71 | |
72 char* style_format; // style format line (everything after "Format: ") | |
73 char* event_format; // event format line | |
74 | |
19492 | 75 enum {TRACK_TYPE_UNKNOWN = 0, TRACK_TYPE_ASS, TRACK_TYPE_SSA} track_type; |
18937 | 76 |
77 // script header fields | |
78 int PlayResX; | |
79 int PlayResY; | |
80 double Timer; | |
81 int WrapStyle; | |
82 | |
83 | |
84 int default_style; // index of default style | |
85 char* name; // file name in case of external subs, 0 for streams | |
19492 | 86 |
87 parser_priv_t* parser_priv; | |
18937 | 88 } ass_track_t; |
89 | |
90 #endif | |
91 |