Update sources
[mplayer/kovensky.git] / ass_mp.h
blob9e4da23ff010152e6cf8b3bff15ae299e66823c9
1 /*
2 * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
4 * This file is part of MPlayer.
6 * MPlayer 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 * MPlayer 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 along
17 * with libass; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef MPLAYER_ASS_MP_H
22 #define MPLAYER_ASS_MP_H
24 #include <stdint.h>
26 #include "ass_mp.h"
28 #include "subreader.h"
30 #ifdef CONFIG_ASS
31 #include <ass/ass.h>
32 #include <ass/ass_types.h>
34 extern ASS_Library *ass_library;
35 extern int ass_enabled;
36 extern float ass_font_scale;
37 extern float ass_line_spacing;
38 extern int ass_top_margin;
39 extern int ass_bottom_margin;
40 extern int extract_embedded_fonts;
41 extern char **ass_force_style_list;
42 extern int ass_use_margins;
43 extern char *ass_color;
44 extern char *ass_border_color;
45 extern char *ass_styles_file;
46 extern int ass_hinting;
48 ASS_Track *ass_default_track(ASS_Library *library);
49 int ass_process_subtitle(ASS_Track *track, subtitle *sub);
50 ASS_Track *ass_read_subdata(ASS_Library *library, sub_data *subdata,
51 double fps);
53 void ass_configure(ASS_Renderer *priv, int w, int h, int hinting);
54 void ass_configure_fonts(ASS_Renderer *priv);
55 ASS_Library *ass_init(void);
57 extern int ass_force_reload;
58 ASS_Image *ass_mp_render_frame(ASS_Renderer *priv, ASS_Track *track,
59 long long now, int *detect_change);
61 #else /* CONFIG_ASS */
63 /* Needed for EOSD code using this type to compile */
65 typedef struct ass_image {
66 int w, h;
67 int stride;
68 unsigned char *bitmap;
69 uint32_t color;
70 int dst_x, dst_y;
71 struct ass_image *next;
72 } ASS_Image;
74 #endif
76 typedef struct {
77 ASS_Image *imgs;
78 int changed;
79 } mp_eosd_images_t;
82 #endif /* MPLAYER_ASS_MP_H */