changeset 7689:39e62d6592ca

since draw_slice() supports RGB/BGR, we don't need draw_image() for stride
author arpi
date Wed, 09 Oct 2002 22:44:07 +0000
parents 41d242c5bee1
children d8ce19f6b1fe
files libvo/vo_x11.c
diffstat 1 files changed, 3 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_x11.c	Wed Oct 09 22:37:27 2002 +0000
+++ b/libvo/vo_x11.c	Wed Oct 09 22:44:07 2002 +0000
@@ -532,13 +532,6 @@
 #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)
 {
     if (zoomFlag ||
@@ -575,9 +568,9 @@
 	if (IMGFMT_BGR_DEPTH(format) == 8)
 	    return 0; // TODO 8bpp not yet fully implemented
 	if (IMGFMT_BGR_DEPTH(format) == vo_depthonscreen)
-	    return 3|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP;
+	    return 3|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP|VFCAP_ACCEPT_STRIDE;
 	else
-	    return 1|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP;
+	    return 1|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP|VFCAP_ACCEPT_STRIDE;
     }
 
  switch( format )
@@ -592,7 +585,7 @@
    case IMGFMT_I420:
    case IMGFMT_IYUV:
    case IMGFMT_YV12:
-    return 1|VFCAP_OSD|VFCAP_SWSCALE;
+    return 1|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_ACCEPT_STRIDE;
   }
  return 0;
 }
@@ -636,8 +629,6 @@
     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;