summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2015-02-03 18:16:02 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2015-03-04 10:06:08 +0100
commit89306818bb3d2f6942e3cb6bb6c0ce01e7f7f65c (patch)
treeab059803ffbc646df379b1e8853f644cf291c7fb /video/out/vo.h
parent9746e71efc36363f0b007fb73d886d5d35b5671a (diff)
downloadmpv-89306818bb3d2f6942e3cb6bb6c0ce01e7f7f65c.tar.bz2
mpv-89306818bb3d2f6942e3cb6bb6c0ce01e7f7f65c.tar.xz
cocoa: add support for querying ambient lighting
This will be pretty useful to let mpv automatically change VO parameters based on ambient lighting conditions. The conversion code and polinomial equation from Apple LMU values to Lux is taken from Firefox: their license, MPL is GPL compatible and allows relicensing to GPL (MPL is more liberal).
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index a531744c49..f1adbc0908 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -38,6 +38,8 @@
#define VO_EVENT_ICC_PROFILE_CHANGED 4
// Some other window state changed
#define VO_EVENT_WIN_STATE 8
+// The ambient light conditions changed and need to be reloaded
+#define VO_EVENT_AMBIENT_LIGHTING_CHANGED 16
// Set of events the player core may be interested in.
#define VO_EVENTS_USER (VO_EVENT_RESIZE | VO_EVENT_WIN_STATE)
@@ -103,6 +105,7 @@ enum mp_voctrl {
VOCTRL_SET_COMMAND_LINE, // char**
VOCTRL_GET_ICC_PROFILE, // bstr*
+ VOCTRL_GET_AMBIENT_LUX, // int*
VOCTRL_GET_DISPLAY_FPS, // double*
VOCTRL_GET_RECENT_FLIP_TIME, // int64_t* (using mp_time_us())