changeset 6760:d4db17f7271a

DR1 with IPB fixed
author arpi
date Sat, 20 Jul 2002 16:27:17 +0000
parents 415be01747ae
children cb1180ccac76
files libvo/vo_xv.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xv.c	Sat Jul 20 16:26:49 2002 +0000
+++ b/libvo/vo_xv.c	Sat Jul 20 16:27:17 2002 +0000
@@ -747,6 +747,15 @@
   return 0;
 }
 
+static uint32_t draw_image(mp_image_t *mpi){
+    if(mpi->flags&MP_IMGFLAG_DIRECT){
+	// direct rendering:
+	current_buf=(int)(mpi->priv);	// hack!
+	return VO_TRUE;
+    }
+    return VO_FALSE; // not (yet) supported
+}
+
 static uint32_t get_image(mp_image_t *mpi){
     int buf=current_buf; // we shouldn't change current_buf unless we do DR!
     if(mpi->type==MP_IMGTYPE_STATIC && num_buffers>1) return VO_FALSE; // it is not static
@@ -786,6 +795,7 @@
 	    }
 	}
        mpi->flags|=MP_IMGFLAG_DIRECT;
+       mpi->priv=(void*)current_buf;
 //	printf("mga: get_image() SUCCESS -> Direct Rendering ENABLED\n");
        return VO_TRUE;
     }
@@ -888,6 +898,8 @@
     return query_format(*((uint32_t*)data));
   case VOCTRL_GET_IMAGE:
     return get_image(data);
+  case VOCTRL_DRAW_IMAGE:
+    return draw_image(data);
   case VOCTRL_GUISUPPORT:
     return VO_TRUE;
   case VOCTRL_GET_PANSCAN: