LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
|
Template class to wrap data stream to a listener object. More...
#include <inputstream.h>
Public Member Functions | |
~InputStream () | |
Cleans up the associated StreamType stream. More... | |
void | set (std::shared_ptr< StreamType > input) |
Must be set to allow proper cleanup of internal stream. More... | |
Template class to wrap data stream to a listener object.
StreamType | should be a stream object with a stopListening() function such as a GenericStream implementation |
This should be a member of any listener implementation!
|
inline |
Cleans up the associated StreamType
stream.
|
inline |
Must be set to allow proper cleanup of internal stream.
input | stream of StreamType to be cleaned up after destruction |
All implementations of SR listeners should call this function as part of their constructor. Doing so ensures that the stream is stopped and cleaned up correctly. Alternatively, users can call stopListening on the stream themselves.