[][src]Function libmpv_sys::mpv_command_async

pub unsafe extern "C" fn mpv_command_async(
    ctx: *mut mpv_handle,
    reply_userdata: u64,
    args: *mut *const c_char
) -> c_int

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)