1 // -*- c-basic-offset: 8; indent-tabs-mode: t -*-
2 // vim:ts=8:sw=8:noet:ai:
4 Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #define VALIGN_CENTER 8
28 #define HALIGN_CENTER 2
29 #define HALIGN_RIGHT 3
32 typedef struct ass_style_s
{
36 uint32_t PrimaryColour
;
37 uint32_t SecondaryColour
;
38 uint32_t OutlineColour
;
59 typedef struct render_priv_s render_priv_t
;
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
77 render_priv_t
* render_priv
;
80 typedef struct parser_priv_s parser_priv_t
;
82 typedef struct ass_library_s ass_library_t
;
84 /// ass track represent either an external script or a matroska subtitle stream (no real difference between them)
85 /// it can be used in rendering after the headers are parsed (i.e. events format line read)
86 typedef struct ass_track_s
{
87 int n_styles
; // amount used
88 int max_styles
; // amount allocated
91 ass_style_t
* styles
; // array of styles, max_styles length, n_styles used
92 ass_event_t
* events
; // the same as styles
94 char* style_format
; // style format line (everything after "Format: ")
95 char* event_format
; // event format line
97 enum {TRACK_TYPE_UNKNOWN
= 0, TRACK_TYPE_ASS
, TRACK_TYPE_SSA
} track_type
;
99 // script header fields
106 int default_style
; // index of default style
107 char* name
; // file name in case of external subs, 0 for streams
109 ass_library_t
* library
;
110 parser_priv_t
* parser_priv
;
113 #endif /* ASS_TYPES_H */