Skip to content

Commit fc73384

Browse files
authored
Fix build for ROS2 Foxy (#111)
* Fix build for ROS2 Foxy * Switch incoming CompressedImage msgs to use RCL_ROS_TIME
1 parent 2f785ee commit fc73384

File tree

13 files changed

+23
-19
lines changed

13 files changed

+23
-19
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ target_link_libraries(${PROJECT_NAME}
6666
${swscale_LIBRARIES}
6767
)
6868

69-
ament_package()
70-
7169
#############
7270
## Install ##
7371
#############
@@ -81,3 +79,5 @@ install(DIRECTORY include/${PROJECT_NAME}/
8179
DESTINATION include/${PROJECT_NAME}
8280
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp"
8381
)
82+
83+
ament_package()

include/web_video_server/h264_streamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef H264_STREAMERS_H_
22
#define H264_STREAMERS_H_
33

4-
#include <image_transport/image_transport.h>
4+
#include <image_transport/image_transport.hpp>
55
#include "web_video_server/libav_streamer.h"
66
#include "async_web_server_cpp/http_request.hpp"
77
#include "async_web_server_cpp/http_connection.hpp"

include/web_video_server/image_streamer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#define IMAGE_STREAMER_H_
33

44
#include <rclcpp/rclcpp.hpp>
5-
#include <image_transport/image_transport.h>
6-
#include <image_transport/transport_hints.h>
5+
#include <image_transport/image_transport.hpp>
6+
#include <image_transport/transport_hints.hpp>
77
#include <opencv2/opencv.hpp>
88
#include "async_web_server_cpp/http_server.hpp"
99
#include "async_web_server_cpp/http_request.hpp"

include/web_video_server/jpeg_streamers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef JPEG_STREAMERS_H_
22
#define JPEG_STREAMERS_H_
33

4-
#include <image_transport/image_transport.h>
4+
#include <image_transport/image_transport.hpp>
55
#include "web_video_server/image_streamer.h"
66
#include "async_web_server_cpp/http_request.hpp"
77
#include "async_web_server_cpp/http_connection.hpp"

include/web_video_server/libav_streamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef LIBAV_STREAMERS_H_
22
#define LIBAV_STREAMERS_H_
33

4-
#include <image_transport/image_transport.h>
4+
#include <image_transport/image_transport.hpp>
55
#include "web_video_server/image_streamer.h"
66
#include "async_web_server_cpp/http_request.hpp"
77
#include "async_web_server_cpp/http_connection.hpp"

include/web_video_server/png_streamers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef PNG_STREAMERS_H_
22
#define PNG_STREAMERS_H_
33

4-
#include <image_transport/image_transport.h>
4+
#include <image_transport/image_transport.hpp>
55
#include "web_video_server/image_streamer.h"
66
#include "async_web_server_cpp/http_request.hpp"
77
#include "async_web_server_cpp/http_connection.hpp"

include/web_video_server/vp8_streamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#ifndef VP8_STREAMERS_H_
3838
#define VP8_STREAMERS_H_
3939

40-
#include <image_transport/image_transport.h>
40+
#include <image_transport/image_transport.hpp>
4141
#include "web_video_server/libav_streamer.h"
4242
#include "async_web_server_cpp/http_request.hpp"
4343
#include "async_web_server_cpp/http_connection.hpp"

include/web_video_server/vp9_streamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef VP9_STREAMERS_H_
22
#define VP9_STREAMERS_H_
33

4-
#include <image_transport/image_transport.h>
4+
#include <image_transport/image_transport.hpp>
55
#include "web_video_server/libav_streamer.h"
66
#include "async_web_server_cpp/http_request.hpp"
77
#include "async_web_server_cpp/http_connection.hpp"

package.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,8 @@
2828
<exec_depend>async_web_server_cpp</exec_depend>
2929
<exec_depend>ffmpeg</exec_depend>
3030
<exec_depend>sensor_msgs</exec_depend>
31+
32+
<export>
33+
<build_type>ament_cmake</build_type>
34+
</export>
3135
</package>

src/jpeg_streamers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ MjpegStreamer::~MjpegStreamer()
2121
void MjpegStreamer::sendImage(const cv::Mat &img, const rclcpp::Time &time)
2222
{
2323
std::vector<int> encode_params;
24-
encode_params.push_back(CV_IMWRITE_JPEG_QUALITY);
24+
encode_params.push_back(cv::IMWRITE_JPEG_QUALITY);
2525
encode_params.push_back(quality_);
2626

2727
std::vector<uchar> encoded_buffer;
@@ -63,7 +63,7 @@ JpegSnapshotStreamer::~JpegSnapshotStreamer()
6363
void JpegSnapshotStreamer::sendImage(const cv::Mat &img, const rclcpp::Time &time)
6464
{
6565
std::vector<int> encode_params;
66-
encode_params.push_back(CV_IMWRITE_JPEG_QUALITY);
66+
encode_params.push_back(cv::IMWRITE_JPEG_QUALITY);
6767
encode_params.push_back(quality_);
6868

6969
std::vector<uchar> encoded_buffer;

0 commit comments

Comments
 (0)