Update image2rtsp.cpp

This commit is contained in:
Dzmitry Maladzenkau 2023-12-05 15:10:29 +01:00 committed by GitHub
parent 9d115f0027
commit 183ff70195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ Image2rtsp::Image2rtsp(const rclcpp::NodeOptions & options) : Node("image2rtsp")
rtsp_server = rtsp_server_create(port, local_only);
appsrc = NULL;
// Setup the pipeline
pipeline_head = "( appsrc name=imagesrc do-timestamp=true min-latency=0 max-latency=0 max-bytes=1000 is-live=true ! videoconvert ! ";
pipeline_head = "( appsrc name=imagesrc do-timestamp=true min-latency=0 max-latency=0 max-bytes=1000 is-live=true ! videoconvert ! videoscale ! ";
pipeline_tail = "key-int-max=30 ! video/x-h264, profile=baseline ! rtph264pay name=pay0 pt=96 )";
pipeline = pipeline_head + caps + " ! x264enc tune=zerolatency bitrate=" + bitrate + pipeline_tail;
rtsp_server_add_url(mountpoint.c_str(), pipeline.c_str(), (GstElement **)&(appsrc));
@ -24,4 +24,4 @@ Image2rtsp::Image2rtsp(const rclcpp::NodeOptions & options) : Node("image2rtsp")
}
#include "rclcpp_components/register_node_macro.hpp"
RCLCPP_COMPONENTS_REGISTER_NODE(Image2rtsp)
RCLCPP_COMPONENTS_REGISTER_NODE(Image2rtsp)