[][src]Function libmpv_sys::mpv_client_id

pub unsafe extern "C" fn mpv_client_id(ctx: *mut mpv_handle) -> i64

Return the ID of this client handle. Every client has its own unique ID. This ID is never reused by the core, even if the mpv_handle at hand gets destroyed and new handles get allocated.

IDs are never 0 or negative.

Some mpv APIs (not necessarily all) accept a name in the form "@" in addition of the proper mpv_client_name(), where "" is the ID in decimal form (e.g. "@123"). For example, the "script-message-to" command takes the client name as first argument, but also accepts the client ID formatted in this manner.

@return The client name. The string is read-only and is valid until the mpv_handle is destroyed.