Mercurial > mplayer.hg
changeset 5643:3d9de27d9bd0
OSD handled by vf control()
author | arpi |
---|---|
date | Mon, 15 Apr 2002 22:41:28 +0000 |
parents | eb0cb6185e6c |
children | f1465a280612 |
files | libmpcodecs/dec_video.c libmpcodecs/vf.h libmpcodecs/vf_vo.c mplayer.c |
diffstat | 4 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c Mon Apr 15 22:08:50 2002 +0000 +++ b/libmpcodecs/dec_video.c Mon Apr 15 22:41:28 2002 +0000 @@ -194,16 +194,15 @@ } #endif -if(!mpi) return 0; // error / skipped frame - t2=GetTimer();t=t2-t; tt = t*0.000001f; video_time_usage+=tt; -if(drop_frame) return 0; +if(!mpi || drop_frame) return 0; // error / skipped frame //vo_draw_image(video_out,mpi); vf->put_image(vf,mpi); +vf->control(vf,VFCTRL_DRAW_OSD,NULL); t2=GetTimer()-t2; tt=t2*0.000001f;
--- a/libmpcodecs/vf.h Mon Apr 15 22:08:50 2002 +0000 +++ b/libmpcodecs/vf.h Mon Apr 15 22:41:28 2002 +0000 @@ -50,6 +50,8 @@ #define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */ #define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */ +#define VFCTRL_DRAW_OSD 7 + #include "vfcap.h" // functions:
--- a/libmpcodecs/vf_vo.c Mon Apr 15 22:08:50 2002 +0000 +++ b/libmpcodecs/vf_vo.c Mon Apr 15 22:41:28 2002 +0000 @@ -42,6 +42,11 @@ static int control(struct vf_instance_s* vf, int request, void* data){ + switch(request){ + case VFCTRL_DRAW_OSD: + video_out->draw_osd(); + return CONTROL_TRUE; + } // return video_out->control(request,data); return CONTROL_UNKNOWN; }
--- a/mplayer.c Mon Apr 15 22:08:50 2002 +0000 +++ b/mplayer.c Mon Apr 15 22:41:28 2002 +0000 @@ -1512,6 +1512,7 @@ sh_video->timer+=frame_time; time_frame+=frame_time; // for nosound // check for frame-drop: + current_module="check_framedrop"; if(sh_audio && !d_audio->eof){ float delay=audio_out->get_delay(); float d=(sh_video->timer)-(sh_audio->timer-delay); @@ -1538,8 +1539,8 @@ // ========================================================================== - current_module="draw_osd"; - if(vo_config_count) video_out->draw_osd(); +// current_module="draw_osd"; +// if(vo_config_count) video_out->draw_osd(); #ifdef HAVE_NEW_GUI if(use_gui) guiEventHandling();