Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber
Class OperationSetVideoTelephonyJabberImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.media.AbstractOperationSetVideoTelephony<OperationSetBasicTelephonyJabberImpl,ProtocolProviderServiceJabberImpl,CallJabberImpl,CallPeerJabberImpl>
      extended by net.java.sip.communicator.impl.protocol.jabber.OperationSetVideoTelephonyJabberImpl
All Implemented Interfaces:
OperationSet, OperationSetVideoTelephony
Direct Known Subclasses:
OperationSetDesktopStreamingJabberImpl

public class OperationSetVideoTelephonyJabberImpl
extends AbstractOperationSetVideoTelephony<OperationSetBasicTelephonyJabberImpl,ProtocolProviderServiceJabberImpl,CallJabberImpl,CallPeerJabberImpl>

Implements OperationSetVideoTelephony in order to give access to video-specific functionality in the Jabber protocol implementation.

Author:
Emil Ivov

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
OperationSetVideoTelephonyJabberImpl(OperationSetBasicTelephonyJabberImpl basicTelephony)
          Initializes a new OperationSetVideoTelephonyJabberImpl instance which builds upon the telephony-related functionality of a specific OperationSetBasicTelephonyJabberImpl.
 
Method Summary
 void answerVideoCallPeer(CallPeer peer)
          Indicates a user request to answer an incoming call with video enabled from the specified CallPeer.
protected  Call createOutgoingVideoCall(String calleeAddress)
          Check if the remote part supports Jingle video.
 Call createVideoCall(Contact callee)
          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.
 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, createVideoCall, createVideoCall, 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

OperationSetVideoTelephonyJabberImpl

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

Parameters:
basicTelephony - the OperationSetBasicTelephonyJabberImpl 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<OperationSetBasicTelephonyJabberImpl,ProtocolProviderServiceJabberImpl,CallJabberImpl,CallPeerJabberImpl>
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
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.

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.

createOutgoingVideoCall

protected Call createOutgoingVideoCall(String calleeAddress)
                                throws OperationFailedException
Check if the remote part supports Jingle video.

Parameters:
calleeAddress - Contact address
Returns:
true if contact support Jingle video, false otherwise
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. Return null so protocols who supports it to override it.

Specified by:
getQualityControl in interface OperationSetVideoTelephony
Overrides:
getQualityControl in class AbstractOperationSetVideoTelephony<OperationSetBasicTelephonyJabberImpl,ProtocolProviderServiceJabberImpl,CallJabberImpl,CallPeerJabberImpl>
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.