Crate libmpv

source ·
Expand description

This crate provides abstractions for libmpv of the mpv media player.

Libmpv requires LC_NUMERIC to be C, which should be the default value.

Most of the documentation is paraphrased or even copied from the mpv manual, if any questions arise it will probably answer them in much more depth than this documentation.

Examples

See the ‘examples’ directory in the crate root.

Modules

Event handling
Custom protocols (protocol://$url) for playback
Custom rendering

Structs

The central mpv context.
Context passed to the initializer of Mpv::with_initialzer.
Wrapper around an &str returned by mpv, that properly deallocates it with mpv’s allocator.

Enums

How a File is inserted into the playlist.
Subset of mpv_format used by the public API.

Constants

Traits

This trait describes which types are allowed to be passed to getter mpv APIs.
This trait describes which types are allowed to be passed to setter mpv APIs.

Type Definitions

The reason a file stopped. Since API version 1.9.
Log verbosity level. Numeric log levels. The lower the number, the more important the message is. MPV_LOG_LEVEL_NONE is never used when receiving messages. The string in the comment after the value is the name of the log level as used for the mpv_request_log_messages() function. Unused numeric values are unused, but reserved for future use.
An libmpv_sys mpv error. List of error codes than can be returned by API functions. 0 and positive return values always mean success, negative values are always errors.
A format mpv can use. Data format for options and properties. The API functions to get/set properties and options support multiple formats, and this enum describes them.