mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-02 23:38:45 +00:00
rtspsrc2: Increase RTP timeout to 5 seconds, matching rtspsrc
Also fix some logging. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1425>
This commit is contained in:
parent
3e963e9239
commit
e59f3bbe58
2 changed files with 9 additions and 6 deletions
|
@ -6406,7 +6406,7 @@
|
||||||
"construct": false,
|
"construct": false,
|
||||||
"construct-only": false,
|
"construct-only": false,
|
||||||
"controllable": false,
|
"controllable": false,
|
||||||
"default": "2000000000",
|
"default": "5000000000",
|
||||||
"max": "18446744073709551614",
|
"max": "18446744073709551614",
|
||||||
"min": "0",
|
"min": "0",
|
||||||
"mutable": "ready",
|
"mutable": "ready",
|
||||||
|
|
|
@ -52,7 +52,7 @@ use super::sdp;
|
||||||
use super::transport::RtspTransportInfo;
|
use super::transport::RtspTransportInfo;
|
||||||
|
|
||||||
const DEFAULT_LOCATION: Option<Url> = None;
|
const DEFAULT_LOCATION: Option<Url> = None;
|
||||||
const DEFAULT_TIMEOUT: gst::ClockTime = gst::ClockTime::from_seconds(2);
|
const DEFAULT_TIMEOUT: gst::ClockTime = gst::ClockTime::from_seconds(5);
|
||||||
const DEFAULT_PORT_START: u16 = 0;
|
const DEFAULT_PORT_START: u16 = 0;
|
||||||
// Priority list has multicast first, because we want to prefer multicast if it's available
|
// Priority list has multicast first, because we want to prefer multicast if it's available
|
||||||
const DEFAULT_PROTOCOLS: &str = "udp-mcast,udp,tcp";
|
const DEFAULT_PROTOCOLS: &str = "udp-mcast,udp,tcp";
|
||||||
|
@ -1873,9 +1873,10 @@ async fn udp_rtp_task(
|
||||||
let _ = socket.connect(addr).await;
|
let _ = socket.connect(addr).await;
|
||||||
Ok(addr)
|
Ok(addr)
|
||||||
}
|
}
|
||||||
Ok(Err(_elapsed)) => {
|
Ok(Err(_elapsed)) => Err(format!(
|
||||||
Err(format!("No data after {DEFAULT_TIMEOUT} seconds, exiting"))
|
"No data after {} seconds, exiting",
|
||||||
}
|
timeout.seconds()
|
||||||
|
)),
|
||||||
Err(err) => Err(format!("UDP socket was closed: {err:?}")),
|
Err(err) => Err(format!("UDP socket was closed: {err:?}")),
|
||||||
};
|
};
|
||||||
match ret {
|
match ret {
|
||||||
|
@ -1939,7 +1940,9 @@ async fn udp_rtp_task(
|
||||||
break format!("UDP buffer push failed: {err:?}");
|
break format!("UDP buffer push failed: {err:?}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(Err(_elapsed)) => break format!("No data after {DEFAULT_TIMEOUT} seconds, exiting"),
|
Ok(Err(_elapsed)) => {
|
||||||
|
break format!("No data after {} seconds, exiting", timeout.seconds())
|
||||||
|
}
|
||||||
Err(err) => break format!("UDP socket was closed: {err:?}"),
|
Err(err) => break format!("UDP socket was closed: {err:?}"),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue