From 89306818bb3d2f6942e3cb6bb6c0ce01e7f7f65c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 3 Feb 2015 18:16:02 +0100 Subject: 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). --- video/out/vo.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/out/vo.h') 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()) -- cgit v1.2.3