From a0706a81cbbc2d24183004db43e43ca4d158af4e Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 10 Apr 2004 15:31:10 +0000 Subject: colorkey unscaled overlay support by Yann Vernier CVS patchset: 6381 CVS date: 2004/04/10 15:31:10 --- src/video_out/video_out_xv.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/video_out/video_out_xv.c') diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 6104c55d9..cf192db6f 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.195 2004/04/09 15:29:33 mroi Exp $ + * $Id: video_out_xv.c,v 1.196 2004/04/10 15:31:10 miguelfreitas Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -1107,8 +1107,11 @@ static void xv_check_capability (xv_driver_t *this, xv_set_property (&this->vo_driver, property, entry->num_value); if (strcmp(str_prop, "XV_COLORKEY") == 0) { - this->use_colorkey = 1; + this->use_colorkey |= 1; this->colorkey = entry->num_value; + } else if(strcmp(str_prop, "XV_AUTOPAINT_COLORKEY") == 0) { + if(entry->num_value==1) + this->use_colorkey |= 2; /* colorkey is autopainted */ } } else this->props[property].value = int_default; @@ -1367,7 +1370,15 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi this->deinterlace_enabled = 0; XLockDisplay (this->display); - this->xoverlay = x11osd_create (this->xine, this->display, this->screen, this->drawable); + if(this->use_colorkey==1) { + this->xoverlay = x11osd_create (this->xine, this->display, this->screen, + this->drawable, X11OSD_COLORKEY); + if(this->xoverlay) + x11osd_colorkey(this->xoverlay, this->colorkey, &this->sc); + } else { + this->xoverlay = x11osd_create (this->xine, this->display, this->screen, + this->drawable, X11OSD_SHAPED); + } XUnlockDisplay (this->display); if( this->xoverlay ) -- cgit v1.2.3