diff options
author | phintuka <phintuka> | 2010-07-17 12:06:53 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-07-17 12:06:53 +0000 |
commit | 8ef7b0ae0868f9485de67b4c70cd3c185440607d (patch) | |
tree | b461e159ac830ddccf2e73fdfdae62b48a25302c | |
parent | cddf01134104c6b6a9e510b4696086fd9897dbe0 (diff) | |
download | xineliboutput-8ef7b0ae0868f9485de67b4c70cd3c185440607d.tar.gz xineliboutput-8ef7b0ae0868f9485de67b4c70cd3c185440607d.tar.bz2 |
Added support for yaepg(hd) video window with HUD OSD
(patch #3013050, thanks to grueni75)
-rw-r--r-- | xine_sxfe_frontend.c | 53 |
1 files changed, 51 insertions, 2 deletions
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c index 0093bcac..832b45fb 100644 --- a/xine_sxfe_frontend.c +++ b/xine_sxfe_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_sxfe_frontend.c,v 1.132 2010-07-15 13:04:35 phintuka Exp $ + * $Id: xine_sxfe_frontend.c,v 1.133 2010-07-17 12:06:53 phintuka Exp $ * */ @@ -817,6 +817,46 @@ static int hud_osd_command(frontend_t *this_gen, struct osd_command_s *cmd) return 1; } +static void hud_frame_output_cb (void *data, + int video_width, int video_height, + double video_pixel_aspect, + int *dest_x, int *dest_y, + int *dest_width, int *dest_height, + double *dest_pixel_aspect, + int *win_x, int *win_y) +{ + sxfe_t *this = (sxfe_t*)data; + + /* Call the original handler */ + this->x.frame_output_handler(data, + video_width, video_height, + video_pixel_aspect, + dest_x, dest_y, + dest_width, dest_height, + dest_pixel_aspect, + win_x, win_y); + + /* Set the desitination position if the video window is active */ + if (this->video_win_active) { + + /* Clear the window if the size has changed */ + if (this->video_win_changed) { + Window win = this->window[this->fullscreen ? 1 : 0]; + GC gc = XCreateGC(this->display, win, 0, NULL); + XSetForeground(this->display, gc, 0x00000000); + XFillRectangle(this->display, win, gc, 0, 0, this->x.width-1, this->x.height-1); + XFreeGC(this->display, gc); + } + + *dest_x = this->video_win_x; + *dest_y = this->video_win_y; + *dest_width = this->video_win_w; + *dest_height = this->video_win_h; + } + + this->video_win_changed = 0; +} + static int hud_osd_open(sxfe_t *this) { if(this && this->hud) { @@ -900,8 +940,17 @@ static int hud_osd_open(sxfe_t *this) XUnlockDisplay(this->display); this->fe.xine_osd_command = hud_osd_command; + + if (this->x.scale_video) { + // Enable this if you want to have video window support (e.g., for yaepghd) + // However, vdpau does not support this. Works ok for xv + this->x.vis_x11.frame_output_cb = hud_frame_output_cb; + } + + return 1; } - return 1; + + return 0; } /* |