mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-27 20:40:31 +00:00
webrtcsink: reset default values when disabling congestion control
This commit is contained in:
parent
d230345d90
commit
a4df10b112
2 changed files with 5 additions and 2 deletions
|
@ -111,8 +111,6 @@ async fn run(args: Args) -> Result<(), Error> {
|
|||
let listener = try_socket.expect("Failed to bind");
|
||||
info!("Listening on: {}", addr);
|
||||
|
||||
info!("Disable FEC: {}", args.disable_fec);
|
||||
|
||||
let pipeline_str = format!(
|
||||
"webrtcsink name=ws do-retransmission={} do-fec={} congestion-control={} \
|
||||
uridecodebin name=d uri={} \
|
||||
|
|
|
@ -2217,6 +2217,11 @@ impl ObjectImpl for WebRTCSink {
|
|||
match new_heuristic {
|
||||
WebRTCSinkCongestionControl::Disabled => {
|
||||
consumer.congestion_controller.take();
|
||||
for encoder in &mut consumer.encoders {
|
||||
encoder
|
||||
.set_bitrate(&self.instance(), consumer.max_bitrate as i32);
|
||||
encoder.transceiver.set_property("fec-percentage", 50u32);
|
||||
}
|
||||
}
|
||||
WebRTCSinkCongestionControl::Homegrown => {
|
||||
let _ = consumer.congestion_controller.insert(
|
||||
|
|
Loading…
Reference in a new issue