diff libmpcodecs/vf_vo.c @ 28611:00c0123b6df3

Add VOCAP_NOSLICES and use it to allow vo_vdpau to not support slices for YV12 - since VDPAU only has functions to upload the full frame at once there is no sense in supporting draw_slice for that.
author reimar
date Wed, 18 Feb 2009 12:30:15 +0000
parents e887c2dd6c62
children 3a3370c00ba6
line wrap: on
line diff
--- a/libmpcodecs/vf_vo.c	Wed Feb 18 10:32:07 2009 +0000
+++ b/libmpcodecs/vf_vo.c	Wed Feb 18 12:30:15 2009 +0000
@@ -32,6 +32,7 @@
 #define video_out (vf->priv->vo)
 
 static int query_format(struct vf_instance_s* vf, unsigned int fmt); /* forward declaration */
+static void draw_slice(struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y);
 
 static int config(struct vf_instance_s* vf,
         int width, int height, int d_width, int d_height,
@@ -61,6 +62,7 @@
 
     // save vo's stride capability for the wanted colorspace:
     vf->default_caps=query_format(vf,outfmt);
+    vf->draw_slice = (vf->default_caps & VOCAP_NOSLICES) ? NULL : draw_slice;
 
     if(config_video_out(video_out,width,height,d_width,d_height,flags,"MPlayer",outfmt))
 	return 0;