mpv_command_async method

int mpv_command_async(
  1. Pointer<mpv_handle> ctx,
  2. int reply_userdata,
  3. Pointer<Pointer<Int8>> args
)

Same as mpv_command, but run the command asynchronously.

Commands are executed asynchronously. You will receive a MPV_EVENT_COMMAND_REPLY event. This event will also have an error code set if running the command failed. For commands that return data, the data is put into mpv_event_command.result.

The only case when you do not receive an event is when the function call itself fails. This happens only if parsing the command itself (or otherwise validating it) fails, i.e. the return code of the API call is not 0 or positive.

Safe to be called from mpv render API threads.

@param reply_userdata the value mpv_event.reply_userdata of the reply will be set to (see section about asynchronous calls) @param args NULL-terminated list of strings (see mpv_command()) @return error code (if parsing or queuing the command fails)

Implementation

int mpv_command_async(
  ffi.Pointer<mpv_handle> ctx,
  int reply_userdata,
  ffi.Pointer<ffi.Pointer<ffi.Int8>> args,
) {
  return _mpv_command_async(
    ctx,
    reply_userdata,
    args,
  );
}