Raise LIBASS_VERSION, forgotten in r31293.
[mplayer/glamo.git] / libass / ass_mp.h
blob2ae62ff04045202bdc72d9d8271a3182b62849b8
1 // -*- c-basic-offset: 8; indent-tabs-mode: t -*-
2 // vim:ts=8:sw=8:noet:ai:
3 /*
4 * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
6 * This file is part of libass.
8 * libass is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * libass is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with libass; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef LIBASS_MP_H
24 #define LIBASS_MP_H
26 #include "subreader.h"
27 #if defined(CONFIG_ASS_INTERNAL) || !defined(CONFIG_ASS)
28 #include "ass.h"
29 #else
30 #include <ass/ass.h>
31 #endif
32 #if defined(LIBASS_VERSION) && LIBASS_VERSION >= 0x00907010
33 #define ass_library_t ASS_Library
34 #define ass_track_t ASS_Track
35 #define ass_track_s ASS_Track
36 #define ass_renderer_t ASS_Renderer
37 #define ass_image_t ASS_Image
38 #define ass_style_t ASS_Style
39 #define ass_event_t ASS_Event
40 #define process_force_style(t) ass_process_force_style(t)
41 #else
42 void process_force_style(ass_track_t* track);
43 #endif
45 extern ass_library_t* ass_library;
46 extern int ass_enabled;
47 extern float ass_font_scale;
48 extern float ass_line_spacing;
49 extern int ass_top_margin;
50 extern int ass_bottom_margin;
51 extern int extract_embedded_fonts;
52 extern char **ass_force_style_list;
53 extern int ass_use_margins;
54 extern char* ass_color;
55 extern char* ass_border_color;
56 extern char* ass_styles_file;
57 extern int ass_hinting;
59 ass_track_t* ass_default_track(ass_library_t* library);
60 int ass_process_subtitle(ass_track_t* track, subtitle* sub);
61 ass_track_t* ass_read_subdata(ass_library_t* library, sub_data* subdata, double fps);
62 ass_track_t* ass_read_stream(ass_library_t* library, const char *fname, char *charset);
64 void ass_configure(ass_renderer_t* priv, int w, int h, int hinting);
65 void ass_configure_fonts(ass_renderer_t* priv);
66 ass_library_t* ass_init(void);
68 typedef struct {
69 ass_image_t* imgs;
70 int changed;
71 } mp_eosd_images_t;
73 extern int ass_force_reload;
74 ass_image_t* ass_mp_render_frame(ass_renderer_t *priv, ass_track_t* track, long long now, int* detect_change);
76 #endif /* LIBASS_MP_H */