Skip to content

Commit b1e6a3e

Browse files
committed
Fix most of cpplint errors
1 parent 1b89415 commit b1e6a3e

20 files changed

+116
-96
lines changed

include/web_video_server/h264_streamer.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#ifndef H264_STREAMERS_H_
2-
#define H264_STREAMERS_H_
1+
#ifndef WEB_VIDEO_SERVER__H264_STREAMER_HPP_
2+
#define WEB_VIDEO_SERVER__H264_STREAMER_HPP_
33

4-
#include <image_transport/image_transport.hpp>
4+
#include <string>
5+
6+
#include "image_transport/image_transport.hpp"
57
#include "web_video_server/libav_streamer.hpp"
68
#include "async_web_server_cpp/http_request.hpp"
79
#include "async_web_server_cpp/http_connection.hpp"
@@ -33,6 +35,6 @@ class H264StreamerType : public LibavStreamerType
3335
rclcpp::Node::SharedPtr node);
3436
};
3537

36-
}
38+
} // namespace web_video_server
3739

38-
#endif
40+
#endif // WEB_VIDEO_SERVER__H264_STREAMER_HPP_

include/web_video_server/image_streamer.hpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
#ifndef IMAGE_STREAMER_H_
2-
#define IMAGE_STREAMER_H_
1+
#ifndef WEB_VIDEO_SERVER__IMAGE_STREAMER_HPP_
2+
#define WEB_VIDEO_SERVER__IMAGE_STREAMER_HPP_
3+
4+
#include <string>
35

4-
#include <rclcpp/rclcpp.hpp>
5-
#include <image_transport/image_transport.hpp>
6-
#include <image_transport/transport_hints.hpp>
76
#include <opencv2/opencv.hpp>
7+
8+
#include "rclcpp/rclcpp.hpp"
9+
#include "image_transport/image_transport.hpp"
10+
#include "image_transport/transport_hints.hpp"
811
#include "web_video_server/utils.hpp"
912
#include "async_web_server_cpp/http_server.hpp"
1013
#include "async_web_server_cpp/http_request.hpp"
@@ -93,6 +96,6 @@ class ImageStreamerType
9396
virtual std::string create_viewer(const async_web_server_cpp::HttpRequest & request) = 0;
9497
};
9598

96-
}
99+
} // namespace web_video_server
97100

98-
#endif
101+
#endif // WEB_VIDEO_SERVER__IMAGE_STREAMER_HPP_

include/web_video_server/jpeg_streamers.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#ifndef JPEG_STREAMERS_H_
2-
#define JPEG_STREAMERS_H_
1+
#ifndef WEB_VIDEO_SERVER__JPEG_STREAMERS_HPP_
2+
#define WEB_VIDEO_SERVER__JPEG_STREAMERS_HPP_
33

4-
#include <image_transport/image_transport.hpp>
4+
#include <string>
5+
6+
#include "image_transport/image_transport.hpp"
57
#include "web_video_server/image_streamer.hpp"
68
#include "async_web_server_cpp/http_request.hpp"
79
#include "async_web_server_cpp/http_connection.hpp"
@@ -52,6 +54,6 @@ class JpegSnapshotStreamer : public ImageTransportImageStreamer
5254
int quality_;
5355
};
5456

55-
}
57+
} // namespace web_video_server
5658

57-
#endif
59+
#endif // WEB_VIDEO_SERVER__JPEG_STREAMERS_HPP_

include/web_video_server/libav_streamer.hpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
#ifndef LIBAV_STREAMERS_H_
2-
#define LIBAV_STREAMERS_H_
3-
4-
#include <image_transport/image_transport.hpp>
5-
#include "web_video_server/image_streamer.hpp"
6-
#include "async_web_server_cpp/http_request.hpp"
7-
#include "async_web_server_cpp/http_connection.hpp"
1+
#ifndef WEB_VIDEO_SERVER__LIBAV_STREAMER_HPP_
2+
#define WEB_VIDEO_SERVER__LIBAV_STREAMER_HPP_
83

