From c7d1ee4dc5a08715ed68ed69e918f5ec9cbd4b40 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Mon, 29 Mar 2021 13:19:52 +0200 Subject: Make RTCP-MUX a stream property --- xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala | 1 + xmpp-vala/src/module/xep/0167_jingle_rtp/stream.vala | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'xmpp-vala') diff --git a/xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala b/xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala index 32ea1df6..ff3d31f4 100644 --- a/xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala +++ b/xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala @@ -127,6 +127,7 @@ public class Xmpp.Xep.JingleRtp.Parameters : Jingle.ContentParameters, Object { } public void handle_accept(XmppStream stream, Jingle.Session session, Jingle.Content content, StanzaNode description_node) { + rtcp_mux = description_node.get_subnode("rtcp-mux") != null; Gee.List payload_type_nodes = description_node.get_subnodes("payload-type"); if (payload_type_nodes.size == 0) { warning("Counterpart didn't include any payload types"); diff --git a/xmpp-vala/src/module/xep/0167_jingle_rtp/stream.vala b/xmpp-vala/src/module/xep/0167_jingle_rtp/stream.vala index 2fc29291..730ce9f8 100644 --- a/xmpp-vala/src/module/xep/0167_jingle_rtp/stream.vala +++ b/xmpp-vala/src/module/xep/0167_jingle_rtp/stream.vala @@ -37,6 +37,13 @@ public abstract class Xmpp.Xep.JingleRtp.Stream : Object { public bool receiving { get { return content.session.senders_include_counterpart(content.senders); }} + public bool rtcp_mux { get { + var content_params = content.content_params; + if (content_params is Parameters) { + return ((Parameters)content_params).rtcp_mux; + } + return false; + }} protected Stream(Jingle.Content content) { this.content = content; -- cgit v1.2.3-54-g00ecf