[−][src]Function lsl_sys::lsl_resolve_byprop
pub unsafe extern "C" fn lsl_resolve_byprop(
buffer: *mut lsl_streaminfo,
buffer_elements: u32,
prop: *const c_char,
value: *const c_char,
minimum: i32,
timeout: f64
) -> i32
Resolve all streams with a given value for a property.
If the goal is to resolve a specific stream, this method is preferred over resolving all streams and then selecting the desired one. @param[out] buffer A user-allocated buffer to hold the resolve results. @attention It is the user's responsibility to either destroy the resulting streaminfo objects or to pass them back to the LSL during during creation of an inlet.
@attention The stream_info's returned by the resolver are only short versions that do not include
the lsl_get_desc() field (which can be arbitrarily big). To obtain the full stream information
you need to call lsl_get_info() on the inlet after you have created one.
@param buffer_elements The user-provided buffer length.
@param prop The streaminfo property that should have a specific value ("name"
, "type"
,
"source_id"
, or, e.g., "desc/manufaturer"
if present).
@param value The string value that the property should have (e.g., "EEG" as the type).
@param minimum Return at least this number of streams.
@param timeout Optionally a timeout of the operation, in seconds (default: no timeout).
If the timeout expires, less than the desired number of streams (possibly none) will be returned.
@return The number of results written into the buffer (never more than the provided # of slots)
or a negative number if an error has occurred (values corresponding to #lsl_error_code_t).