Mercurial > mplayer.hg
changeset 7683:2f802d9323de
- implemented draw_image()
- removed unneeded if(!gui) from preinit
author | arpi |
---|---|
date | Wed, 09 Oct 2002 20:32:41 +0000 |
parents | 71758531a52d |
children | d4ded16d66dc |
files | libvo/vo_x11.c |
diffstat | 1 files changed, 16 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_x11.c Wed Oct 09 19:03:17 2002 +0000 +++ b/libvo/vo_x11.c Wed Oct 09 20:32:41 2002 +0000 @@ -1,19 +1,3 @@ - -/* - * video_out_x11.c,X11 interface - * - * - * Copyright ( C ) 1996,MPEG Software Simulation Group. All Rights Reserved. - * - * Hacked into mpeg2dec by - * - * Aaron Holtzman <aholtzma@ess.engr.uvic.ca> - * - * 15 & 16 bpp support added by Franck Sicard <Franck.Sicard@solsoft.fr> - * use swScaler instead of lots of tricky converters by Michael Niedermayer <michaelni@gmx.at> - * runtime fullscreen switching by alex - * - */ #include <stdio.h> #include <stdlib.h> @@ -531,6 +515,7 @@ } static uint32_t draw_frame( uint8_t *src[] ){ +#if 0 int stride[3]= {0,0,0}; if (in_format==IMGFMT_YUY2) stride[0]=srcW*2; @@ -541,6 +526,17 @@ else if(in_format==IMGFMT_BGR32) stride[0]=srcW*4; return draw_slice(src, stride, srcW, srcH, 0, 0); +#else + printf("draw_frame() called!!!!!!\n"); + return -1; +#endif +} + +static uint32_t draw_image(mp_image_t *mpi){ + // if -dr or -slices then do nothing: + if(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK)) return VO_TRUE; + draw_slice(mpi->planes,mpi->stride,mpi->w,mpi->h,0,0); + return VO_TRUE; } static uint32_t get_image(mp_image_t *mpi) @@ -602,8 +598,7 @@ } -static void -uninit(void) +static void uninit(void) { if(!myximage) return; @@ -628,11 +623,7 @@ return ENOSYS; } -#ifdef HAVE_NEW_GUI - if ( !use_gui ) -#endif - if( !vo_init() ) return -1; // Can't open X11 - + if( !vo_init() ) return -1; // Can't open X11 return 0; } @@ -645,6 +636,8 @@ return VO_TRUE; case VOCTRL_GET_IMAGE: return get_image(data); + case VOCTRL_DRAW_IMAGE: + return draw_image(data); case VOCTRL_FULLSCREEN: vo_x11_fullscreen(); return VO_TRUE;