summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-11-15 15:50:38 -0600
committerDudemanguy <random342@airmail.cc>2022-11-15 23:18:55 +0000
commitbab85944df3ae114a4d411fe7b0f243d4d222222 (patch)
treed23b46de28710469312984e76f5de1f9b8056a85 /player/video.c
parent0f0520aeca367613d313dbf2e936ea2cacdb35c9 (diff)
downloadmpv-bab85944df3ae114a4d411fe7b0f243d4d222222.tar.bz2
mpv-bab85944df3ae114a4d411fe7b0f243d4d222222.tar.xz
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).
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c
index 6400979438..f7a31efd7a 100644
--- a/player/video.c
+++ b/player/video.c
@@ -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));