mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 04:58:06 +00:00
OSD handled by vf control()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5644 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3fc73ead66
commit
ad94b5e132
@ -194,16 +194,15 @@ else if(gCpuCaps.hasMMX){
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!mpi) return 0; // error / skipped frame
|
|
||||||
|
|
||||||
t2=GetTimer();t=t2-t;
|
t2=GetTimer();t=t2-t;
|
||||||
tt = t*0.000001f;
|
tt = t*0.000001f;
|
||||||
video_time_usage+=tt;
|
video_time_usage+=tt;
|
||||||
|
|
||||||
if(drop_frame) return 0;
|
if(!mpi || drop_frame) return 0; // error / skipped frame
|
||||||
|
|
||||||
//vo_draw_image(video_out,mpi);
|
//vo_draw_image(video_out,mpi);
|
||||||
vf->put_image(vf,mpi);
|
vf->put_image(vf,mpi);
|
||||||
|
vf->control(vf,VFCTRL_DRAW_OSD,NULL);
|
||||||
|
|
||||||
t2=GetTimer()-t2;
|
t2=GetTimer()-t2;
|
||||||
tt=t2*0.000001f;
|
tt=t2*0.000001f;
|
||||||
|
@ -50,6 +50,8 @@ typedef struct vf_instance_s {
|
|||||||
#define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
|
#define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
|
||||||
#define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
|
#define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
|
||||||
|
|
||||||
|
#define VFCTRL_DRAW_OSD 7
|
||||||
|
|
||||||
#include "vfcap.h"
|
#include "vfcap.h"
|
||||||
|
|
||||||
// functions:
|
// functions:
|
||||||
|
@ -42,6 +42,11 @@ static int config(struct vf_instance_s* vf,
|
|||||||
|
|
||||||
static int control(struct vf_instance_s* vf,
|
static int control(struct vf_instance_s* vf,
|
||||||
int request, void* data){
|
int request, void* data){
|
||||||
|
switch(request){
|
||||||
|
case VFCTRL_DRAW_OSD:
|
||||||
|
video_out->draw_osd();
|
||||||
|
return CONTROL_TRUE;
|
||||||
|
}
|
||||||
// return video_out->control(request,data);
|
// return video_out->control(request,data);
|
||||||
return CONTROL_UNKNOWN;
|
return CONTROL_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
@ -1512,6 +1512,7 @@ if(!sh_video) {
|
|||||||
sh_video->timer+=frame_time;
|
sh_video->timer+=frame_time;
|
||||||
time_frame+=frame_time; // for nosound
|
time_frame+=frame_time; // for nosound
|
||||||
// check for frame-drop:
|
// check for frame-drop:
|
||||||
|
current_module="check_framedrop";
|
||||||
if(sh_audio && !d_audio->eof){
|
if(sh_audio && !d_audio->eof){
|
||||||
float delay=audio_out->get_delay();
|
float delay=audio_out->get_delay();
|
||||||
float d=(sh_video->timer)-(sh_audio->timer-delay);
|
float d=(sh_video->timer)-(sh_audio->timer-delay);
|
||||||
@ -1538,8 +1539,8 @@ if(!sh_video) {
|
|||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
current_module="draw_osd";
|
// current_module="draw_osd";
|
||||||
if(vo_config_count) video_out->draw_osd();
|
// if(vo_config_count) video_out->draw_osd();
|
||||||
|
|
||||||
#ifdef HAVE_NEW_GUI
|
#ifdef HAVE_NEW_GUI
|
||||||
if(use_gui) guiEventHandling();
|
if(use_gui) guiEventHandling();
|
||||||
|
Loading…
Reference in New Issue
Block a user