From 8f63f26ae349403758f14b6a5cfcfbb1052f6890 Mon Sep 17 00:00:00 2001 From: George Politis Date: Mon, 18 Aug 2014 19:42:15 +0200 Subject: [PATCH] Initial implementation of simulcast routing in the bridge. --- .../colibri/ColibriConferenceIQ.java | 46 +++++++++++++++++++ .../extensions/colibri/ColibriIQProvider.java | 12 +++++ 2 files changed, 58 insertions(+) diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java index 351c13ade..0f47ffa5d 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java @@ -799,6 +799,17 @@ public static class Channel */ public static final String LAST_N_ATTR_NAME = "last-n"; + /** + * The XML name of the receive-simulcast-layer attribute of a + * video Channel which specifies the target quality of the + * simulcast substreams to be sent from Jitsi Videobridge to the + * endpoint associated with the video Channel. The value of the + * receive-simulcast-layer attribute is an unsigned integer. + * Typically used for debugging purposes. + */ + public static final String RECEIVING_SIMULCAST_LAYER + = "receive-simulcast-layer"; + /** * The XML name of the rtcpport attribute of a channel * of a content of a conference IQ which represents @@ -859,6 +870,13 @@ public static class Channel */ private Integer lastN; + /** + * The target quality of the simulcast substreams to be sent from Jitsi + * Videobridge to the endpoint associated with this video + * Channel. + */ + private Integer receivingSimulcastLayer; + /** * The payload-type elements defined by XEP-0167: Jingle RTP * Sessions associated with this channel. @@ -1062,6 +1080,20 @@ public Integer getLastN() return lastN; } + /** + * Gets the target quality of the simulcast substreams to be sent from + * Jitsi Videobridge to the endpoint associated with this video + * Channel. + * + * @return the target quality of the simulcast substreams to be sent + * from Jitsi Videobridge to the endpoint associated with this video + * Channel. + */ + public Integer getReceivingSimulcastLayer() + { + return receivingSimulcastLayer; + } + /** * Gets a list of payload-type elements defined by XEP-0167: * Jingle RTP Sessions added to this channel. @@ -1286,6 +1318,20 @@ public void setLastN(Integer lastN) this.lastN = lastN; } + /** + * Sets the target quality of the simulcast substreams to be sent from + * Jitsi Videobridge to the endpoint associated with this video + * Channel. + * + * @param simulcastLayer the target quality of the simulcast substreams + * to be sent from Jitsi Videobridge to the endpoint associated with + * this video Channel. + */ + public void setReceivingSimulcastLayer(Integer simulcastLayer) + { + this.receivingSimulcastLayer = simulcastLayer; + } + /** * Sets the port which has been allocated to this channel for * the purposes of transmitting RTCP packets. diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriIQProvider.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriIQProvider.java index c1ee6f066..fd7e25f3d 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriIQProvider.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriIQProvider.java @@ -339,6 +339,18 @@ else if (ColibriConferenceIQ.Recording.ELEMENT_NAME.equals( if ((lastN != null) && (lastN.length() != 0)) channel.setLastN(Integer.parseInt(lastN)); + // receiving simulcast layer + String receivingSimulcastLayer + = parser.getAttributeValue( + "", + ColibriConferenceIQ.Channel + .RECEIVING_SIMULCAST_LAYER); + + if ((receivingSimulcastLayer != null) + && (receivingSimulcastLayer.length() != 0)) + channel.setReceivingSimulcastLayer( + Integer.parseInt(receivingSimulcastLayer)); + // rtcpPort String rtcpPort = parser.getAttributeValue(