summaryrefslogtreecommitdiffstats
path: root/sub/ass_mp.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-19 19:25:18 +0200
committerwm4 <wm4@nowhere>2012-10-24 21:56:34 +0200
commit4d11f32162b08e3b48ae382e2ed0a151035f8aea (patch)
treec588341bf672fd935de45a05bef99e0d8f20892f /sub/ass_mp.c
parenta4f9077f6c1a897120616cc70c1ca37c6a247be2 (diff)
downloadmpv-4d11f32162b08e3b48ae382e2ed0a151035f8aea.tar.bz2
mpv-4d11f32162b08e3b48ae382e2ed0a151035f8aea.tar.xz
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.
Diffstat (limited to 'sub/ass_mp.c')
-rw-r--r--sub/ass_mp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index 65b34d0a18..c4c418d5ba 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -228,7 +228,7 @@ ASS_Track *mp_ass_read_stream(ASS_Library *library, const char *fname,
}
void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts,
- struct mp_eosd_res *dim)
+ struct mp_osd_res *dim)
{
ass_set_frame_size(priv, dim->w, dim->h);
ass_set_margins(priv, dim->mt, dim->mb, dim->ml, dim->mr);
@@ -282,7 +282,7 @@ void mp_ass_render_frame(ASS_Renderer *renderer, ASS_Track *track, double time,
struct sub_bitmap **parts, struct sub_bitmaps *res)
{
int changed;
- res->imgs = ass_render_frame(renderer, track, time, &changed);
+ ASS_Image *imgs = ass_render_frame(renderer, track, time, &changed);
if (changed == 2)
res->bitmap_id = ++res->bitmap_pos_id;
else if (changed)
@@ -292,7 +292,7 @@ void mp_ass_render_frame(ASS_Renderer *renderer, ASS_Track *track, double time,
res->parts = *parts;
res->num_parts = 0;
int num_parts_alloc = MP_TALLOC_ELEMS(res->parts);
- for (struct ass_image *img = res->imgs; img; img = img->next) {
+ for (struct ass_image *img = imgs; img; img = img->next) {
if (img->w == 0 || img->h == 0)
continue;
if (res->num_parts >= num_parts_alloc) {