Struct mpv::MpvHandler [] [src]

pub struct MpvHandler { /* fields omitted */ }

The main struct of the mpv-rs crate

Almost every function from the libmpv API needs a context, which is stored in this struct.

Methods

impl MpvHandler
[src]

Set a property synchronously

Set a property asynchronously

Get a property synchronously

Get a property asynchronously

Set an option. Note that you can't normally set options during runtime : changing options at runtime does not always work. For some options, attempts to change them simply fails. Many other options may require reloading the file for changes to take effect. In general, you should prefer calling mpv.set_property() to change settings during playback, because the property mechanism guarantees that changes take effect immediately.

It is preferred that you initialize your options with the Builder instead

Send a command synchronously

Send a command asynchronously

Returns an Event if there is an Event available. Returns None if the event pool is empty.

It is still necessary to empty the event pool even if you don't use the events, since the event pool is not limited and will be full if you don't empty it.

Panics

Will panic if a null pointer is received from the libmpv API (should never happen)

Observe a property change. The property change will be returned via an Event PropertyChange

Unobserve a previously observed property change

Get the raw pointer for the mpv_handle. Use with care.

See mpv_get_time_us.

Trait Implementations

impl Drop for MpvHandler
[src]

A method called when the value goes out of scope. Read more