Skip to content

Commit f0103d0

Browse files
committed
Include what you use
1 parent e9cfad2 commit f0103d0

File tree

8 files changed

+15
-11
lines changed

8 files changed

+15
-11
lines changed

include/web_video_server/streamers/libav_streamer.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ extern "C"
4242

4343
#include <chrono>
4444
#include <cstdint>
45-
#include <memory>
4645
#include <mutex>
4746
#include <string>
4847

@@ -52,7 +51,6 @@ extern "C"
5251
#include "async_web_server_cpp/http_request.hpp"
5352
#include "rclcpp/node.hpp"
5453

55-
#include "web_video_server/streamer.hpp"
5654
#include "web_video_server/streamers/image_transport_streamer.hpp"
5755

5856
namespace web_video_server

src/streamer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030

3131
#include "web_video_server/streamer.hpp"
3232

33+
#include <vector>
34+
#include <sstream>
35+
3336
#include "rclcpp/node.hpp"
3437

3538
#include "async_web_server_cpp/http_connection.hpp"

src/streamers/image_transport_streamer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
#include <exception>
3535
#include <functional>
3636
#include <mutex>
37+
#include <string>
38+
#include <vector>
3739

3840
#include <boost/system/system_error.hpp>
3941
#include <opencv2/core.hpp>
@@ -141,7 +143,7 @@ void ImageTransportStreamerBase::initialize(const cv::Mat &)
141143
{
142144
}
143145

144-
void ImageTransportStreamerBase::restream_frame(std::chrono::duration<double> max_age)
146+
void ImageTransportStreamerBase::restream_frame(std::chrono::duration<double>/* max_age */)
145147
{
146148
if (inactive_ || !initialized_) {
147149
return;
@@ -208,7 +210,7 @@ void ImageTransportStreamerBase::image_callback(const sensor_msgs::msg::Image::C
208210

209211
void ImageTransportStreamerBase::try_send_image(
210212
const cv::Mat & img,
211-
const std::chrono::steady_clock::time_point & time)
213+
const std::chrono::steady_clock::time_point & /* time */)
212214
{
213215
try {
214216
std::scoped_lock lock(send_mutex_);

src/streamers/jpeg_streamers.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include <cstring>
3737
#include <memory>
3838
#include <mutex>
39-
#include <sstream>
4039
#include <string>
4140
#include <vector>
4241

src/streamers/libav_streamer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ extern "C"
5151
#include <chrono>
5252
#include <cstddef>
5353
#include <cstdint>
54-
#include <memory>
5554
#include <mutex>
5655
#include <sstream>
5756
#include <stdexcept>
@@ -66,7 +65,6 @@ extern "C"
6665
#include "rclcpp/node.hpp"
6766
#include "rclcpp/logging.hpp"
6867

69-
#include "web_video_server/streamer.hpp"
7068
#include "web_video_server/streamers/image_transport_streamer.hpp"
7169

7270
// https://stackoverflow.com/questions/46884682/error-in-building-opencv-with-ffmpeg

src/streamers/png_streamers.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include <cstring>
3636
#include <memory>
3737
#include <mutex>
38-
#include <sstream>
3938
#include <string>
4039
#include <vector>
4140

src/streamers/ros_compressed_streamer.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,27 @@
3131
#include "web_video_server/streamers/ros_compressed_streamer.hpp"
3232

3333
#include <chrono>
34+
#include <cstdio>
3435
#include <exception>
3536
#include <functional>
3637
#include <memory>
3738
#include <mutex>
3839
#include <optional>
39-
#include <sstream>
4040
#include <string>
4141
#include <utility>
42+
#include <vector>
4243

4344
#include <boost/asio/buffer.hpp>
4445
#include <boost/system/system_error.hpp>
4546

4647
#include "async_web_server_cpp/http_connection.hpp"
4748
#include "async_web_server_cpp/http_reply.hpp"
4849
#include "async_web_server_cpp/http_request.hpp"
50+
#include "rclcpp/logger.hpp"
4951
#include "rclcpp/logging.hpp"
5052
#include "rclcpp/node.hpp"
53+
#include "rclcpp/qos.hpp"
54+
#include "rclcpp/subscription.hpp"
5155
#include "rmw/qos_profiles.h"
5256
#include "sensor_msgs/msg/compressed_image.hpp"
5357

@@ -288,7 +292,7 @@ void RosCompressedSnapshotStreamer::send_image(
288292
}
289293

290294
char stamp[20];
291-
snprintf(
295+
std::snprintf(
292296
stamp, sizeof(stamp), "%.06lf",
293297
std::chrono::duration_cast<std::chrono::duration<double>>(time.time_since_epoch()).count());
294298

src/web_video_server.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <chrono>
3535
#include <cstring>
3636
#include <exception>
37+
#include <map>
3738
#include <memory>
3839
#include <mutex>
3940
#include <set>
@@ -42,7 +43,6 @@
4243
#include <vector>
4344

4445
#include <boost/algorithm/string/join.hpp>
45-
#include <boost/algorithm/string/predicate.hpp>
4646
#include <boost/bind/bind.hpp>
4747
#include <boost/bind/placeholders.hpp>
4848
#include <boost/exception/exception.hpp>
@@ -51,6 +51,7 @@
5151
#include "async_web_server_cpp/http_request.hpp"
5252
#include "async_web_server_cpp/http_reply.hpp"
5353
#include "async_web_server_cpp/http_server.hpp"
54+
#include "pluginlib/exceptions.hpp"
5455
#include "rclcpp/node.hpp"
5556
#include "rclcpp/node_options.hpp"
5657
#include "rclcpp/logging.hpp"

0 commit comments

Comments
 (0)