Make RTCP-MUX a stream property

This commit is contained in:
Marvin W 2021-03-29 13:19:52 +02:00
parent 9520a81b81
commit c7d1ee4dc5
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
2 changed files with 8 additions and 0 deletions

View file

@ -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) { 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<StanzaNode> payload_type_nodes = description_node.get_subnodes("payload-type"); Gee.List<StanzaNode> payload_type_nodes = description_node.get_subnodes("payload-type");
if (payload_type_nodes.size == 0) { if (payload_type_nodes.size == 0) {
warning("Counterpart didn't include any payload types"); warning("Counterpart didn't include any payload types");

View file

@ -37,6 +37,13 @@ public abstract class Xmpp.Xep.JingleRtp.Stream : Object {
public bool receiving { get { public bool receiving { get {
return content.session.senders_include_counterpart(content.senders); 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) { protected Stream(Jingle.Content content) {
this.content = content; this.content = content;