[Mplayer-cvslog] CVS: main/libvo vosub_vidix.c,1.34,1.35

Nick Kurshev nick at mplayer.dev.hu
Fri Mar 8 17:16:02 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv4348/main/libvo

Modified Files:
	vosub_vidix.c 
Log Message:
VOCTRL_GET_IMAGE (untested but should work)

Index: vosub_vidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vosub_vidix.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- vosub_vidix.c	3 Mar 2002 16:53:12 -0000	1.34
+++ vosub_vidix.c	8 Mar 2002 16:15:54 -0000	1.35
@@ -28,6 +28,8 @@
 #include "fastmemcpy.h"
 #include "osd.h"
 #include "video_out.h"
+#include "../mp_image.h"
+
 
 #define NUM_FRAMES VID_PLAY_MAXFRAMES /* Temporary: driver will overwrite it */
 #define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */
@@ -658,6 +660,23 @@
 	return 0;
 }
 
+static uint32_t vidix_get_image(mp_image_t *mpi)
+{
+    if(mpi->type==MP_IMGTYPE_STATIC && vidix_play.num_frames>1) return VO_FALSE;
+    if(mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; /* slow video ram */
+    mpi->planes[0]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.y;
+    mpi->stride[0]=vidix_play.dest.pitch.y;
+    if(mpi->flags&MP_IMGFLAG_PLANAR)
+    {
+	mpi->planes[1]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.v;
+	mpi->stride[1]=vidix_play.dest.pitch.v;
+	mpi->planes[2]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.u;
+	mpi->stride[2]=vidix_play.dest.pitch.u;
+    }
+    mpi->flags|=MP_IMGFLAG_DIRECT;
+    return VO_TRUE;
+}
+
 uint32_t vidix_control(uint32_t request, void *data, ...)
 {
   switch (request) {
@@ -668,6 +687,8 @@
     return vidix_query_fourcc(*((uint32_t*)data));
   case VOCTRL_SCREENSHOT:
     return (*server_control)(request,data);
+  case VOCTRL_GET_IMAGE:
+    return vidix_get_image(data);
   }
   return VO_NOTIMPL;
 }




More information about the MPlayer-cvslog mailing list