mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 19:41:00 +00:00
webrtcsink: fix TWCC extension adding
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1310>
This commit is contained in:
parent
ba9fa989ff
commit
e83238b681
1 changed files with 7 additions and 4 deletions
|
@ -677,10 +677,13 @@ impl EncodingChainBuilder {
|
|||
* provide feedback for audio packets.
|
||||
*/
|
||||
if let Some(idx) = self.twcc {
|
||||
let twcc_extension =
|
||||
gst_rtp::RTPHeaderExtension::create_from_uri(RTP_TWCC_URI).unwrap();
|
||||
twcc_extension.set_id(idx);
|
||||
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(idx);
|
||||
pay.emit_by_name::<()>("add-extension", &[&twcc_extension]);
|
||||
} else {
|
||||
anyhow::bail!("Failed to add TWCC extension, make sure 'gst-plugins-good:rtpmanager' is installed");
|
||||
}
|
||||
}
|
||||
elements.push(pay);
|
||||
|
||||
|
|
Loading…
Reference in a new issue