summaryrefslogtreecommitdiffstats
path: root/sub/osd_libass.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/osd_libass.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/osd_libass.c')
-rw-r--r--sub/osd_libass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index a182c6bdf2..4a6a0c88cb 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -191,7 +191,7 @@ static void update_progbar(struct osd_state *osd, struct osd_object *obj)
// Assume the OSD bar takes 2/3 of the OSD width at PlayResY=288 and
// FontSize=22 with an OSD aspect ratio of 16:9. Rescale as needed.
// xxx can fail when unknown fonts are involved
- double asp = (double)osd->res.w / osd->res.h;
+ double asp = (double)obj->vo_res.w / obj->vo_res.h;
double scale = (asp / 1.77777) * (obj->osd_track->PlayResY / 288.0);
style->ScaleX = style->ScaleY = scale;
style->FontSize = 22.0;
@@ -282,8 +282,8 @@ void osd_object_get_bitmaps(struct osd_state *osd, struct osd_object *obj,
if (!obj->osd_track)
return;
- ass_set_frame_size(osd->osd_render, osd->res.w, osd->res.h);
- ass_set_aspect_ratio(osd->osd_render, osd->res.display_par, 1.0);
+ ass_set_frame_size(osd->osd_render, obj->vo_res.w, obj->vo_res.h);
+ ass_set_aspect_ratio(osd->osd_render, obj->vo_res.display_par, 1.0);
mp_ass_render_frame(osd->osd_render, obj->osd_track, 0,
&obj->parts_cache, out_imgs);
talloc_steal(obj, obj->parts_cache);