94
extern "C"
105
{
@@ -18,6 +13,13 @@ extern "C"
1813
#include <libavutil/imgutils.h>
1914
}
2015

16+
#include <string>
17+
18+
#include "image_transport/image_transport.hpp"
19+
#include "web_video_server/image_streamer.hpp"
20+
#include "async_web_server_cpp/http_request.hpp"
21+
#include "async_web_server_cpp/http_connection.hpp"
22+
2123
namespace web_video_server
2224
{
2325

@@ -80,6 +82,6 @@ class LibavStreamerType : public ImageStreamerType
8082
const std::string content_type_;
8183
};
8284

83-
}
85+
} // namespace web_video_server
8486

85-
#endif
87+
#endif // WEB_VIDEO_SERVER__LIBAV_STREAMER_HPP_

include/web_video_server/multipart_stream.hpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
#ifndef MULTIPART_STREAM_H_
2-
#define MULTIPART_STREAM_H_
3-
4-
#include <rclcpp/rclcpp.hpp>
5-
#include <async_web_server_cpp/http_connection.hpp>
1+
#ifndef WEB_VIDEO_SERVER__MULTIPART_STREAM_HPP_
2+
#define WEB_VIDEO_SERVER__MULTIPART_STREAM_HPP_
63

74
#include <queue>
5+
#include <memory>
6+
#include <vector>
7+
#include <string>
8+
9+
#include "rclcpp/rclcpp.hpp"
10+
#include "async_web_server_cpp/http_connection.hpp"
811

912
namespace web_video_server
1013
{
@@ -45,6 +48,6 @@ class MultipartStream
4548
std::queue<PendingFooter> pending_footers_;
4649
};
4750

48-
}
51+
} // namespace web_video_server
4952

50-
#endif
53+
#endif // WEB_VIDEO_SERVER__MULTIPART_STREAM_HPP_

include/web_video_server/png_streamers.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#ifndef PNG_STREAMERS_H_
2-
#define PNG_STREAMERS_H_
1+
#ifndef WEB_VIDEO_SERVER__PNG_STREAMERS_HPP_
2+
#define WEB_VIDEO_SERVER__PNG_STREAMERS_HPP_
33

4-
#include <image_transport/image_transport.hpp>
4+
#include <string>
5+
6+
#include "image_transport/image_transport.hpp"
57
#include "web_video_server/image_streamer.hpp"
68
#include "async_web_server_cpp/http_request.hpp"
79
#include "async_web_server_cpp/http_connection.hpp"
@@ -52,6 +54,6 @@ class PngSnapshotStreamer : public ImageTransportImageStreamer
5254
int quality_;
5355
};
5456

55-
}
57+
} // namespace web_video_server
5658

57-
#endif
59+
#endif // WEB_VIDEO_SERVER__PNG_STREAMERS_HPP_

include/web_video_server/ros_compressed_streamer.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#ifndef ROS_COMPRESSED_STREAMERS_H_
2-
#define ROS_COMPRESSED_STREAMERS_H_
1+
#ifndef WEB_VIDEO_SERVER__ROS_COMPRESSED_STREAMER_HPP_
2+
#define WEB_VIDEO_SERVER__ROS_COMPRESSED_STREAMER_HPP_
33

4-
#include <sensor_msgs/msg/compressed_image.hpp>
4+
#include <string>
5+
6+
#include "sensor_msgs/msg/compressed_image.hpp"
57
#include "web_video_server/image_streamer.hpp"
68
#include "async_web_server_cpp/http_request.hpp"
79
#include "async_web_server_cpp/http_connection.hpp"
@@ -46,6 +48,6 @@ class RosCompressedStreamerType : public ImageStreamerType
4648
std::string create_viewer(const async_web_server_cpp::HttpRequest & request);
4749
};
4850

49-
}
51+
} // namespace web_video_server
5052

