mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
player/video: add VOCTRL_CONTENT_TYPE
mpv's core already keeps track of whether or not it thinks a track is an image. Some VOs (i.e. wayland) would benefit from knowing if what is currently being displayed is an image or not so add a new VOCTRL that signals this anytime we load a new file with a VO. Additionally, let's add a helper enum for signaling the kind of content that is being displayed. There is now MP_CONTENT_NONE (strictly for force window being used on a track with no image/video), MP_CONTENT_IMAGE, and MP_CONTENT_VIDEO. See the next commit for the actual usage of this (with wayland).
This commit is contained in:
@@ -276,6 +276,7 @@ void reinit_video_chain_src(struct MPContext *mpctx, struct track *track)
|
||||
if (!recreate_video_filters(mpctx))
|
||||
goto err_out;
|
||||
|
||||
update_content_type(mpctx, track);
|
||||
update_screensaver_state(mpctx);
|
||||
|
||||
vo_set_paused(vo_c->vo, get_internal_paused(mpctx));
|
||||
|
||||
Reference in New Issue
Block a user