2006-10-01 17:09:04 +00:00
|
|
|
// -*- c-basic-offset: 8; indent-tabs-mode: t -*-
|
|
|
|
// vim:ts=8:sw=8:noet:ai:
|
|
|
|
/*
|
2008-05-13 08:02:23 +00:00
|
|
|
* Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
|
|
|
|
*
|
2008-05-14 17:21:58 +00:00
|
|
|
* This file is part of libass.
|
2008-05-13 08:02:23 +00:00
|
|
|
*
|
2008-05-14 17:21:58 +00:00
|
|
|
* libass is free software; you can redistribute it and/or modify
|
2008-05-13 08:02:23 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2008-05-14 17:21:58 +00:00
|
|
|
* libass is distributed in the hope that it will be useful,
|
2008-05-13 08:02:23 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
2008-05-14 17:21:58 +00:00
|
|
|
* with libass; if not, write to the Free Software Foundation, Inc.,
|
2008-05-13 08:02:23 +00:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2006-10-01 17:09:04 +00:00
|
|
|
|
2008-01-29 23:25:11 +00:00
|
|
|
#ifndef LIBASS_MP_H
|
|
|
|
#define LIBASS_MP_H
|
2006-07-07 18:26:51 +00:00
|
|
|
|
2006-08-15 19:25:46 +00:00
|
|
|
#include "subreader.h"
|
2010-01-01 18:51:59 +00:00
|
|
|
#if defined(CONFIG_ASS_INTERNAL) || !defined(CONFIG_ASS)
|
2008-03-05 08:24:09 +00:00
|
|
|
#include "ass.h"
|
2009-12-19 15:41:47 +00:00
|
|
|
#else
|
|
|
|
#include <ass/ass.h>
|
|
|
|
#endif
|
2010-01-08 18:07:12 +00:00
|
|
|
#if defined(LIBASS_VERSION) && LIBASS_VERSION >= 0x00907010
|
2009-12-24 10:51:24 +00:00
|
|
|
#define ass_library_t ASS_Library
|
|
|
|
#define ass_track_t ASS_Track
|
|
|
|
#define ass_track_s ASS_Track
|
|
|
|
#define ass_renderer_t ASS_Renderer
|
|
|
|
#define ass_image_t ASS_Image
|
|
|
|
#define ass_style_t ASS_Style
|
|
|
|
#define ass_event_t ASS_Event
|
2009-12-24 10:56:25 +00:00
|
|
|
#define process_force_style(t) ass_process_force_style(t)
|
|
|
|
#else
|
|
|
|
void process_force_style(ass_track_t* track);
|
2009-12-24 10:51:24 +00:00
|
|
|
#endif
|
2006-08-15 19:25:46 +00:00
|
|
|
|
2006-10-28 15:07:18 +00:00
|
|
|
extern ass_library_t* ass_library;
|
2006-07-07 18:26:51 +00:00
|
|
|
extern int ass_enabled;
|
|
|
|
extern float ass_font_scale;
|
|
|
|
extern float ass_line_spacing;
|
|
|
|
extern int ass_top_margin;
|
|
|
|
extern int ass_bottom_margin;
|
|
|
|
extern int extract_embedded_fonts;
|
2006-08-22 23:20:05 +00:00
|
|
|
extern char **ass_force_style_list;
|
2006-08-28 15:12:45 +00:00
|
|
|
extern int ass_use_margins;
|
2006-09-03 12:18:49 +00:00
|
|
|
extern char* ass_color;
|
|
|
|
extern char* ass_border_color;
|
2006-09-03 17:42:31 +00:00
|
|
|
extern char* ass_styles_file;
|
2007-04-27 14:25:36 +00:00
|
|
|
extern int ass_hinting;
|
2006-07-07 18:26:51 +00:00
|
|
|
|
2006-10-28 15:07:18 +00:00
|
|
|
ass_track_t* ass_default_track(ass_library_t* library);
|
2006-09-02 20:46:26 +00:00
|
|
|
int ass_process_subtitle(ass_track_t* track, subtitle* sub);
|
2006-10-28 15:07:18 +00:00
|
|
|
ass_track_t* ass_read_subdata(ass_library_t* library, sub_data* subdata, double fps);
|
2010-02-25 22:51:23 +00:00
|
|
|
ass_track_t* ass_read_stream(ass_library_t* library, const char *fname, char *charset);
|
2006-08-15 19:25:46 +00:00
|
|
|
|
2007-04-27 14:25:36 +00:00
|
|
|
void ass_configure(ass_renderer_t* priv, int w, int h, int hinting);
|
2006-11-05 18:56:31 +00:00
|
|
|
void ass_configure_fonts(ass_renderer_t* priv);
|
2007-04-01 21:59:54 +00:00
|
|
|
ass_library_t* ass_init(void);
|
2006-10-26 20:08:46 +00:00
|
|
|
|
2006-12-06 18:44:26 +00:00
|
|
|
typedef struct {
|
|
|
|
ass_image_t* imgs;
|
|
|
|
int changed;
|
|
|
|
} mp_eosd_images_t;
|
|
|
|
|
2008-01-23 21:18:30 +00:00
|
|
|
extern int ass_force_reload;
|
|
|
|
ass_image_t* ass_mp_render_frame(ass_renderer_t *priv, ass_track_t* track, long long now, int* detect_change);
|
|
|
|
|
2008-01-29 23:25:11 +00:00
|
|
|
#endif /* LIBASS_MP_H */
|