Skip to content

Commit 107f4ad

Browse files
author
Charles-Ellison
committed
more formatting
1 parent 058247a commit 107f4ad

14 files changed

Lines changed: 44 additions & 43 deletions

include/web_video_server/streamers/ros_compressed_streamer.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class RosCompressedSnapshotStreamer : public StreamerBase
9898
RosCompressedSnapshotStreamer(
9999
const async_web_server_cpp::HttpRequest & request,
100100
async_web_server_cpp::HttpConnectionPtr connection,
101-
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> & subscriber_factories,
101+
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> & subscriber_factories,
102102
rclcpp::Node::WeakPtr node);
103103
~RosCompressedSnapshotStreamer();
104104
virtual void start();
@@ -123,10 +123,10 @@ class RosCompressedSnapshotStreamerFactory : public SnapshotStreamerFactoryInter
123123
std::shared_ptr<StreamerInterface> create_streamer(
124124
const async_web_server_cpp::HttpRequest & request,
125125
async_web_server_cpp::HttpConnectionPtr connection,
126-
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> & subscriber_factories,
126+
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> & subscriber_factories,
127127
rclcpp::Node::WeakPtr node);
128128
std::vector<std::string> get_available_topics(
129-
rclcpp::Node & node,
129+
rclcpp::Node & node,
130130
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories
131131
);
132132
};

include/web_video_server/subscriber.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
namespace web_video_server
4949
{
50-
typedef std::function<void(const sensor_msgs::msg::Image::ConstSharedPtr&)> ImageCallback;
50+
typedef std::function<void(const sensor_msgs::msg::Image::ConstSharedPtr &)> ImageCallback;
5151

5252
class SubscriberInterface
5353
{
@@ -63,7 +63,7 @@ class SubscriberInterface
6363
const ImageCallback & callback) = 0;
6464

6565
protected:
66-
virtual void subscriberCallback(const sensor_msgs::msg::Image::ConstSharedPtr & input_msg) = 0;
66+
virtual void subscriberCallback(const sensor_msgs::msg::Image::ConstSharedPtr & input_msg) = 0;
6767
};
6868

