summaryrefslogtreecommitdiffstats
path: root/options/options.h
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-11-15 15:51:45 -0600
committerDudemanguy <random342@airmail.cc>2022-11-15 23:18:55 +0000
commit6623efb14223f8d4ebb0b2b966b21f5953eb56a9 (patch)
treedcb6d74e90e794bcf1ccb3bea5527ca4c0089ccd /options/options.h
parentbab85944df3ae114a4d411fe7b0f243d4d222222 (diff)
downloadmpv-6623efb14223f8d4ebb0b2b966b21f5953eb56a9.tar.bz2
mpv-6623efb14223f8d4ebb0b2b966b21f5953eb56a9.tar.xz
wayland: add support for content-type protocol
The content-type protocol allows mpv to send compositor a hint about the type of content being displayed on its surface so it could potentially make some sort of optimization. Fundamentally, this is pretty simple but since this requires a very new wayland-protocols version (1.27), we have to mess with the build to add a new define and add a bunch of if's in here. The protocol itself exposes 4 different types of content: none, photo, video, and game. To do that, let's add a new option (wayland-content-type) that lets users control what hint to send to the compossitor. Since the previous commit adds a VOCTRL that notifies us about the content being displayed, we can also add an auto value to this option. As you'd expect, the compositor hint would be set to photo if mpv's core detects an image, video for other things, and it is set to none for the special case of forcing a window when there is not a video track. For completion's sake, game is also allowed as a value for this option, but in practice there shouldn't be a reason to use that.
Diffstat (limited to 'options/options.h')
-rw-r--r--options/options.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/options/options.h b/options/options.h
index 2956ade751..5560f40554 100644
--- a/options/options.h
+++ b/options/options.h
@@ -27,6 +27,7 @@ typedef struct mp_vo_opts {
char *fsscreen_name;
char *winname;
char *appid;
+ int content_type;
int x11_netwm;
int x11_bypass_compositor;
int x11_present;