diff options
author | Dudemanguy <random342@airmail.cc> | 2022-11-15 15:50:38 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2022-11-15 23:18:55 +0000 |
commit | bab85944df3ae114a4d411fe7b0f243d4d222222 (patch) | |
tree | d23b46de28710469312984e76f5de1f9b8056a85 /video/out/vo.h | |
parent | 0f0520aeca367613d313dbf2e936ea2cacdb35c9 (diff) | |
download | mpv-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 'video/out/vo.h')
-rw-r--r-- | video/out/vo.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h index 8ccfe3ccfe..c7ac9c9c59 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -95,6 +95,8 @@ enum mp_voctrl { VOCTRL_SET_CURSOR_VISIBILITY, // bool* + VOCTRL_CONTENT_TYPE, // enum mp_content_type* + VOCTRL_KILL_SCREENSAVER, VOCTRL_RESTORE_SCREENSAVER, @@ -129,6 +131,13 @@ enum mp_voctrl { VOCTRL_EXTERNAL_RESIZE, }; +// Helper to expose what kind of content is curently playing to the VO. +enum mp_content_type { + MP_CONTENT_NONE, // used for force-window + MP_CONTENT_IMAGE, + MP_CONTENT_VIDEO, +}; + #define VO_TRUE true #define VO_FALSE false #define VO_ERROR -1 |