From 0020d4b05c1a8fada2deb0e2a84ac1cf82febb93 Mon Sep 17 00:00:00 2001 From: arpi Date: Sun, 23 Feb 2003 20:40:21 +0000 Subject: [PATCH] start_slice() added - similar to get_image(), but is called when using slices git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9491 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf.c | 5 ++++- libmpcodecs/vf.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index f72aa5a3ad..a598a8248e 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -268,11 +268,14 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, mpi->flags|=MP_IMGFLAG_ALLOCATED; } } + if(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK) + if(vf->start_slice) vf->start_slice(vf,mpi); if(!(mpi->flags&MP_IMGFLAG_TYPE_DISPLAYED)){ - mp_msg(MSGT_DECVIDEO,MSGL_V,"*** [%s] %s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n", + mp_msg(MSGT_DECVIDEO,MSGL_V,"*** [%s] %s%s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n", vf->info->name, (mpi->type==MP_IMGTYPE_EXPORT)?"Exporting": ((mpi->flags&MP_IMGFLAG_DIRECT)?"Direct Rendering":"Allocating"), + (mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)?" (slices)":"", mpi->width,mpi->height,mpi->bpp, (mpi->flags&MP_IMGFLAG_YUV)?"YUV":((mpi->flags&MP_IMGFLAG_SWAPPED)?"BGR":"RGB"), (mpi->flags&MP_IMGFLAG_PLANAR)?"planar":"packed", diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h index fe04c467ef..ffe8ef934a 100644 --- a/libmpcodecs/vf.h +++ b/libmpcodecs/vf.h @@ -31,6 +31,8 @@ typedef struct vf_instance_s { mp_image_t *mpi); int (*put_image)(struct vf_instance_s* vf, mp_image_t *mpi); + void (*start_slice)(struct vf_instance_s* vf, + mp_image_t *mpi); void (*draw_slice)(struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y); void (*uninit)(struct vf_instance_s* vf);