Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip
Class OperationSetVideoTelephonySipImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.media.AbstractOperationSetVideoTelephony<OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl,CallSipImpl,CallPeerSipImpl>
      extended by net.java.sip.communicator.impl.protocol.sip.OperationSetVideoTelephonySipImpl
All Implemented Interfaces:
OperationSet, OperationSetVideoTelephony
Direct Known Subclasses:
OperationSetDesktopStreamingSipImpl

public class OperationSetVideoTelephonySipImpl
extends AbstractOperationSetVideoTelephony<OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl,CallSipImpl,CallPeerSipImpl>

Implements OperationSetVideoTelephony in order to give access to video-specific functionality in the SIP protocol implementation such as visual Components displaying video and listening to dynamic availability of such Components. Because the video in the SIP protocol implementation is provided by the CallSession, this OperationSetVideoTelephony just delegates to the CallSession while hiding the CallSession as the provider of the video and pretending this OperationSetVideoTelephony is the provider because other implementation may not provider their video through the CallSession.

Author:
Lyubomir Marinov

Field Summary
 
Fields inherited from class net.java.sip.communicator.service.protocol.media.AbstractOperationSetVideoTelephony
basicTelephony, parentProvider
 
Fields inherited from interface net.java.sip.communicator.service.protocol.OperationSetVideoTelephony
LOCAL_VIDEO_STREAMING
 
Constructor Summary
OperationSetVideoTelephonySipImpl(OperationSetBasicTelephonySipImpl basicTelephony)
          Initializes a new OperationSetVideoTelephonySipImpl instance which builds upon the telephony-related functionality of a specific OperationSetBasicTelephonySipImpl.
 
Method Summary
 void answerVideoCallPeer(CallPeer peer)
          Indicates a user request to answer an incoming call with video enabled from the specified CallPeer.
 Call createVideoCall(Contact callee)
          Create a new video call and invite the specified CallPeer to it.
 Call createVideoCall(Contact callee, QualityPreset qualityPreferences)
          Create a new video call and invite the specified CallPeer to it.
 Call createVideoCall(String uri)
          Create a new video call and invite the specified CallPeer to it.
 Call createVideoCall(String uri, QualityPreset qualityPreferences)
          Create a new video call and invite the specified CallPeer to it.
 QualityControl getQualityControl(CallPeer peer)
          Returns the quality control for video calls if any.
 void setLocalVideoAllowed(Call call, boolean allowed)
          Implements OperationSetVideoTelephony#setLocalVideoAllowed(Call, boolean).
 
Methods inherited from class net.java.sip.communicator.service.protocol.media.AbstractOperationSetVideoTelephony
addPropertyChangeListener, addVideoListener, createLocalVisualComponent, disposeLocalVisualComponent, getMediaUseCase, getVisualComponent, getVisualComponents, isLocalVideoAllowed, isLocalVideoStreaming, removePropertyChangeListener, removeVideoListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationSetVideoTelephonySipImpl

public OperationSetVideoTelephonySipImpl(OperationSetBasicTelephonySipImpl basicTelephony)
Initializes a new OperationSetVideoTelephonySipImpl instance which builds upon the telephony-related functionality of a specific OperationSetBasicTelephonySipImpl.

Parameters:
basicTelephony - the OperationSetBasicTelephonySipImpl the new extension should build upon
Method Detail

setLocalVideoAllowed

public void setLocalVideoAllowed(Call call,
                                 boolean allowed)
                          throws OperationFailedException
Implements OperationSetVideoTelephony#setLocalVideoAllowed(Call, boolean). Modifies the local media setup to reflect the requested setting for the streaming of the local video and then re-invites all CallPeers to re-negotiate the modified media setup.

Specified by:
setLocalVideoAllowed in interface OperationSetVideoTelephony
Overrides:
setLocalVideoAllowed in class AbstractOperationSetVideoTelephony<OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl,CallSipImpl,CallPeerSipImpl>
Parameters:
call - the call where we'd like to allow sending local video.
allowed - true if local video transmission is allowed and false otherwise.
Throws:
OperationFailedException - if video initialization fails.

