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:
Dudemanguy
2022-11-15 15:50:38 -06:00
parent 0f0520aeca
commit bab85944df
5 changed files with 27 additions and 0 deletions

View File

@@ -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));