6969
/**
@@ -90,10 +90,10 @@ class SubscriberBase : public SubscriberInterface
9090
} catch (...) {
9191
RCLCPP_ERROR(logger_, "The subscriber plugin failed send image for some reason.");
9292
}
93-
}
93+
}
9494

9595
protected:
96-
void subscriberCallback(const sensor_msgs::msg::Image::ConstSharedPtr & input_msg);
96+
void subscriberCallback(const sensor_msgs::msg::Image::ConstSharedPtr & input_msg);
9797

9898
rclcpp::Node::SharedPtr node_;
9999
rclcpp::Logger logger_;

include/web_video_server/subscribers/image_transport_subscriber.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ namespace web_video_server
4343
namespace subscribers
4444
{
4545

46-
class ImageTransportSubscriber : public SubscriberBase {
46+
class ImageTransportSubscriber : public SubscriberBase
47+
{
4748
public:
4849
ImageTransportSubscriber(rclcpp::Node::SharedPtr node);
4950

5051
~ImageTransportSubscriber();
5152

5253
void subscribe(
53-
const async_web_server_cpp::HttpRequest &request,
54+
const async_web_server_cpp::HttpRequest & request,
5455
const std::string& topic,
5556
const ImageCallback& callback);
5657

@@ -72,4 +73,4 @@ class ImageTransportSubscriberFactory : public SubscriberFactoryInterface
7273
};
7374

7475
} // namespace streamers
75-
} // namespace web_video_server
76+
} // namespace web_video_server

src/streamer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ std::string StreamerFactoryInterface::create_viewer(
8080
}
8181

8282
std::vector<std::string> StreamerFactoryInterface::get_available_topics(
83-
rclcpp::Node & node,
84-
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
83+
rclcpp::Node & node,
84+
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
8585
{
8686
return {};
8787
}

src/streamers/h264_streamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ H264Streamer::H264Streamer(
5858
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> & subscriber_factories,
5959
rclcpp::Node::WeakPtr node)
6060
: LibavStreamerBase(request, connection, subscriber_factories, node,
61-
"h264_streamer", "mp4", "libx264", "video/mp4")
61+
"h264_streamer", "mp4", "libx264", "video/mp4")
6262
{
6363
/* possible quality presets:
6464
* ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo

src/streamers/image_streamer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ void ImageStreamerBase::start()
104104

105105
subscriber_ = subscriber_factories_[topic_type]->create_subscriber(node);
106106
subscriber_->subscribe(
107-
request_, topic_,
107+
request_, topic_,
108108
std::bind(&ImageStreamerBase::image_callback, this, std::placeholders::_1));
109-
109+
110110
break;
111111
}
112112
}
@@ -243,10 +243,10 @@ cv::Mat ImageStreamerBase::decode_image(
243243

244244
std::vector<std::string> ImageStreamerFactoryBase::get_available_topics(
245245
rclcpp::Node & node,
246-
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories
247-
) {
246+
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
247+
{
248248
std::vector<std::string> results;
249-
249+
250250
for (auto subscriber: subscriber_factories) {
251251
std::vector<std::string> entries = subscriber.second->get_available_topics(node);
252252
results.insert(results.end(), entries.begin(), entries.end());
@@ -257,7 +257,7 @@ std::vector<std::string> ImageStreamerFactoryBase::get_available_topics(
257257

258258
std::vector<std::string> ImageSnapshotStreamerFactoryBase::get_available_topics(
259259
rclcpp::Node & node,
260-
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
260+
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
261261
{
262262
std::vector<std::string> results;
263263

src/streamers/jpeg_streamers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ std::shared_ptr<StreamerInterface> JpegSnapshotStreamerFactory::create_streamer(
151151
rclcpp::Node::WeakPtr node)
152152
{
153153
return std::make_shared<JpegSnapshotStreamer>(
154-
request, connection, subscriber_factories,
154+
request, connection, subscriber_factories,
155155
std::move(node));
156156
}
157157

src/streamers/libav_streamer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ namespace streamers
7878

7979
LibavStreamerBase::LibavStreamerBase(
8080
const async_web_server_cpp::HttpRequest & request,
81-
async_web_server_cpp::HttpConnectionPtr connection,
81+
async_web_server_cpp::HttpConnectionPtr connection,
8282
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> & subscriber_factories,
8383
rclcpp::Node::WeakPtr node,
8484
std::string logger_name, const std::string & format_name, const std::string & codec_name,
8585
const std::string & content_type)
8686
: ImageStreamerBase(request, connection, subscriber_factories, node, logger_name),
8787
format_context_(0), codec_(0), codec_context_(0), video_stream_(0), opt_(0),
88-
frame_(0), sws_context_(0), first_image_received_(false), format_name_(format_name),
88+
frame_(0), sws_context_(0), first_image_received_(false), format_name_(format_name),
8989
codec_name_(codec_name), content_type_(content_type), io_buffer_(0)
9090
{
9191
bitrate_ = request.get_query_param_value_or_default<int>("bitrate", 100000);

src/streamers/png_streamers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ PngStreamer::PngStreamer(
6767
async_web_server_cpp::HttpConnectionPtr connection,
6868
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> & subscriber_factories,
6969
rclcpp::Node::WeakPtr node)
70-
: ImageStreamerBase(request, connection, subscriber_factories, node, "png_streamer"),
70+
: ImageStreamerBase(request, connection, subscriber_factories, node, "png_streamer"),
7171
stream_(connection)
7272
{
7373
quality_ = request.get_query_param_value_or_default<int>("quality", 3);

src/streamers/ros_compressed_streamer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ RosCompressedStreamer::RosCompressedStreamer(
178178

179179
std::string default_qos_profile = node->get_parameter("default_qos_profile").as_string();
180180
auto qos_profile_name = request.get_query_param_value_or_default(
181-
"qos_profile",
181+
"qos_profile",
182182
default_qos_profile);
183183
}
184184

@@ -287,7 +287,7 @@ std::shared_ptr<StreamerInterface> RosCompressedStreamerFactory::create_streamer
287287

288288
std::vector<std::string> RosCompressedStreamerFactory::get_available_topics(
289289
rclcpp::Node & node,
290-
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
290+
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
291291
{
292292
return collect_compressed_topics(node);
293293
}
@@ -415,7 +415,7 @@ RosCompressedSnapshotStreamerFactory::create_streamer(
415415

416416
std::vector<std::string> RosCompressedSnapshotStreamerFactory::get_available_topics(
417417
rclcpp::Node & node,
418-
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
418+
std::map<std::string, std::shared_ptr<SubscriberFactoryInterface>> subscriber_factories)
419419
{
420420
return collect_compressed_topics(node);
421421
}

0 commit comments

Comments
 (0)