Class StreamerBase

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class StreamerBase : public web_video_server::StreamerInterface

A base class providing common functionality for streamers.

Subclassed by web_video_server::streamers::ImageTransportStreamerBase, web_video_server::streamers::RosCompressedSnapshotStreamer, web_video_server::streamers::RosCompressedStreamer

Public Functions

StreamerBase(const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, rclcpp::Node::WeakPtr node, std::string logger_name = "streamer")
inline virtual void stop() override

Stops the streaming process and marks the streamer as inactive.

inline virtual bool is_inactive() override

Returns true if the streamer is inactive and should be deleted.

This could be because the connection was closed or snapshot was successfully sent (in case of snapshot streamers).

inline virtual std::string get_topic() override

Returns the topic being streamed.

inline virtual std::string get_client_id() override

Returns the client_id associated with this stream, or an empty string if none.

Protected Functions

rclcpp::Node::SharedPtr lock_node() const

Protected Attributes

async_web_server_cpp::HttpConnectionPtr connection_
async_web_server_cpp::HttpRequest request_
rclcpp::Node::WeakPtr node_
rclcpp::Logger logger_
bool inactive_
std::string topic_
std::string client_id_