(Slightly oddly function names, because I want to avoid starting them with mpv_*, which is reserved for public API.)