vimwiki/tech/libmpv.wiki

19 lines
679 B
Plaintext

= Libmpv =
The full documentation can be found in `/usr/include/mpv/client.h`. The library
treats its own source as documentation. When installing mpv, libmpv is usually
installed as well. Libmpv is a C library.
== Handle ==
MPV provides a `mpv_handle`, which is a client context used by the client API.
Every client has its own private handle.
The handle can be queried with `const char *mpv_client_name(mpv_handle*)` which
returns the handle name. The returned string is read only and valid for the
lifetime of the handle.
The handle has a unique client ID, and can be queried with
`int64_t mpv_client_id(mpv_handle)`. The ID is never reused, and is never 0 or
negative.