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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18937
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
1 #ifndef __ASS_TYPES_H__
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
2 #define __ASS_TYPES_H__
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
3
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
4 #define VALIGN_SUB 0
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
5 #define VALIGN_CENTER 8
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
6 #define VALIGN_TOP 4
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
7 #define HALIGN_LEFT 1
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
8 #define HALIGN_CENTER 2
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
9 #define HALIGN_RIGHT 3
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
10
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
11 /// ass Style: line
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
12 typedef struct ass_style_s {
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
13 char* Name;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
14 char* FontName;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
15 int FontSize;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
16 uint32_t PrimaryColour;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
17 uint32_t SecondaryColour;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
18 uint32_t OutlineColour;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
19 uint32_t BackColour;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
20 int Bold;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
21 int Italic;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
22 int Underline;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
23 int StrikeOut;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
24 double ScaleX;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
25 double ScaleY;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
26 int Spacing;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
27 int Angle;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
28 int BorderStyle;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
29 double Outline;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
30 double Shadow;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
31 int Alignment;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
32 int MarginL;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
33 int MarginR;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
34 int MarginV;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
35 // int AlphaLevel;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
36 int Encoding;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
37 } ass_style_t;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
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
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
41 /// ass_event_t corresponds to a single Dialogue line
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
42 /// Text is stored as-is, style overrides will be parsed later
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
43 typedef struct ass_event_s {
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
44 long long Start; // ms
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
45 long long Duration; // ms
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
46
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
47 int ReadOrder;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
48 int Layer;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
49 int Style;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
50 char* Name;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
51 int MarginL;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
52 int MarginR;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
53 int MarginV;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
54 char* Effect;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
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
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
58 } ass_event_t;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
59
19492
c8daf3471201 SSA/ASS parser reworked, with 2 main results:
eugeni
parents: 18937
diff changeset
60 typedef struct parser_priv_s parser_priv_t;
c8daf3471201 SSA/ASS parser reworked, with 2 main results:
eugeni
parents: 18937
diff changeset
61
18937
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
62 /// ass track represent either an external script or a matroska subtitle stream (no real difference between them)
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
63 /// it can be used in rendering after the headers are parsed (i.e. events format line read)
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
64 typedef struct ass_track_s {
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
65 int n_styles; // amount used
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
66 int max_styles; // amount allocated
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
67 int n_events;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
68 int max_events;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
69 ass_style_t* styles; // array of styles, max_styles length, n_styles used
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
70 ass_event_t* events; // the same as styles
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
71
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
72 char* style_format; // style format line (everything after "Format: ")
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
73 char* event_format; // event format line
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
74
19492
c8daf3471201 SSA/ASS parser reworked, with 2 main results:
eugeni
parents: 18937
diff changeset
75 enum {TRACK_TYPE_UNKNOWN = 0, TRACK_TYPE_ASS, TRACK_TYPE_SSA} track_type;
18937
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
76
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
77 // script header fields
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
78 int PlayResX;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
79 int PlayResY;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
80 double Timer;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
81 int WrapStyle;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
82
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
83
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
84 int default_style; // index of default style
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
85 char* name; // file name in case of external subs, 0 for streams
19492
c8daf3471201 SSA/ASS parser reworked, with 2 main results:
eugeni
parents: 18937
diff changeset
86
c8daf3471201 SSA/ASS parser reworked, with 2 main results:
eugeni
parents: 18937
diff changeset
87 parser_priv_t* parser_priv;
18937
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
88 } ass_track_t;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
89
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
90 #endif
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
91