diff options
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java | 69 |
1 files changed, 66 insertions, 3 deletions
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 52368bf..d5cf175 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 @@ -161,7 +161,7 @@ public class ColibriConferenceIQ throw new NullPointerException("channelBundle"); return - channelBundles.contains(channelBundles) + channelBundles.contains(channelBundle) ? false : channelBundles.add(channelBundle); } @@ -543,6 +543,14 @@ public class ColibriConferenceIQ = "receive-simulcast-layer"; /** + * The XML name of the <tt>packet-delay</tt> attribute of + * a <tt>channel</tt> of a <tt>content</tt> of a <tt>conference</tt> IQ + * which represents the value of the {@link #packetDelay} property of + * <tt>ColibriConferenceIQ.Channel</tt>. + */ + public static final String PACKET_DELAY_ATTR_NAME = "packet-delay"; + + /** * The XML name of the <tt>rtcpport</tt> attribute of a <tt>channel</tt> * of a <tt>content</tt> of a <tt>conference</tt> IQ which represents * the value of the <tt>rtcpPort</tt> property of @@ -613,6 +621,11 @@ public class ColibriConferenceIQ private SimulcastMode simulcastMode; /** + * The amount of delay added to the RTP stream in a number of packets. + */ + private Integer packetDelay; + + /** * The <tt>payload-type</tt> elements defined by XEP-0167: Jingle RTP * Sessions associated with this <tt>channel</tt>. */ @@ -893,6 +906,18 @@ public class ColibriConferenceIQ } /** + * Returns an <tt>Integer</tt> which stands for the amount of delay + * added to the RTP stream in a number of packets. + * + * @return <tt>Integer</tt> with the value or <tt>null</tt> if + * unspecified. + */ + public Integer getPacketDelay() + { + return packetDelay; + } + + /** * Gets a list of <tt>payload-type</tt> elements defined by XEP-0167: * Jingle RTP Sessions added to this <tt>channel</tt>. * @@ -1077,8 +1102,16 @@ public class ColibriConferenceIQ if (adaptiveSimulcast != null) { - xml.append(' ').append(adaptiveSimulcast).append("='") - .append(adaptiveSimulcast).append('\''); + xml.append(' ').append(ADAPTIVE_SIMULCAST_ATTR_NAME) + .append("='").append(adaptiveSimulcast).append('\''); + } + + // packet-delay + Integer packetDelay = getPacketDelay(); + if (packetDelay != null) + { + xml.append(' ').append(PACKET_DELAY_ATTR_NAME).append("='") + .append(packetDelay).append('\''); } // simulcastMode @@ -1314,6 +1347,17 @@ public class ColibriConferenceIQ } /** + * Configures channel's packet delay which tells by how many packets + * the RTP streams will be delayed. + * @param packetDelay an <tt>Integer</tt> value which stands for + * the packet delay that will be set or <tt>null</tt> to leave undefined + */ + public void setPacketDelay(Integer packetDelay) + { + this.packetDelay = packetDelay; + } + + /** * Sets the value of the 'simulcast-mode' flag. * @param simulcastMode the value to set. */ @@ -1925,6 +1969,25 @@ public class ColibriConferenceIQ } /** + * Adds <tt>ChannelCommon</tt> to this <tt>Content</tt>. + * @param channelCommon {@link ChannelCommon} instance to be added to + * this content. + * @return <tt>true</tt> if given <tt>channelCommon</tt> has been + * actually added to this <tt>Content</tt> instance. + */ + public boolean addChannelCommon(ChannelCommon channelCommon) + { + if (channelCommon instanceof Channel) + { + return addChannel((Channel) channelCommon); + } + else + { + return addSctpConnection((SctpConnection) channelCommon); + } + } + + /** * Adds a specific <tt>SctpConnection</tt> to the list of * <tt>SctpConnection</tt>s included into this <tt>Content</tt>. * |