Skip to content

Commit

Permalink
Fix latency issue in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-palmer committed Oct 18, 2024
1 parent 5ff68fd commit d0df01f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions barlus_gstreamer_proxy/src/gstreamer_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ GStreamerProxy::GStreamerProxy(const rclcpp::NodeOptions & options)
}

camera_pub_ = std::make_shared<image_transport::CameraPublisher>(
image_transport::create_camera_publisher(this, "image_raw", rclcpp::QoS{100}.get_rmw_qos_profile()));
image_transport::create_camera_publisher(this, "image_raw", rclcpp::QoS{10}.get_rmw_qos_profile()));

if (!configure_stream()) {
shutdown_stream();
Expand All @@ -104,7 +104,7 @@ auto GStreamerProxy::configure_stream() -> bool
RCLCPP_INFO(get_logger(), "Starting GStreamer pipeline with address: %s", params_.stream_address.c_str()); // NOLINT

// The following configurations are intended for low-latency transport
const std::string video_source = "rtspsrc location=" + params_.stream_address;
const std::string video_source = "rtspsrc location=" + params_.stream_address + " latency=0";
const std::string video_codec = "! rtph264depay ! h264parse ! avdec_h264";
const std::string video_decode = "! decodebin ! videoconvert ! video/x-raw,format=(string)BGR";
const std::string video_sink_conf = "! queue ! appsink emit-signals=true sync=false max-buffers=1 drop=true";
Expand Down

0 comments on commit d0df01f

Please sign in to comment.