diff --git a/tech/development.wiki b/tech/development.wiki index cd56669..2861e76 100644 --- a/tech/development.wiki +++ b/tech/development.wiki @@ -11,6 +11,7 @@ * [[libcurl|Libcurl]] - Curl the tool, but the API * [[periodictable|Periodic Table]] - Python periodic table * [[ffmpeg]] - video/media library +* [[libmpv]] - client library for the MPV video player == Tools == diff --git a/tech/libmpv.wiki b/tech/libmpv.wiki new file mode 100644 index 0000000..a89d8e5 --- /dev/null +++ b/tech/libmpv.wiki @@ -0,0 +1,18 @@ += 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.