diff --git a/include/web_video_server/h264_streamer.hpp b/include/web_video_server/h264_streamer.hpp index b86b8f4..1404612 100644 --- a/include/web_video_server/h264_streamer.hpp +++ b/include/web_video_server/h264_streamer.hpp @@ -27,10 +27,12 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef H264_STREAMERS_H_ -#define H264_STREAMERS_H_ +#ifndef WEB_VIDEO_SERVER__H264_STREAMER_HPP_ +#define WEB_VIDEO_SERVER__H264_STREAMER_HPP_ -#include +#include + +#include "image_transport/image_transport.hpp" #include "web_video_server/libav_streamer.hpp" #include "async_web_server_cpp/http_request.hpp" #include "async_web_server_cpp/http_connection.hpp" @@ -62,6 +64,6 @@ class H264StreamerType : public LibavStreamerType rclcpp::Node::SharedPtr node); }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__H264_STREAMER_HPP_ diff --git a/include/web_video_server/image_streamer.hpp b/include/web_video_server/image_streamer.hpp index 4961b05..6fab819 100644 --- a/include/web_video_server/image_streamer.hpp +++ b/include/web_video_server/image_streamer.hpp @@ -28,13 +28,16 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef IMAGE_STREAMER_H_ -#define IMAGE_STREAMER_H_ +#ifndef WEB_VIDEO_SERVER__IMAGE_STREAMER_HPP_ +#define WEB_VIDEO_SERVER__IMAGE_STREAMER_HPP_ + +#include -#include -#include -#include #include + +#include "rclcpp/rclcpp.hpp" +#include "image_transport/image_transport.hpp" +#include "image_transport/transport_hints.hpp" #include "web_video_server/utils.hpp" #include "async_web_server_cpp/http_server.hpp" #include "async_web_server_cpp/http_request.hpp" @@ -124,6 +127,6 @@ class ImageStreamerType virtual std::string create_viewer(const async_web_server_cpp::HttpRequest & request) = 0; }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__IMAGE_STREAMER_HPP_ diff --git a/include/web_video_server/jpeg_streamers.hpp b/include/web_video_server/jpeg_streamers.hpp index 9aace76..5f7cb10 100644 --- a/include/web_video_server/jpeg_streamers.hpp +++ b/include/web_video_server/jpeg_streamers.hpp @@ -28,10 +28,12 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef JPEG_STREAMERS_H_ -#define JPEG_STREAMERS_H_ +#ifndef WEB_VIDEO_SERVER__JPEG_STREAMERS_HPP_ +#define WEB_VIDEO_SERVER__JPEG_STREAMERS_HPP_ -#include +#include + +#include "image_transport/image_transport.hpp" #include "web_video_server/image_streamer.hpp" #include "async_web_server_cpp/http_request.hpp" #include "async_web_server_cpp/http_connection.hpp" @@ -82,6 +84,6 @@ class JpegSnapshotStreamer : public ImageTransportImageStreamer int quality_; }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__JPEG_STREAMERS_HPP_ diff --git a/include/web_video_server/libav_streamer.hpp b/include/web_video_server/libav_streamer.hpp index d901ada..b157d2f 100644 --- a/include/web_video_server/libav_streamer.hpp +++ b/include/web_video_server/libav_streamer.hpp @@ -28,13 +28,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef LIBAV_STREAMERS_H_ -#define LIBAV_STREAMERS_H_ - -#include -#include "web_video_server/image_streamer.hpp" -#include "async_web_server_cpp/http_request.hpp" -#include "async_web_server_cpp/http_connection.hpp" +#ifndef WEB_VIDEO_SERVER__LIBAV_STREAMER_HPP_ +#define WEB_VIDEO_SERVER__LIBAV_STREAMER_HPP_ extern "C" { @@ -48,6 +43,13 @@ extern "C" #include } +#include + +#include "image_transport/image_transport.hpp" +#include "web_video_server/image_streamer.hpp" +#include "async_web_server_cpp/http_request.hpp" +#include "async_web_server_cpp/http_connection.hpp" + namespace web_video_server { @@ -110,6 +112,6 @@ class LibavStreamerType : public ImageStreamerType const std::string content_type_; }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__LIBAV_STREAMER_HPP_ diff --git a/include/web_video_server/multipart_stream.hpp b/include/web_video_server/multipart_stream.hpp index 5a6bee0..419c473 100644 --- a/include/web_video_server/multipart_stream.hpp +++ b/include/web_video_server/multipart_stream.hpp @@ -28,13 +28,16 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef MULTIPART_STREAM_H_ -#define MULTIPART_STREAM_H_ - -#include -#include +#ifndef WEB_VIDEO_SERVER__MULTIPART_STREAM_HPP_ +#define WEB_VIDEO_SERVER__MULTIPART_STREAM_HPP_ #include +#include +#include +#include + +#include "rclcpp/rclcpp.hpp" +#include "async_web_server_cpp/http_connection.hpp" namespace web_video_server { @@ -75,6 +78,6 @@ class MultipartStream std::queue pending_footers_; }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__MULTIPART_STREAM_HPP_ diff --git a/include/web_video_server/png_streamers.hpp b/include/web_video_server/png_streamers.hpp index a7fd0e0..1c38cd4 100644 --- a/include/web_video_server/png_streamers.hpp +++ b/include/web_video_server/png_streamers.hpp @@ -27,10 +27,12 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef PNG_STREAMERS_H_ -#define PNG_STREAMERS_H_ +#ifndef WEB_VIDEO_SERVER__PNG_STREAMERS_HPP_ +#define WEB_VIDEO_SERVER__PNG_STREAMERS_HPP_ -#include +#include + +#include "image_transport/image_transport.hpp" #include "web_video_server/image_streamer.hpp" #include "async_web_server_cpp/http_request.hpp" #include "async_web_server_cpp/http_connection.hpp" @@ -83,6 +85,6 @@ class PngSnapshotStreamer : public ImageTransportImageStreamer int quality_; }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__PNG_STREAMERS_HPP_ diff --git a/include/web_video_server/ros_compressed_streamer.hpp b/include/web_video_server/ros_compressed_streamer.hpp index cef746d..df306ac 100644 --- a/include/web_video_server/ros_compressed_streamer.hpp +++ b/include/web_video_server/ros_compressed_streamer.hpp @@ -28,10 +28,12 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef ROS_COMPRESSED_STREAMERS_H_ -#define ROS_COMPRESSED_STREAMERS_H_ +#ifndef WEB_VIDEO_SERVER__ROS_COMPRESSED_STREAMER_HPP_ +#define WEB_VIDEO_SERVER__ROS_COMPRESSED_STREAMER_HPP_ -#include +#include + +#include "sensor_msgs/msg/compressed_image.hpp" #include "web_video_server/image_streamer.hpp" #include "async_web_server_cpp/http_request.hpp" #include "async_web_server_cpp/http_connection.hpp" @@ -76,6 +78,6 @@ class RosCompressedStreamerType : public ImageStreamerType std::string create_viewer(const async_web_server_cpp::HttpRequest & request); }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__ROS_COMPRESSED_STREAMER_HPP_ diff --git a/include/web_video_server/vp8_streamer.hpp b/include/web_video_server/vp8_streamer.hpp index 59a8b56..d271804 100644 --- a/include/web_video_server/vp8_streamer.hpp +++ b/include/web_video_server/vp8_streamer.hpp @@ -28,10 +28,12 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef VP8_STREAMERS_H_ -#define VP8_STREAMERS_H_ +#ifndef WEB_VIDEO_SERVER__VP8_STREAMER_HPP_ +#define WEB_VIDEO_SERVER__VP8_STREAMER_HPP_ -#include +#include + +#include "image_transport/image_transport.hpp" #include "web_video_server/libav_streamer.hpp" #include "async_web_server_cpp/http_request.hpp" #include "async_web_server_cpp/http_connection.hpp" @@ -65,6 +67,6 @@ class Vp8StreamerType : public LibavStreamerType rclcpp::Node::SharedPtr node); }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__VP8_STREAMER_HPP_ diff --git a/include/web_video_server/vp9_streamer.hpp b/include/web_video_server/vp9_streamer.hpp index c81193d..9642eda 100644 --- a/include/web_video_server/vp9_streamer.hpp +++ b/include/web_video_server/vp9_streamer.hpp @@ -27,10 +27,10 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef VP9_STREAMERS_H_ -#define VP9_STREAMERS_H_ +#ifndef WEB_VIDEO_SERVER__VP9_STREAMER_HPP_ +#define WEB_VIDEO_SERVER__VP9_STREAMER_HPP_ -#include +#include "image_transport/image_transport.hpp" #include "web_video_server/libav_streamer.hpp" #include "async_web_server_cpp/http_request.hpp" #include "async_web_server_cpp/http_connection.hpp" @@ -61,6 +61,6 @@ class Vp9StreamerType : public LibavStreamerType rclcpp::Node::SharedPtr node); }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__VP9_STREAMER_HPP_ diff --git a/include/web_video_server/web_video_server.hpp b/include/web_video_server/web_video_server.hpp index 079576b..db7d893 100644 --- a/include/web_video_server/web_video_server.hpp +++ b/include/web_video_server/web_video_server.hpp @@ -28,18 +28,20 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef WEB_VIDEO_SERVER_H_ -#define WEB_VIDEO_SERVER_H_ +#ifndef WEB_VIDEO_SERVER__WEB_VIDEO_SERVER_HPP_ +#define WEB_VIDEO_SERVER__WEB_VIDEO_SERVER_HPP_ -#include +#include +#include +#include #ifdef CV_BRIDGE_USES_OLD_HEADERS -#include +#include "cv_bridge/cv_bridge.h" #else -#include +#include "cv_bridge/cv_bridge.hpp" #endif -#include +#include "rclcpp/rclcpp.hpp" #include "web_video_server/image_streamer.hpp" #include "async_web_server_cpp/http_server.hpp" #include "async_web_server_cpp/http_request.hpp" @@ -59,7 +61,7 @@ class WebVideoServer * @brief Constructor * @return */ - WebVideoServer(rclcpp::Node::SharedPtr & node); + explicit WebVideoServer(rclcpp::Node::SharedPtr & node); /** * @brief Destructor - Cleans up @@ -121,6 +123,6 @@ class WebVideoServer boost::mutex subscriber_mutex_; }; -} +} // namespace web_video_server -#endif +#endif // WEB_VIDEO_SERVER__WEB_VIDEO_SERVER_HPP_ diff --git a/src/h264_streamer.cpp b/src/h264_streamer.cpp index 6de456e..6e195de 100644 --- a/src/h264_streamer.cpp +++ b/src/h264_streamer.cpp @@ -77,4 +77,4 @@ boost::shared_ptr H264StreamerType::create_streamer( return boost::shared_ptr(new H264Streamer(request, connection, node)); } -} +} // namespace web_video_server diff --git a/src/image_streamer.cpp b/src/image_streamer.cpp index 8dae324..952394d 100644 --- a/src/image_streamer.cpp +++ b/src/image_streamer.cpp @@ -118,7 +118,8 @@ void ImageTransportImageStreamer::restreamFrame(double max_age) try { if (last_frame + rclcpp::Duration::from_seconds(max_age) < node_->now() ) { boost::mutex::scoped_lock lock(send_mutex_); - sendImage(output_size_image, node_->now() ); // don't update last_frame, it may remain an old value. + // don't update last_frame, it may remain an old value. + sendImage(output_size_image, node_->now()); } } catch (boost::system::system_error & e) { // happens when client disconnects @@ -183,7 +184,7 @@ void ImageTransportImageStreamer::imageCallback(const sensor_msgs::msg::Image::C cv::flip(img, img, true); } - boost::mutex::scoped_lock lock(send_mutex_); // protects output_size_image + boost::mutex::scoped_lock lock(send_mutex_); // protects output_size_image if (output_width_ != input_width || output_height_ != input_height) { cv::Mat img_resized; cv::Size new_size(output_width_, output_height_); @@ -228,4 +229,4 @@ void ImageTransportImageStreamer::imageCallback(const sensor_msgs::msg::Image::C } } -} +} // namespace web_video_server diff --git a/src/jpeg_streamers.cpp b/src/jpeg_streamers.cpp index f2fcfe4..55c0f17 100644 --- a/src/jpeg_streamers.cpp +++ b/src/jpeg_streamers.cpp @@ -47,7 +47,7 @@ MjpegStreamer::MjpegStreamer( MjpegStreamer::~MjpegStreamer() { this->inactive_ = true; - boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. + boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. } void MjpegStreamer::sendImage(const cv::Mat & img, const rclcpp::Time & time) @@ -91,7 +91,7 @@ JpegSnapshotStreamer::JpegSnapshotStreamer( JpegSnapshotStreamer::~JpegSnapshotStreamer() { this->inactive_ = true; - boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. + boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. } void JpegSnapshotStreamer::sendImage(const cv::Mat & img, const rclcpp::Time & time) @@ -104,7 +104,7 @@ void JpegSnapshotStreamer::sendImage(const cv::Mat & img, const rclcpp::Time & t cv::imencode(".jpeg", img, encoded_buffer, encode_params); char stamp[20]; - sprintf(stamp, "%.06lf", time.seconds()); + snprintf(stamp, sizeof(stamp), "%.06lf", time.seconds()); async_web_server_cpp::HttpReply::builder(async_web_server_cpp::HttpReply::ok) .header("Connection", "close") .header("Server", "web_video_server") @@ -121,4 +121,4 @@ void JpegSnapshotStreamer::sendImage(const cv::Mat & img, const rclcpp::Time & t inactive_ = true; } -} +} // namespace web_video_server diff --git a/src/libav_streamer.cpp b/src/libav_streamer.cpp index 697ca5d..978db8f 100644 --- a/src/libav_streamer.cpp +++ b/src/libav_streamer.cpp @@ -31,7 +31,7 @@ #include "web_video_server/libav_streamer.hpp" #include "async_web_server_cpp/http_reply.hpp" -/*https://stackoverflow.com/questions/46884682/error-in-building-opencv-with-ffmpeg*/ +// https://stackoverflow.com/questions/46884682/error-in-building-opencv-with-ffmpeg #define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22) #define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER @@ -84,7 +84,7 @@ static int dispatch_output_packet(void * opaque, uint8_t * buffer, int buffer_si std::vector encoded_frame; encoded_frame.assign(buffer, buffer + buffer_size); connection->write_and_clear(encoded_frame); - return 0; // TODO: can this fail? + return 0; // TODO: can this fail? } void LibavStreamer::initialize(const cv::Mat & img) @@ -120,7 +120,7 @@ void LibavStreamer::initialize(const cv::Mat & img) format_context_->max_interleave_delta = 0; // Load codec - if (codec_name_.empty()) { // use default codec if none specified + if (codec_name_.empty()) { // use default codec if none specified codec_ = avcodec_find_encoder(format_context_->oformat->video_codec); } else { codec_ = avcodec_find_encoder_by_name(codec_name_.c_str()); @@ -321,4 +321,4 @@ std::string LibavStreamerType::create_viewer(const async_web_server_cpp::HttpReq return ss.str(); } -} +} // namespace web_video_server diff --git a/src/multipart_stream.cpp b/src/multipart_stream.cpp index e8e46f4..86ccbfc 100644 --- a/src/multipart_stream.cpp +++ b/src/multipart_stream.cpp @@ -62,7 +62,7 @@ void MultipartStream::sendPartHeader( size_t payload_size) { char stamp[20]; - sprintf(stamp, "%.06lf", time.seconds()); + snprintf(stamp, sizeof(stamp), "%.06lf", time.seconds()); std::shared_ptr> headers( new std::vector()); headers->push_back(async_web_server_cpp::HttpHeader("Content-type", type)); @@ -125,4 +125,4 @@ bool MultipartStream::isBusy() return !(max_queue_size_ == 0 || pending_footers_.size() < max_queue_size_); } -} +} // namespace web_video_server diff --git a/src/png_streamers.cpp b/src/png_streamers.cpp index 72e6155..8c29183 100644 --- a/src/png_streamers.cpp +++ b/src/png_streamers.cpp @@ -52,7 +52,7 @@ PngStreamer::PngStreamer( PngStreamer::~PngStreamer() { this->inactive_ = true; - boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. + boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. } cv::Mat PngStreamer::decodeImage(const sensor_msgs::msg::Image::ConstSharedPtr & msg) @@ -107,7 +107,7 @@ PngSnapshotStreamer::PngSnapshotStreamer( PngSnapshotStreamer::~PngSnapshotStreamer() { this->inactive_ = true; - boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. + boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. } cv::Mat PngSnapshotStreamer::decodeImage(const sensor_msgs::msg::Image::ConstSharedPtr & msg) @@ -131,7 +131,7 @@ void PngSnapshotStreamer::sendImage(const cv::Mat & img, const rclcpp::Time & ti cv::imencode(".png", img, encoded_buffer, encode_params); char stamp[20]; - sprintf(stamp, "%.06lf", time.seconds()); + snprintf(stamp, sizeof(stamp), "%.06lf", time.seconds()); async_web_server_cpp::HttpReply::builder(async_web_server_cpp::HttpReply::ok) .header("Connection", "close") .header("Server", "web_video_server") @@ -148,4 +148,4 @@ void PngSnapshotStreamer::sendImage(const cv::Mat & img, const rclcpp::Time & ti inactive_ = true; } -} +} // namespace web_video_server diff --git a/src/ros_compressed_streamer.cpp b/src/ros_compressed_streamer.cpp index d0a5938..e749932 100644 --- a/src/ros_compressed_streamer.cpp +++ b/src/ros_compressed_streamer.cpp @@ -45,7 +45,7 @@ RosCompressedStreamer::RosCompressedStreamer( RosCompressedStreamer::~RosCompressedStreamer() { this->inactive_ = true; - boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. + boost::mutex::scoped_lock lock(send_mutex_); // protects sendImage. } void RosCompressedStreamer::start() @@ -82,7 +82,7 @@ void RosCompressedStreamer::restreamFrame(double max_age) if (last_frame + rclcpp::Duration::from_seconds(max_age) < node_->now() ) { boost::mutex::scoped_lock lock(send_mutex_); - sendImage(last_msg, node_->now() ); // don't update last_frame, it may remain an old value. + sendImage(last_msg, node_->now() ); // don't update last_frame, it may remain an old value. } } @@ -128,7 +128,7 @@ void RosCompressedStreamer::sendImage( void RosCompressedStreamer::imageCallback( const sensor_msgs::msg::CompressedImage::ConstSharedPtr msg) { - boost::mutex::scoped_lock lock(send_mutex_); // protects last_msg and last_frame + boost::mutex::scoped_lock lock(send_mutex_); // protects last_msg and last_frame last_msg = msg; last_frame = rclcpp::Time(msg->header.stamp); sendImage(last_msg, last_frame); @@ -153,5 +153,4 @@ std::string RosCompressedStreamerType::create_viewer( return ss.str(); } - -} +} // namespace web_video_server diff --git a/src/vp8_streamer.cpp b/src/vp8_streamer.cpp index 0a9ad52..1ff224c 100644 --- a/src/vp8_streamer.cpp +++ b/src/vp8_streamer.cpp @@ -63,7 +63,7 @@ void Vp8Streamer::initializeEncoder() // Buffering settings int bufsize = 10; codec_context_->rc_buffer_size = bufsize; - codec_context_->rc_initial_buffer_occupancy = bufsize; //bitrate/3; + codec_context_->rc_initial_buffer_occupancy = bufsize; // bitrate/3; av_opt_set_int(codec_context_->priv_data, "bufsize", bufsize, 0); av_opt_set_int(codec_context_->priv_data, "buf-initial", bufsize, 0); av_opt_set_int(codec_context_->priv_data, "buf-optimal", bufsize, 0); @@ -83,4 +83,4 @@ boost::shared_ptr Vp8StreamerType::create_streamer( return boost::shared_ptr(new Vp8Streamer(request, connection, node)); } -} +} // namespace web_video_server diff --git a/src/vp9_streamer.cpp b/src/vp9_streamer.cpp index 7949a10..36d5e59 100644 --- a/src/vp9_streamer.cpp +++ b/src/vp9_streamer.cpp @@ -44,7 +44,6 @@ Vp9Streamer::~Vp9Streamer() void Vp9Streamer::initializeEncoder() { - // codec options set up to provide somehow reasonable performance in cost of poor quality // should be updated as soon as VP9 encoding matures av_opt_set_int(codec_context_->priv_data, "pass", 1, 0); @@ -66,4 +65,4 @@ boost::shared_ptr Vp9StreamerType::create_streamer( return boost::shared_ptr(new Vp9Streamer(request, connection, node)); } -} +} // namespace web_video_server diff --git a/src/web_video_server.cpp b/src/web_video_server.cpp index 06b9dce..6133b6e 100644 --- a/src/web_video_server.cpp +++ b/src/web_video_server.cpp @@ -28,15 +28,17 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +#include "web_video_server/web_video_server.hpp" + +#include +#include + #include #include #include -#include -#include -#include #include -#include "web_video_server/web_video_server.hpp" +#include "sensor_msgs/image_encodings.hpp" #include "web_video_server/ros_compressed_streamer.hpp" #include "web_video_server/jpeg_streamers.hpp" #include "web_video_server/png_streamers.hpp" @@ -46,7 +48,7 @@ #include "async_web_server_cpp/http_reply.hpp" using namespace std::chrono_literals; -using namespace boost::placeholders; +using namespace boost::placeholders; // NOLINT namespace web_video_server { @@ -246,7 +248,6 @@ bool WebVideoServer::handle_stream_viewer( std::string topic = request.get_query_param_value_or_default("topic", ""); // Fallback for topics without corresponding compressed topics if (type == std::string("ros_compressed")) { - std::string compressed_topic_name = topic + "/compressed"; auto tnat = node_->get_topic_names_and_types(); bool did_find_compressed_topic = false; @@ -385,7 +386,7 @@ bool WebVideoServer::handle_list_streams( return true; } -} +} // namespace web_video_server int main(int argc, char ** argv) {