mirror of https://github.com/mpv-player/mpv
vo: remove VOCTRL_GET_RECENT_FLIP_TIME
It doesn't have any real purpose anymore. Up until now, it was still implemented by vo_wayland, but since we changed how the frame callbacks work, even that appears to be pointless. Originally, the plan was to somehow extend this mechanism to all backends and to magically fix frame scheduling, but since we can't hope for proper mechanisms even on wayland, this idea looks way less interesting.
This commit is contained in:
parent
b2e8d5749b
commit
2e401201ad
|
@ -796,8 +796,6 @@ static int vo_cocoa_control_async(struct vo *vo, int *events, int request, void
|
|||
case VOCTRL_CHECK_EVENTS:
|
||||
*events |= vo_cocoa_check_events(vo);
|
||||
return VO_TRUE;
|
||||
case VOCTRL_GET_RECENT_FLIP_TIME:
|
||||
return VO_FALSE; // unsupported, but avoid syncing with main thread
|
||||
}
|
||||
return VO_NOTIMPL;
|
||||
}
|
||||
|
|
|
@ -727,14 +727,7 @@ static bool render_frame(struct vo *vo)
|
|||
vo->driver->flip_page(vo);
|
||||
|
||||
int64_t prev_flip = in->last_flip;
|
||||
|
||||
in->last_flip = -1;
|
||||
|
||||
vo->driver->control(vo, VOCTRL_GET_RECENT_FLIP_TIME, &in->last_flip);
|
||||
|
||||
if (in->last_flip < 0)
|
||||
in->last_flip = mp_time_us();
|
||||
|
||||
in->last_flip = mp_time_us();
|
||||
in->vsync_interval_approx = in->last_flip - prev_flip;
|
||||
|
||||
MP_STATS(vo, "end video");
|
||||
|
|
|
@ -105,7 +105,6 @@ enum mp_voctrl {
|
|||
VOCTRL_GET_ICC_PROFILE, // bstr*
|
||||
VOCTRL_GET_AMBIENT_LUX, // int*
|
||||
VOCTRL_GET_DISPLAY_FPS, // double*
|
||||
VOCTRL_GET_RECENT_FLIP_TIME, // int64_t* (using mp_time_us())
|
||||
|
||||
VOCTRL_GET_PREF_DEINT, // int*
|
||||
};
|
||||
|
|
|
@ -132,8 +132,6 @@ struct priv {
|
|||
// this id tells us if the subtitle part has changed or not
|
||||
int change_id[MAX_OSD_PARTS];
|
||||
|
||||
int64_t recent_flip_time; // last frame event
|
||||
|
||||
// options
|
||||
int enable_alpha;
|
||||
int use_rgb565;
|
||||
|
@ -513,7 +511,6 @@ static void redraw(void *data, uint32_t time)
|
|||
|
||||
p->x = 0;
|
||||
p->y = 0;
|
||||
p->recent_flip_time = mp_time_us();
|
||||
}
|
||||
|
||||
static void flip_page(struct vo *vo)
|
||||
|
@ -663,11 +660,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
|
|||
}
|
||||
case VOCTRL_REDRAW_FRAME:
|
||||
return redraw_frame(p);
|
||||
case VOCTRL_GET_RECENT_FLIP_TIME:
|
||||
{
|
||||
*(int64_t*) data = p->recent_flip_time;
|
||||
return VO_TRUE;
|
||||
}
|
||||
}
|
||||
int events = 0;
|
||||
int r = vo_wayland_control(vo, &events, request, data);
|
||||
|
|
Loading…
Reference in New Issue