bsl.lsl.resolve_streams

bsl.lsl.resolve_streams(timeout=1.0, name=None, stype=None, source_id=None, minimum=1)[source]

Resolve streams on the network.

This function returns all currently available streams from any outlet on the network. The network is usually the subnet specified at the local router, but may also include a group of machines visible to each other via multicast packets (given that the network supports it), or list of hostnames. These details may optionally be customized by the experimenter in a configuration file (see Network Connectivity in the LSL wiki).

Parameters:
timeoutfloat

Timeout (in seconds) of the operation. If this is too short (e.g. < 0.5 seconds) only a subset (or none) of the outlets that are present on the network may be returned.

namestr | None

Restrict the selected streams to this name.

stypestr | None

Restrict the selected stream to this type.

source_idstr | None

Restrict the selected stream to this source ID.

minimumint

Minimum number of stream to return where restricting the selection. As soon as this minimum is hit, the search will end.

Returns:
sinfoslist

List of StreamInfo objects found on the network. While a StreamInfo is not bound to an Inlet, the description field remains empty.

Notes

If multiple restrinction are provided, the network must be queried once for each restriction. Thus, the true timeout is multiplied by the non None restrictions.

Examples using bsl.lsl.resolve_streams

StreamPlayer: simulate an LSL stream

StreamPlayer: simulate an LSL stream