|
|
|
|
@ -30,8 +30,8 @@ public class CallPeerMediaHandlerJabberImpl
|
|
|
|
|
* The <tt>Logger</tt> used by the <tt>CallPeerMediaHandlerJabberImpl</tt>
|
|
|
|
|
* class and its instances for logging output.
|
|
|
|
|
*/
|
|
|
|
|
private static final Logger logger = Logger
|
|
|
|
|
.getLogger(CallPeerMediaHandlerJabberImpl.class.getName());
|
|
|
|
|
private static final Logger logger
|
|
|
|
|
= Logger.getLogger(CallPeerMediaHandlerJabberImpl.class);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A temporarily single transport manager that we use for generating
|
|
|
|
|
@ -111,9 +111,7 @@ public ContentPacketExtension getRemoteContent(String contentType)
|
|
|
|
|
= JingleUtils.getRtpDescription(content);
|
|
|
|
|
|
|
|
|
|
if(description.getMedia().equals(contentType))
|
|
|
|
|
{
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
@ -133,9 +131,7 @@ public ContentPacketExtension getLocalContent(String contentType)
|
|
|
|
|
= JingleUtils.getRtpDescription(content);
|
|
|
|
|
|
|
|
|
|
if(description.getMedia().equals(contentType))
|
|
|
|
|
{
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
@ -296,7 +292,7 @@ public void processOffer(List<ContentPacketExtension> offer)
|
|
|
|
|
if(helloHash != null && helloHash[1].length() > 0)
|
|
|
|
|
{
|
|
|
|
|
ZrtpHashPacketExtension hash
|
|
|
|
|
= new ZrtpHashPacketExtension();
|
|
|
|
|
= new ZrtpHashPacketExtension();
|
|
|
|
|
hash.setVersion(helloHash[0]);
|
|
|
|
|
hash.setValue(helloHash[1]);
|
|
|
|
|
|
|
|
|
|
@ -407,7 +403,7 @@ protected List<ContentPacketExtension> generateSessionAccept()
|
|
|
|
|
* Creates a {@link ContentPacketExtension}s of the streams for a
|
|
|
|
|
* specific <tt>MediaDevice</tt>.
|
|
|
|
|
*
|
|
|
|
|
* @param type <tt>MediaDevice</tt>
|
|
|
|
|
* @param dev <tt>MediaDevice</tt>
|
|
|
|
|
* @return the {@link ContentPacketExtension}s of stream that this
|
|
|
|
|
* handler is prepared to initiate.
|
|
|
|
|
* @throws OperationFailedException if we fail to create the descriptions
|
|
|
|
|
@ -464,7 +460,7 @@ private ContentPacketExtension createContent(MediaDevice dev)
|
|
|
|
|
* prepared to initiate depending on available <tt>MediaDevice</tt>s and
|
|
|
|
|
* local on-hold and video transmission preferences.
|
|
|
|
|
*
|
|
|
|
|
* @param type <tt>MediaType</tt> of the content
|
|
|
|
|
* @param mediaType <tt>MediaType</tt> of the content
|
|
|
|
|
* @return a {@link List} containing the {@link ContentPacketExtension}s of
|
|
|
|
|
* streams that this handler is prepared to initiate.
|
|
|
|
|
*
|
|
|
|
|
@ -642,9 +638,7 @@ public void reinitAllContents()
|
|
|
|
|
ContentPacketExtension ext = remoteContentMap.get(key);
|
|
|
|
|
|
|
|
|
|
if(ext != null)
|
|
|
|
|
{
|
|
|
|
|
processContent(ext);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -687,9 +681,7 @@ public void removeLocalContent(String name)
|
|
|
|
|
ContentPacketExtension content = localContentMap.remove(name);
|
|
|
|
|
|
|
|
|
|
if(content == null)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RtpDescriptionPacketExtension description
|
|
|
|
|
= JingleUtils.getRtpDescription(content);
|
|
|
|
|
@ -714,9 +706,7 @@ public void removeRemoteContent(String name)
|
|
|
|
|
ContentPacketExtension content = remoteContentMap.remove(name);
|
|
|
|
|
|
|
|
|
|
if(content == null)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RtpDescriptionPacketExtension description
|
|
|
|
|
= JingleUtils.getRtpDescription(content);
|
|
|
|
|
@ -853,7 +843,6 @@ public void processAnswer(List<ContentPacketExtension> answer)
|
|
|
|
|
*
|
|
|
|
|
* @return the transport manager that is handling our address management.
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public TransportManagerJabberImpl getTransportManager()
|
|
|
|
|
{
|
|
|
|
|
return transportManager;
|
|
|
|
|
@ -889,13 +878,9 @@ public void setRemotelyOnHold(boolean onHold)
|
|
|
|
|
{
|
|
|
|
|
//off hold - make sure that we re-enable sending if that's
|
|
|
|
|
if(audioStream != null)
|
|
|
|
|
{
|
|
|
|
|
calculatePostHoldDirection(audioStream);
|
|
|
|
|
}
|
|
|
|
|
if(videoStream != null)
|
|
|
|
|
{
|
|
|
|
|
calculatePostHoldDirection(videoStream);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|