lsl_resolve_byprop function
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.
@paramout
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).
Implementation
@ffi.Native<NativeLsl_resolve_byprop>()
external int lsl_resolve_byprop(
ffi.Pointer<lsl_streaminfo> buffer,
int buffer_elements,
ffi.Pointer<ffi.Char> prop,
ffi.Pointer<ffi.Char> value,
int minimum,
double timeout,
);