51-
#endif
53+
#endif // WEB_VIDEO_SERVER__ROS_COMPRESSED_STREAMER_HPP_

include/web_video_server/vp8_streamer.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@
3434
*
3535
*********************************************************************/
3636

37-
#ifndef VP8_STREAMERS_H_
38-
#define VP8_STREAMERS_H_
37+
#ifndef WEB_VIDEO_SERVER__VP8_STREAMER_HPP_
38+
#define WEB_VIDEO_SERVER__VP8_STREAMER_HPP_
3939

40-
#include <image_transport/image_transport.hpp>
40+
#include <string>
41+
42+
#include "image_transport/image_transport.hpp"
4143
#include "web_video_server/libav_streamer.hpp"
4244
#include "async_web_server_cpp/http_request.hpp"
4345
#include "async_web_server_cpp/http_connection.hpp"
@@ -71,6 +73,6 @@ class Vp8StreamerType : public LibavStreamerType
7173
rclcpp::Node::SharedPtr node);
7274
};
7375

74-
}
76+
} // namespace web_video_server
7577

76-
#endif
78+
#endif // WEB_VIDEO_SERVER__VP8_STREAMER_HPP_

include/web_video_server/vp9_streamer.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#ifndef VP9_STREAMERS_H_
2-
#define VP9_STREAMERS_H_
1+
#ifndef WEB_VIDEO_SERVER__VP9_STREAMER_HPP_
2+
#define WEB_VIDEO_SERVER__VP9_STREAMER_HPP_
33

4-
#include <image_transport/image_transport.hpp>
4+
#include "image_transport/image_transport.hpp"
55
#include "web_video_server/libav_streamer.hpp"
66
#include "async_web_server_cpp/http_request.hpp"
77
#include "async_web_server_cpp/http_connection.hpp"
@@ -32,6 +32,6 @@ class Vp9StreamerType : public LibavStreamerType
3232
rclcpp::Node::SharedPtr node);
3333
};
3434

35-
}
35+
} // namespace web_video_server
3636

37-
#endif
37+
#endif // WEB_VIDEO_SERVER__VP9_STREAMER_HPP_

include/web_video_server/web_video_server.hpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
#ifndef WEB_VIDEO_SERVER_H_
2-
#define WEB_VIDEO_SERVER_H_
1+
#ifndef WEB_VIDEO_SERVER__WEB_VIDEO_SERVER_HPP_
2+
#define WEB_VIDEO_SERVER__WEB_VIDEO_SERVER_HPP_
33

4-
#include <rclcpp/rclcpp.hpp>
4+
#include <map>
5+
#include <string>
6+
#include <vector>
57

68
#ifdef CV_BRIDGE_USES_OLD_HEADERS
7-
#include <cv_bridge/cv_bridge.h>
9+
#include "cv_bridge/cv_bridge.h"
810
#else
9-
#include <cv_bridge/cv_bridge.hpp>
11+
#include "cv_bridge/cv_bridge.hpp"
1012
#endif
1113

12-
#include <vector>
14+
#include "rclcpp/rclcpp.hpp"
1315
#include "web_video_server/image_streamer.hpp"
1416
#include "async_web_server_cpp/http_server.hpp"
1517
#include "async_web_server_cpp/http_request.hpp"
@@ -29,7 +31,7 @@ class WebVideoServer
2931
* @brief Constructor
3032
* @return
3133
*/
32-
WebVideoServer(rclcpp::Node::SharedPtr & node);
34+
explicit WebVideoServer(rclcpp::Node::SharedPtr & node);
3335

3436
/**
3537
* @brief Destructor - Cleans up
@@ -91,6 +93,6 @@ class WebVideoServer
9193
boost::mutex subscriber_mutex_;
9294
};
9395

94-
}
96+
} // namespace web_video_server
9597

96-
#endif
98+
#endif // WEB_VIDEO_SERVER__WEB_VIDEO_SERVER_HPP_

0 commit comments

Comments
 (0)