createVideoCall

public Call createVideoCall(String uri)
                     throws OperationFailedException,
                            ParseException
Create a new video call and invite the specified CallPeer to it.

Parameters:
uri - the address of the callee that we should invite to a new call.
Returns:
CallPeer the CallPeer that will represented by the specified uri. All following state change events will be delivered through that call peer. The Call that this peer is a member of could be retrieved from the CallParticipatn instance with the use of the corresponding method.
Throws:
OperationFailedException - with the corresponding code if we fail to create the video call.
ParseException - if callee is not a valid sip address string.

createVideoCall

public Call createVideoCall(Contact callee)
                     throws OperationFailedException
Create a new video call and invite the specified CallPeer to it.

Parameters:
callee - the address of the callee that we should invite to a new call.
Returns:
CallPeer the CallPeer that will represented by the specified uri. All following state change events will be delivered through that call peer. The Call that this peer is a member of could be retrieved from the CallParticipatn instance with the use of the corresponding method.
Throws:
OperationFailedException - with the corresponding code if we fail to create the video call.

createVideoCall

public Call createVideoCall(String uri,
                            QualityPreset qualityPreferences)
                     throws OperationFailedException,
                            ParseException
Create a new video call and invite the specified CallPeer to it.

Specified by:
createVideoCall in interface OperationSetVideoTelephony
Overrides:
createVideoCall in class AbstractOperationSetVideoTelephony<OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl,CallSipImpl,CallPeerSipImpl>
Parameters:
uri - the address of the callee that we should invite to a new call.
qualityPreferences - the quality preset we will use establishing the video call, and we will expect from the other side. When establishing call we don't have any indications whether remote part supports quality presets, so this setting can be ignored.
Returns:
CallPeer the CallPeer that will represented by the specified uri. All following state change events will be delivered through that call peer. The Call that this peer is a member of could be retrieved from the CallParticipatn instance with the use of the corresponding method.
Throws:
OperationFailedException - with the corresponding code if we fail to create the video call.
ParseException - if callee is not a valid sip address string.

createVideoCall

public Call createVideoCall(Contact callee,
                            QualityPreset qualityPreferences)
                     throws OperationFailedException
Create a new video call and invite the specified CallPeer to it.

Specified by:
createVideoCall in interface OperationSetVideoTelephony
Overrides:
createVideoCall in class AbstractOperationSetVideoTelephony<OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl,CallSipImpl,CallPeerSipImpl>
Parameters:
callee - the address of the callee that we should invite to a new call.
qualityPreferences - the quality preset we will use establishing the video call, and we will expect from the other side. When establishing call we don't have any indications whether remote part supports quality presets, so this setting can be ignored.
Returns:
CallPeer the CallPeer that will represented by the specified uri. All following state change events will be delivered through that call peer. The Call that this peer is a member of could be retrieved from the CallParticipatn instance with the use of the corresponding method.
Throws:
OperationFailedException - with the corresponding code if we fail to create the video call.

answerVideoCallPeer

public void answerVideoCallPeer(CallPeer peer)
                         throws OperationFailedException
Indicates a user request to answer an incoming call with video enabled from the specified CallPeer.

Parameters:
peer - the call peer that we'd like to answer.
Throws:
OperationFailedException - with the corresponding code if we encounter an error while performing this operation.

getQualityControl

public QualityControl getQualityControl(CallPeer peer)
Returns the quality control for video calls if any.

Specified by:
getQualityControl in interface OperationSetVideoTelephony
Overrides:
getQualityControl in class AbstractOperationSetVideoTelephony<OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl,CallSipImpl,CallPeerSipImpl>
Parameters:
peer - the peer which this control operates on.
Returns:
the implemented quality control.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.