2012-08-25 14:47:50 +00:00
|
|
|
#ifndef MPLAYER_DEC_SUB_H
|
|
|
|
#define MPLAYER_DEC_SUB_H
|
|
|
|
|
2012-09-28 19:19:36 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2013-11-24 11:58:06 +00:00
|
|
|
#include "osd.h"
|
2012-10-04 15:16:40 +00:00
|
|
|
|
2013-11-23 20:37:15 +00:00
|
|
|
struct sh_stream;
|
2012-08-25 18:22:39 +00:00
|
|
|
struct ass_track;
|
VO, sub: refactor
Remove VFCTRL_DRAW_OSD, VFCAP_EOSD_FILTER, VFCAP_EOSD_RGBA, VFCAP_EOSD,
VOCTRL_DRAW_EOSD, VOCTRL_GET_EOSD_RES, VOCTRL_QUERY_EOSD_FORMAT.
Remove draw_osd_with_eosd(), which rendered the OSD by calling
VOCTRL_DRAW_EOSD. Change VOs to call osd_draw() directly, which takes
a callback as argument. (This basically works like the old OSD API,
except multiple OSD bitmap formats are supported and caching is
possible.)
Remove all mentions of "eosd". It's simply "osd" now.
Make OSD size per-OSD-object, as they can be different when using
vf_sub. Include display_par/video_par in resolution change detection.
Fix the issue with margin borders in vo_corevideo.
2012-10-19 17:25:18 +00:00
|
|
|
struct MPOpts;
|
2013-06-01 17:44:12 +00:00
|
|
|
struct demux_packet;
|
|
|
|
struct ass_library;
|
|
|
|
struct ass_renderer;
|
2012-10-04 15:16:32 +00:00
|
|
|
|
2013-06-01 17:44:12 +00:00
|
|
|
struct dec_sub;
|
|
|
|
struct sd;
|
|
|
|
|
2013-06-28 23:34:11 +00:00
|
|
|
enum sd_ctrl {
|
|
|
|
SD_CTRL_SUB_STEP,
|
2013-07-14 23:48:25 +00:00
|
|
|
SD_CTRL_SET_VIDEO_PARAMS,
|
2013-06-28 23:34:11 +00:00
|
|
|
};
|
|
|
|
|
2013-06-01 17:44:12 +00:00
|
|
|
struct dec_sub *sub_create(struct MPOpts *opts);
|
|
|
|
void sub_destroy(struct dec_sub *sub);
|
|
|
|
|
|
|
|
void sub_set_video_res(struct dec_sub *sub, int w, int h);
|
2013-06-11 19:39:54 +00:00
|
|
|
void sub_set_video_fps(struct dec_sub *sub, double fps);
|
2013-06-01 17:44:12 +00:00
|
|
|
void sub_set_extradata(struct dec_sub *sub, void *data, int data_len);
|
|
|
|
void sub_set_ass_renderer(struct dec_sub *sub, struct ass_library *ass_library,
|
|
|
|
struct ass_renderer *ass_renderer);
|
2013-11-23 20:37:15 +00:00
|
|
|
void sub_init_from_sh(struct dec_sub *sub, struct sh_stream *sh);
|
2013-06-01 17:44:12 +00:00
|
|
|
|
|
|
|
bool sub_is_initialized(struct dec_sub *sub);
|
|
|
|
|
2013-11-23 20:37:15 +00:00
|
|
|
bool sub_read_all_packets(struct dec_sub *sub, struct sh_stream *sh);
|
2013-06-01 17:44:12 +00:00
|
|
|
bool sub_accept_packets_in_advance(struct dec_sub *sub);
|
|
|
|
void sub_decode(struct dec_sub *sub, struct demux_packet *packet);
|
|
|
|
void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, double pts,
|
2012-10-04 15:16:36 +00:00
|
|
|
struct sub_bitmaps *res);
|
2013-06-01 17:44:12 +00:00
|
|
|
bool sub_has_get_text(struct dec_sub *sub);
|
|
|
|
char *sub_get_text(struct dec_sub *sub, double pts);
|
|
|
|
void sub_reset(struct dec_sub *sub);
|
|
|
|
|
2013-06-28 23:34:11 +00:00
|
|
|
int sub_control(struct dec_sub *sub, enum sd_ctrl cmd, void *arg);
|
2012-09-01 17:49:04 +00:00
|
|
|
|
2012-08-25 14:47:50 +00:00
|
|
|
#endif
|