Mercurial > mplayer.hg
changeset 19521:0be2d3583f4f
Add VFCTRL_DRAW_EOSD.
author | eugeni |
---|---|
date | Thu, 24 Aug 2006 22:10:43 +0000 |
parents | 46fa785e9026 |
children | 0aba40fe27e1 |
files | libmpcodecs/dec_video.c libmpcodecs/vf.h libmpcodecs/vf_ass.c mplayer.c |
diffstat | 4 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c Thu Aug 24 17:21:03 2006 +0000 +++ b/libmpcodecs/dec_video.c Thu Aug 24 22:10:43 2006 +0000 @@ -383,7 +383,12 @@ //vo_draw_image(video_out,mpi); vf=sh_video->vfilter; ret = vf->put_image(vf,mpi, pts); // apply video filters and call the leaf vo/ve -if(ret>0) vf->control(vf,VFCTRL_DRAW_OSD,NULL); +if(ret>0) { + vf->control(vf,VFCTRL_DRAW_OSD,NULL); +#ifdef USE_ASS + vf->control(vf,VFCTRL_DRAW_EOSD,NULL); +#endif +} t2=GetTimer()-t2; tt=t2*0.000001f;
--- a/libmpcodecs/vf.h Thu Aug 24 17:21:03 2006 +0000 +++ b/libmpcodecs/vf.h Thu Aug 24 22:10:43 2006 +0000 @@ -77,7 +77,8 @@ #define VFCTRL_SKIP_NEXT_FRAME 12 /* For encoding - drop the next frame that passes thru */ #define VFCTRL_FLUSH_FRAMES 13 /* For encoding - flush delayed frames */ #define VFCTRL_SCREENSHOT 14 /* Make a screenshot */ -#define VFCTRL_EOSD 15 /* Select EOSD renderer */ +#define VFCTRL_INIT_EOSD 15 /* Select EOSD renderer */ +#define VFCTRL_DRAW_EOSD 16 /* Render EOSD */ #include "vfcap.h"
--- a/libmpcodecs/vf_ass.c Thu Aug 24 17:21:03 2006 +0000 +++ b/libmpcodecs/vf_ass.c Thu Aug 24 22:10:43 2006 +0000 @@ -355,9 +355,13 @@ static int control(vf_instance_t *vf, int request, void *data) { - if (request == VFCTRL_EOSD) { + switch (request) { + case VFCTRL_INIT_EOSD: vf->priv->ass_priv = ass_init(); return vf->priv->ass_priv ? CONTROL_TRUE : CONTROL_FALSE; + case VFCTRL_DRAW_EOSD: + if (vf->priv->ass_priv) return CONTROL_TRUE; + break; } return vf_next_control(vf, request, data); }
--- a/mplayer.c Thu Aug 24 17:21:03 2006 +0000 +++ b/mplayer.c Thu Aug 24 22:10:43 2006 +0000 @@ -3644,7 +3644,7 @@ #ifdef USE_ASS if (ass_enabled) - ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_EOSD, 0); + ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, 0); #endif current_module="init_video_codec";