diff options
author | phintuka <phintuka> | 2013-08-19 08:20:30 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2013-08-19 08:20:30 +0000 |
commit | 219e385f69d10ca136b528f098717aaeb007eae4 (patch) | |
tree | 08045606da8db17421a8f63ba93ec9de49b07eef | |
parent | 474fd6ff97d28a6954eedda61e4e824e3a82000c (diff) | |
download | xineliboutput-219e385f69d10ca136b528f098717aaeb007eae4.tar.gz xineliboutput-219e385f69d10ca136b528f098717aaeb007eae4.tar.bz2 |
osdscaler: scale video window
-rw-r--r-- | xine/vo_osdscaler.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/xine/vo_osdscaler.c b/xine/vo_osdscaler.c index b661afdb..0d22c0cc 100644 --- a/xine/vo_osdscaler.c +++ b/xine/vo_osdscaler.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: vo_osdscaler.c,v 1.14 2013-01-16 13:25:44 phintuka Exp $ + * $Id: vo_osdscaler.c,v 1.15 2013-08-19 08:20:30 phintuka Exp $ * */ @@ -147,6 +147,18 @@ static osd_data_t *osd_data_init(vo_overlay_t *ovl, osd_data_t *next, data->ovl.width = x2 - data->ovl.x - 1; data->ovl.height = y2 - data->ovl.y - 1; +#ifdef VO_CAP_VIDEO_WINDOW_OVERLAY + if (ovl->video_window_x >= 0 && + ovl->video_window_y >= 0 && + ovl->video_window_width > 0 && + ovl->video_window_height > 0) { + data->ovl.video_window_x = (ovl->video_window_x * factor_x) >> 16; + data->ovl.video_window_y = (ovl->video_window_y * factor_y) >> 16; + data->ovl.video_window_width = (ovl->video_window_width * factor_x) >> 16; + data->ovl.video_window_height = (ovl->video_window_height * factor_y) >> 16; + } +#endif + data->ovl.rle = (rle_elem_t*) rle_scale_nearest((struct xine_rle_elem_s*)ovl->rle, &num_rle, ovl->width, ovl->height, |