The Android mpv kit
The headers vendetta's mpv module compiles against on Android live here
(include/mpv/), copied from mpv's own source tree (client API 2.6). The
shared library is not in tree, because an NDK-built libmpv.so is large
and architecture-specific; a build provides its own, in one of two ways:
Link and package from one tree — the layout the mpv-android build scripts produce, per-ABI directories under
lib/:libvendetta/mpv/android/ ├── include/mpv/{client.h,render.h,render_gl.h} (in tree) └── lib/<abi>/{libmpv.so,libav*.so,...} (you provide)The link needs one flat copy:
lib/libmpv.so→ the ABI you are building, because vab compiles the V sources once and gives every architecture the same link flags, so a per-arch-Lcannot be spelled (and lld errors on the first incompatiblelibmpv.soit finds rather than searching on):ln -sf arm64-v8a/libmpv.so libvendetta/mpv/android/lib/libmpv.sovabwalks the--libsdir and stages every.sointo the APK's ABI folder matching its path (lib/arm64-v8a/…and friends stage themselves); the flat symlink has no ABI in its path and is skipped:vab --name Vendetta \ --libs /abs/path/to/vendetta/libvendetta/mpv/android/lib srcThe
--libspath must be absolute: vab changes working directory during the build, and a relative dir then walks empty — silently, no libs, no error.Link and package from separate dirs — keep the flat link copy in
android/lib/and hand vab a directory tree holding the runtime copies for every architecture the APK carries (the same per-ABI subdirectory layout, anywhere on disk).
Where to get libmpv.so for Android:
- Build mpv yourself with the mpv-android build
scripts (
build/mpv-android,--no-archiveleavesbuild/mpv-android/app/src/main/jniLibs/<abi>/libmpv.sobehind). The resulting build needs the same NDK the app links with, or at least a compatible API level (the headers here are from the mpv checkout the build scripts use). - Any prebuilt libmpv for Android (the
mpv-androidreleases do not ship one as a bare.so; third-party packs exist) whose client API is 2.x and whose symbol set covers the ~54 functionsmpv.defin../win64/liblists — the render API surface is the same on every platform.
The GL story on Android, for reference: mpv renders through the render API
(MPV_RENDER_API_TYPE_OPENGL) into the texture vendetta's surface owns, and
resolves every GL entry point through the get_proc_address callback, which
on Android asks eglGetProcAddress (mpv.android_gl_proc). The context is
the GLES 3 one sokol's Android backend creates and makes current; the render
context takes no display parameter, and the surface's own texture work links
GLESv3 directly (<GLES3/gl3.h>).