1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-18 13:47:04 +00:00

Add VFCTRL_DRAW_EOSD.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19527 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
eugeni 2006-08-24 22:10:43 +00:00
parent fa94660a60
commit 2ddfdc85b3
4 changed files with 14 additions and 4 deletions

View File

@ -383,7 +383,12 @@ if(!mpi || drop_frame) return 0; // error / skipped frame
//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;

View File

@ -77,7 +77,8 @@ typedef struct vf_seteq_s
#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"

View File

@ -355,9 +355,13 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt)
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);
}

View File

@ -3644,7 +3644,7 @@ sh_video->vfilter=(void*)append_filters(sh_video->vfilter);
#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";