Compare commits
No commits in common. "master" and "dev" have entirely different histories.
|
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 4.2)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(image2rtsp)
|
project(image2rtsp)
|
||||||
|
|
||||||
# Default to C99
|
# Default to C99
|
||||||
|
|
@ -34,10 +34,7 @@ include_directories(${OpenCV_INCLUDE_DIRS})
|
||||||
file(GLOB SOURCES src/video.cpp)
|
file(GLOB SOURCES src/video.cpp)
|
||||||
|
|
||||||
add_executable(image2rtsp src/image2rtsp.cpp ${SOURCES})
|
add_executable(image2rtsp src/image2rtsp.cpp ${SOURCES})
|
||||||
target_link_libraries(image2rtsp
|
ament_target_dependencies(image2rtsp rclcpp sensor_msgs)
|
||||||
rclcpp::rclcpp
|
|
||||||
${sensor_msgs_TARGETS}
|
|
||||||
)
|
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${GST_INCLUDE_DIRS}
|
${GST_INCLUDE_DIRS}
|
||||||
|
|
|
||||||
|
|
@ -98,4 +98,4 @@ ros2 launch image2rtsp rtsp.launch.py
|
||||||
```
|
```
|
||||||
## Note
|
## Note
|
||||||
|
|
||||||
- The YAML configuration allows you to fully customize the pipeline according to your needs (Useful insights can be found, for example, [here](https://github.com/maladzenkau/image2rtsp/pull/9)). This package does not provide any built-in acceleration. As its stability has not been validated across a wide range of Linux systems using advanced hardware or software techniques, support for such configurations is left to the user. There are no plans to update the package to support GPU/CPU acceleration. Please do not open issues related to software/hardware acceleration if they are directly related to the GStreamer pipeline itself.
|
- The YAML configuration allows you to fully customize the pipeline according to your needs. This package does not provide any built-in acceleration. As its stability has not been validated across a wide range of Linux systems using advanced hardware or software techniques, support for such configurations is left to the user. There are no plans to update the package to support GPU/CPU acceleration. Please do not open issues related to software/hardware acceleration if they are directly related to the GStreamer pipeline itself.
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,7 @@
|
||||||
|
|
||||||
<depend>rclcpp</depend>
|
<depend>rclcpp</depend>
|
||||||
<depend>sensor_msgs</depend>
|
<depend>sensor_msgs</depend>
|
||||||
<depend>python3-opencv</depend>
|
<depend>open_CV</depend>
|
||||||
|
|
||||||
<build_depend>gstreamer1.0-plugins-base</build_depend>
|
|
||||||
<build_depend>gstreamer1.0-plugins-good</build_depend>
|
|
||||||
<build_depend>gstreamer1.0-plugins-bad</build_depend>
|
|
||||||
<build_depend>gstreamer1.0-plugins-ugly</build_depend>
|
|
||||||
<build_depend>libgstrtspserver-1.0-dev</build_depend>
|
|
||||||
|
|
||||||
<test_depend>ament_lint_auto</test_depend>
|
<test_depend>ament_lint_auto</test_depend>
|
||||||
<test_depend>ament_lint_common</test_depend>
|
<test_depend>ament_lint_common</test_depend>
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ void Image2rtsp::topic_callback(const sensor_msgs::msg::Image::SharedPtr msg){
|
||||||
void Image2rtsp::compressed_topic_callback(const sensor_msgs::msg::CompressedImage::SharedPtr msg){
|
void Image2rtsp::compressed_topic_callback(const sensor_msgs::msg::CompressedImage::SharedPtr msg){
|
||||||
if (appsrc == NULL) return;
|
if (appsrc == NULL) return;
|
||||||
// Decompress the image
|
// Decompress the image
|
||||||
cv::Mat img = cv::imdecode(cv::Mat(msg->data.to_vector()), cv::IMREAD_UNCHANGED);
|
cv::Mat img = cv::imdecode(cv::Mat(msg->data), cv::IMREAD_UNCHANGED);
|
||||||
if (img.empty()) {
|
if (img.empty()) {
|
||||||
RCLCPP_ERROR(this->get_logger(), "Failed to decompress image");
|
RCLCPP_ERROR(this->get_logger(), "Failed to decompress image");
|
||||||
return;
|
return;
|
||||||
|
|
@ -207,4 +207,4 @@ void Image2rtsp::compressed_topic_callback(const sensor_msgs::msg::CompressedIma
|
||||||
|
|
||||||
// Push the buffer to GStreamer
|
// Push the buffer to GStreamer
|
||||||
gst_app_src_push_buffer(appsrc, buf);
|
gst_app_src_push_buffer(appsrc, buf);
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue