mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-08 18:25:30 +00:00
webrtcsink: fix TWCC extension adding
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1327>
This commit is contained in:
parent
94ab108069
commit
2151df4d70
1 changed files with 6 additions and 3 deletions
|
@ -613,9 +613,12 @@ fn setup_encoding(
|
|||
* provide feedback for audio packets.
|
||||
*/
|
||||
if twcc {
|
||||
let twcc_extension = gst_rtp::RTPHeaderExtension::create_from_uri(RTP_TWCC_URI).unwrap();
|
||||
twcc_extension.set_id(1);
|
||||
pay.emit_by_name::<()>("add-extension", &[&twcc_extension]);
|
||||
if let Some(twcc_extension) = gst_rtp::RTPHeaderExtension::create_from_uri(RTP_TWCC_URI) {
|
||||
twcc_extension.set_id(1);
|
||||
pay.emit_by_name::<()>("add-extension", &[&twcc_extension]);
|
||||
} else {
|
||||
anyhow::bail!("Failed to add TWCC extension, make sure 'gst-plugins-good:rtpmanager' is installed");
|
||||
}
|
||||
}
|
||||
|
||||
conv_filter.set_property("caps", conv_caps);
|
||||
|
|
Loading…
Reference in a new issue