Server-side LSL endpoint: binds a TCP data server, advertises the stream on the LSL discovery multicast group, and fans samples out to every connected inlet. More...
#include <lsl_stream_outlet.h>
Public Member Functions | |
| stream_outlet (const stream_info &info) | |
| ~stream_outlet () | |
| void | push_sample (const std::vector< float > &sample) |
| void | push_chunk (const std::vector< std::vector< float > > &chunk) |
| stream_info | info () const |
| bool | have_consumers () const |
Server-side LSL endpoint: binds a TCP data server, advertises the stream on the LSL discovery multicast group, and fans samples out to every connected inlet.
Definition at line 67 of file lsl_stream_outlet.h.
|
explicit |
Construct a stream_outlet for the given stream_info.
This immediately starts the TCP data server and begins UDP discovery broadcasts.
| [in] | info | The stream_info describing this outlet's stream. |
Definition at line 289 of file lsl_stream_outlet.cpp.
| stream_outlet::~stream_outlet | ( | ) |
Destructor. Stops broadcasting and closes all connections.
Definition at line 297 of file lsl_stream_outlet.cpp.
|
nodiscard |
Check whether any consumers are currently connected.
Definition at line 325 of file lsl_stream_outlet.cpp.
|
nodiscard |
Get the stream_info associated with this outlet (including the assigned data port).
Definition at line 318 of file lsl_stream_outlet.cpp.
| void stream_outlet::push_chunk | ( | const std::vector< std::vector< float > > & | chunk | ) |
Push a chunk of multichannel samples into the outlet.
| [in] | chunk | A vector of samples, where each sample is a vector of channel values. |
Definition at line 311 of file lsl_stream_outlet.cpp.
| void stream_outlet::push_sample | ( | const std::vector< float > & | sample | ) |
Push a single multichannel sample into the outlet.
| [in] | sample | A vector of channel values (must match the stream's channel_count). |
Definition at line 304 of file lsl_stream_outlet.cpp.