pub struct MpvInitializer { /* private fields */ }Expand description
Context passed to the initializer of Mpv::with_initialzer.
Implementations§
Source§impl MpvInitializer
 
impl MpvInitializer
Sourcepub fn set_property<T: SetData>(&self, name: &str, data: T) -> Result<()>
 
pub fn set_property<T: SetData>(&self, name: &str, data: T) -> Result<()>
Set a property to a given value. Properties are essentially variables which can be queried or set at runtime. For example, writing to the pause property will actually pause or unpause playback.
Will return Err If the format T doesn’t match with the internal format of
the property and it also fails to convert to T or if setting properties not
backed by options.
Sourcepub fn set_option<T: SetData>(&self, name: &str, data: T) -> Result<()>
 
pub fn set_option<T: SetData>(&self, name: &str, data: T) -> Result<()>
Set the value of an option
Sourcepub fn load_config(&self, path: &str) -> Result<()>
 
pub fn load_config(&self, path: &str) -> Result<()>
Load a config file. This loads and parses the file, and sets every entry in the config file’s default section as if MpvInitializer::set_option() is called.
The filename should be an absolute path. If it isn’t, the actual path used is unspecified.
Will return Err if the file wasn’t found or if a fatal error happens when
parsing a config file.