Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa committed Oct 10, 2024
1 parent ba04b47 commit c9f6e1b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/libav_streamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,9 @@ std::shared_ptr<ImageStreamer> LibavStreamerType::create_streamer(
async_web_server_cpp::HttpConnectionPtr connection,
rclcpp::Node::SharedPtr node)
{
return std::make_shared<LibavStreamer>(request, connection, node, format_name_, codec_name_,
content_type_);
return std::make_shared<LibavStreamer>(
request, connection, node, format_name_, codec_name_,
content_type_);
}

std::string LibavStreamerType::create_viewer(const async_web_server_cpp::HttpRequest & request)
Expand Down
5 changes: 3 additions & 2 deletions src/multipart_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ void MultipartStream::sendPartHeader(
new std::vector<async_web_server_cpp::HttpHeader>());
headers->push_back(async_web_server_cpp::HttpHeader("Content-type", type));
headers->push_back(async_web_server_cpp::HttpHeader("X-Timestamp", stamp));
headers->push_back(async_web_server_cpp::HttpHeader("Content-Length",
std::to_string(payload_size)));
headers->push_back(
async_web_server_cpp::HttpHeader(
"Content-Length", std::to_string(payload_size)));
connection_->write(async_web_server_cpp::HttpReply::to_buffers(*headers), headers);
}

Expand Down
10 changes: 5 additions & 5 deletions src/web_video_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ bool WebVideoServer::handle_stream(
type = "mjpeg";
}
}
std::shared_ptr<ImageStreamer> streamer = stream_types_[type]->create_streamer(request,
connection, node_);
std::shared_ptr<ImageStreamer> streamer = stream_types_[type]->create_streamer(
request, connection, node_);
streamer->start();
std::scoped_lock lock(subscriber_mutex_);
image_subscribers_.push_back(streamer);
Expand All @@ -223,8 +223,8 @@ bool WebVideoServer::handle_snapshot(
async_web_server_cpp::HttpConnectionPtr connection, const char * begin,
const char * end)
{
std::shared_ptr<ImageStreamer> streamer = std::make_shared<JpegSnapshotStreamer>(request,
connection, node_);
std::shared_ptr<ImageStreamer> streamer = std::make_shared<JpegSnapshotStreamer>(
request, connection, node_);
streamer->start();

std::scoped_lock lock(subscriber_mutex_);
Expand Down Expand Up @@ -321,7 +321,7 @@ bool WebVideoServer::handle_list_streams(
"<head><title>ROS Image Topic List</title></head>"
"<body><h1>Available ROS Image Topics:</h1>");
connection->write("<ul>");
for(std::string & camera_info_topic : camera_info_topics) {
for (std::string & camera_info_topic : camera_info_topics) {
if (boost::algorithm::ends_with(camera_info_topic, "/camera_info")) {
std::string base_topic = camera_info_topic.substr(
0,
Expand Down

0 comments on commit c9f6e1b

Please sign in to comment.