[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.118,1.119
Arpi of Ize
arpi at mplayerhq.hu
Wed Oct 9 22:32:56 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv24430
Modified Files:
vo_x11.c
Log Message:
- implemented draw_image()
- removed unneeded if(!gui) from preinit
Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- vo_x11.c 28 Sep 2002 20:09:14 -0000 1.118
+++ vo_x11.c 9 Oct 2002 20:32:41 -0000 1.119
@@ -1,20 +1,4 @@
-/*
- * video_out_x11.c,X11 interface
- *
- *
- * Copyright ( C ) 1996,MPEG Software Simulation Group. All Rights Reserved.
- *
- * Hacked into mpeg2dec by
- *
- * Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
- *
- * 15 & 16 bpp support added by Franck Sicard <Franck.Sicard at solsoft.fr>
- * use swScaler instead of lots of tricky converters by Michael Niedermayer <michaelni at gmx.at>
- * runtime fullscreen switching by alex
- *
- */
-
#include <stdio.h>
#include <stdlib.h>
#include <string.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;
More information about the MPlayer-cvslog
mailing list