mpv_set_option method
- Pointer<
mpv_handle> ctx, - Pointer<
Char> name, - mpv_format format,
- Pointer<
Void> data,
Set an option. Note that you can't normally set options during runtime. It works in uninitialized state (see mpv_create()), and in some cases in at runtime.
Using a format other than MPV_FORMAT_NODE is equivalent to constructing a mpv_node with the given format and data, and passing the mpv_node to this function.
Note: this is semi-deprecated. For most purposes, this is not needed anymore. Starting with mpv version 0.21.0 (version 1.23) most options can be set with mpv_set_property() (and related functions), and even before mpv_initialize(). In some obscure corner cases, using this function to set options might still be required (see "Inconsistencies between options and properties" in the manpage). Once these are resolved, the option setting functions might be fully deprecated.
@param name Option name. This is the same as on the mpv command line, but
without the leading "--".
@param format see enum mpv_format.
@paramin
data Option value (according to the format).
@return error code
Implementation
int mpv_set_option(
ffi.Pointer<mpv_handle> ctx,
ffi.Pointer<ffi.Char> name,
mpv_format format,
ffi.Pointer<ffi.Void> data,
) {
return _mpv_set_option(
ctx,
name,
format.value,
data,
);
}