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§

events
Event handling
mpv_end_file_reason
mpv_error
mpv_format
mpv_log_level
protocol
Custom protocols (protocol://$url) for playback
render
Custom rendering

Structs§

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

Enums§

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

Constants§

MPV_CLIENT_API_MAJOR
MPV_CLIENT_API_MINOR
MPV_CLIENT_API_VERSION

Traits§

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

Type Aliases§

EndFileReason
The reason a file stopped. Since API version 1.9.
LogLevel
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.
MpvError
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.
MpvFormat
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.
Result