mpv_initialize method

int mpv_initialize(
  1. Pointer<mpv_handle> ctx
)

Initialize an uninitialized mpv instance. If the mpv instance is already running, an error is returned.

This function needs to be called to make full use of the client API if the client API handle was created with mpv_create().

Only the following options are required to be set before mpv_initialize():

  • options which are only read at initialization time:
  • config
  • config-dir
  • input-conf
  • load-scripts
  • script
  • player-operation-mode
  • input-app-events (OSX)
  • all encoding mode options

@return error code

Implementation

int mpv_initialize(
  ffi.Pointer<mpv_handle> ctx,
) {
  return _mpv_initialize(
    ctx,
  );
}