Skip to content

Commit

Permalink
src: lib: stream: Improve RTSP latency
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Jul 18, 2024
1 parent bf983e0 commit b831638
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lib/stream/rtsp/rtsp_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl RTSPServer {
"H264" => {
format!(
concat!(
"shmsrc socket-path={socket_path} do-timestamp=true is-live=true",
"shmsrc socket-path={socket_path} do-timestamp=true is-live=false",
" ! queue leaky=downstream flush-on-eos=true silent=true max-size-buffers=0",
" ! capsfilter caps={rtp_caps:?}",
" ! rtph264depay",
Expand All @@ -178,7 +178,7 @@ impl RTSPServer {
"RAW" => {
format!(
concat!(
"shmsrc socket-path={socket_path} do-timestamp=true is-live=true",
"shmsrc socket-path={socket_path} do-timestamp=true is-live=false",
" ! queue leaky=downstream flush-on-eos=true silent=true max-size-buffers=0",
" ! capsfilter caps={rtp_caps:?}",
" ! rtpvrawdepay",
Expand All @@ -191,7 +191,7 @@ impl RTSPServer {
"JPEG" => {
format!(
concat!(
"shmsrc socket-path={socket_path} do-timestamp=true is-live=true",
"shmsrc socket-path={socket_path} do-timestamp=true is-live=false",
" ! queue leaky=downstream flush-on-eos=true silent=true max-size-buffers=10",
" ! capsfilter caps={rtp_caps:?}",
" ! rtpjpegdepay",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stream/sink/rtsp_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl RtspSink {
let socket_path = format!("/tmp/{id}");
let sink = gst::ElementFactory::make("shmsink")
.property_from_str("socket-path", &socket_path)
.property("sync", true)
.property("sync", false)
.property("wait-for-connection", true)
.property("shm-size", 10_000_000u32)
.property("enable-last-sample", false)
Expand Down

0 comments on commit b831638

Please sign in to comment.