mpv_load_config_file method

int mpv_load_config_file(
  1. Pointer<mpv_handle> ctx,
  2. Pointer<Int8> filename
)

Load a config file. This loads and parses the file, and sets every entry in the config file's default section as if mpv_set_option_string() is called.

The filename should be an absolute path. If it isn't, the actual path used is unspecified. (Note: an absolute path starts with '/' on UNIX.) If the file wasn't found, MPV_ERROR_INVALID_PARAMETER is returned.

If a fatal error happens when parsing a config file, MPV_ERROR_OPTION_ERROR is returned. Errors when setting options as well as other types or errors are ignored (even if options do not exist). You can still try to capture the resulting error messages with mpv_request_log_messages(). Note that it's possible that some options were successfully set even if any of these errors happen.

@param filename absolute path to the config file on the local filesystem @return error code

Implementation

int mpv_load_config_file(
  ffi.Pointer<mpv_handle> ctx,
  ffi.Pointer<ffi.Int8> filename,
) {
  return _mpv_load_config_file(
    ctx,
    filename,
  );
}