summaryrefslogtreecommitdiffstats
path: root/video/out/android_common.c
Commit message (Collapse)AuthorAgeFilesLines
* video/out/android: assert WinID value before usesfan52023-06-031-0/+1
|
* vo: change vo_platform_init to boolDudemanguy2023-01-081-3/+3
| | | | | | | | There's several functions that are used for initializing mpv on a certain platform (x11, wayland, etc.). These currently are all int, but they actually return 1 and 0 like a boolean. This gets a bit confusing because actual vo preinit functions return 0 and -1 instead. Just make these all bool instead and return true/false to make it clearer.
* options: simplify --android-surface-size handlingsfan52020-09-201-19/+2
|
* options: change option macros and all option declarationswm42020-03-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change all OPT_* macros such that they don't define the entire m_option initializer, and instead expand only to a part of it, which sets certain fields. This requires changing almost every option declaration, because they all use these macros. A declaration now always starts with {"name", ... followed by designated initializers only (possibly wrapped in macros). The OPT_* macros now initialize the .offset and .type fields only, sometimes also .priv and others. I think this change makes the option macros less tricky. The old code had to stuff everything into macro arguments (and attempted to allow setting arbitrary fields by letting the user pass designated initializers in the vararg parts). Some of this was made messy due to C99 and C11 not allowing 0-sized varargs with ',' removal. It's also possible that this change is pointless, other than cosmetic preferences. Not too happy about some things. For example, the OPT_CHOICE() indentation I applied looks a bit ugly. Much of this change was done with regex search&replace, but some places required manual editing. In particular, code in "obscure" areas (which I didn't include in compilation) might be broken now. In wayland_common.c the author of some option declarations confused the flags parameter with the default value (though the default value was also properly set below). I fixed this with this change.
* video/out/android_common: use jni helpersAman Gupta2020-03-121-10/+11
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* context_android: move common code to a separate filesfan52019-09-271-0/+113
In preparation for a Vulkan Android context. This also replaces querying for EGL_WIDTH and EGL_HEIGHT with equivalent ANativeWindow calls.