# HG changeset patch # User arpi # Date 1018910488 0 # Node ID 3d9de27d9bd062f00e0e062b769c157cfe682ba0 # Parent eb0cb6185e6c11e5cb1e4745e8d658b6fc34f3d0 OSD handled by vf control() diff -r eb0cb6185e6c -r 3d9de27d9bd0 libmpcodecs/dec_video.c --- 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; diff -r eb0cb6185e6c -r 3d9de27d9bd0 libmpcodecs/vf.h --- 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: diff -r eb0cb6185e6c -r 3d9de27d9bd0 libmpcodecs/vf_vo.c --- 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; } diff -r eb0cb6185e6c -r 3d9de27d9bd0 mplayer.c --- 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();