changeset 28546:e887c2dd6c62

Move direct-rendering hack from vo_xvmc to vf_vo, so it does not need to be duplicated for other systems like VDPAU or VAAPI.
author reimar
date Sun, 15 Feb 2009 08:07:36 +0000
parents 36dfa8d26892
children 251985a9ad7e
files libmpcodecs/vf_vo.c libvo/vo_xvmc.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_vo.c	Sun Feb 15 07:54:25 2009 +0000
+++ b/libmpcodecs/vf_vo.c	Sun Feb 15 08:07:36 2009 +0000
@@ -165,7 +165,10 @@
 
 static void get_image(struct vf_instance_s* vf,
         mp_image_t *mpi){
-    if(vo_directrendering && vo_config_count)
+    if(!vo_config_count) return;
+    // GET_IMAGE is required for hardware-accelerated formats
+    if(vo_directrendering ||
+       IMGFMT_IS_XVMC(mpi->imgfmt) || IMGFMT_IS_VDPAU(mpi->imgfmt))
 	video_out->control(VOCTRL_GET_IMAGE,mpi);
 }
 
--- a/libvo/vo_xvmc.c	Sun Feb 15 07:54:25 2009 +0000
+++ b/libvo/vo_xvmc.c	Sun Feb 15 08:07:36 2009 +0000
@@ -683,7 +683,6 @@
    free_element = 0;
    first_frame = 1;
 
-   vo_directrendering = 1;//ugly hack, coz xvmc works only with direct rendering
    image_format=format;
    return 0;		
 }