From 6db1c8f076e189bd750ade5c732bd09d710cef4b Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 20 Jul 2002 16:27:17 +0000 Subject: [PATCH] DR1 with IPB fixed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6761 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index b790df1835..e12e218eb9 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -747,6 +747,15 @@ static uint32_t draw_frame(uint8_t *src[]) 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 @@ static uint32_t get_image(mp_image_t *mpi){ } } 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 @@ static uint32_t control(uint32_t request, void *data, ...) 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: