17 #ifndef ASTRA_DATASTREAM_HPP
18 #define ASTRA_DATASTREAM_HPP
20 #include "capi/astra_core.h"
21 #include <astra_core/StreamDescription.hpp>
44 : connection_(connection)
46 if(connection_ !=
nullptr)
48 astra_stream_get_description(connection,&description_);
59 bool isAvailable =
false;
60 if (connection_ ==
nullptr)
64 astra_stream_is_available(connection_, &isAvailable);
73 if(connection_ ==
nullptr)
75 throw std::logic_error(
"Cannot start a stream that is not available");
77 astra_stream_start(connection_);
85 if(connection_ ==
nullptr)
87 throw std::logic_error(
"Cannot stop a stream that is not available");
89 astra_stream_stop(connection_);
Data Stream
Definition: DataStream.hpp:33
void start()
start stream
Definition: DataStream.hpp:71
void stop()
stop stream
Definition: DataStream.hpp:83
DataStream(astra_streamconnection_t connection)
default constructs
Definition: DataStream.hpp:43
bool is_available()
start stream
Definition: DataStream.hpp:57
Definition: astra_plugin.h:24
Definition: astra_types.h:42