Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface OperationSetVideoTelephony

All Superinterfaces:
OperationSet
All Known Subinterfaces:
OperationSetDesktopSharingServer, OperationSetDesktopStreaming
All Known Implementing Classes:
AbstractOperationSetVideoTelephony, OperationSetDesktopSharingServerJabberImpl, OperationSetDesktopSharingServerSipImpl, OperationSetDesktopStreamingJabberImpl, OperationSetDesktopStreamingSipImpl, OperationSetVideoTelephonyJabberImpl, OperationSetVideoTelephonySipImpl

public interface OperationSetVideoTelephony
extends OperationSet

Represents an OperationSet giving access to video-specific functionality in telephony such as visual Components displaying video and listening to dynamic availability of such Components.

Author:
Lyubomir Marinov, Sebastien Vincent

Field Summary
static String LOCAL_VIDEO_STREAMING
          The property which indicates whether a specific Call is currently streaming the local video (to a remote destination).
 
Method Summary
 void addPropertyChangeListener(Call call, PropertyChangeListener listener)
          Adds a specific PropertyChangeListener to the list of listeners which get notified when the properties (e.g.
 void addVideoListener(CallPeer peer, VideoListener listener)
          Adds a specific VideoListener to this telephony in order to receive notifications when visual/video Components are being added and removed for a specific CallPeer.
 void answerVideoCallPeer(CallPeer peer)
          Indicates a user request to answer an incoming call with video enabled from the specified CallPeer.
 Component createLocalVisualComponent(CallPeer peer, VideoListener listener)
          Creates a visual Component which depicts the local video being streamed to a specific 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.
 void disposeLocalVisualComponent(CallPeer peer, Component component)
          Disposes of a visual Component depicting the local video for a specific CallPeer (previously obtained through createLocalVisualComponent).
 QualityControl getQualityControl(CallPeer peer)
          Returns the quality control for video calls if any.
 Component getVisualComponent(CallPeer peer)
          Deprecated. 
 List<Component> getVisualComponents(CallPeer peer)
          Gets the visual/video Components available in this telephony for a specific CallPeer.
 boolean isLocalVideoAllowed(Call call)
          Gets the indicator which determines whether the streaming of local video in a specific Call is allowed.
 boolean isLocalVideoStreaming(Call call)
          Gets the indicator which determines whether a specific Call is currently streaming the local video (to a remote destination).
 void removePropertyChangeListener(Call call, PropertyChangeListener listener)
          Removes a specific PropertyChangeListener from the list of listeners which get notified when the properties (e.g.
 void removeVideoListener(CallPeer peer, VideoListener listener)
          Removes a specific VideoListener from this telephony in order to no longer have it receive notifications when visual/video Components are being added and removed for a specific CallPeer.
 void setLocalVideoAllowed(Call call, boolean allowed)
          Sets the indicator which determines whether the streaming of local video in a specific Call is allowed.
 

Field Detail

LOCAL_VIDEO_STREAMING

static final String LOCAL_VIDEO_STREAMING
The property which indicates whether a specific Call is currently streaming the local video (to a remote destination).

See Also:
Constant Field Values
Method Detail

addVideoListener

void addVideoListener(CallPeer peer,
                      VideoListener listener)
Adds a specific VideoListener to this telephony in order to receive notifications when visual/video Components are being added and removed for a specific CallPeer.

Parameters:
peer - the CallPeer whose video the specified listener is to be notified about
listener - the VideoListener to be notified when visual/video Components are being added or removed for peer

createLocalVisualComponent

Component createLocalVisualComponent(CallPeer peer,
                                     VideoListener listener)
                                     throws OperationFailedException
Creates a visual Component which depicts the local video being streamed to a specific CallPeer. The returned visual Component should be disposed when it is no longer required through disposeLocalVisualComponent.

Parameters:
peer - the CallPeer to whom the local video which is to be depicted by the returned visual Component is being streamed
listener - if not null, a VideoListener to track the progress of the creation in case this telephony chooses to perform it asynchronously and to not return the created visual Component immediately/as the result of this method call
Returns:
a visual Component which depicts the local video being streamed to the specified CallPeer if this telephony chooses to carry out the creation synchronously; null if this telephony chooses to create the requested visual Component asynchronously.
Throws:
OperationFailedException - if creating the component fails for whatever reason.

disposeLocalVisualComponent

void disposeLocalVisualComponent(CallPeer peer,
                                 Component component)
Disposes of a visual Component depicting the local video for a specific CallPeer (previously obtained through createLocalVisualComponent). The disposal may include, but is not limited to, releasing the Player which provides the component and renders the local video into it, disconnecting from the video capture device.

Parameters:
peer - the CallPeer for whom the visual Component depicts the local video
component - the visual Component depicting the local video to be disposed

getVisualComponent

@Deprecated
Component getVisualComponent(CallPeer peer)
Deprecated. 

Gets the visual/video Component available in this telephony for a specific CallPeer.

Parameters:
peer - the CallPeer whose video is to be retrieved
Returns:
the visual/video Component available in this telephony for the specified peer if any; otherwise, null

getVisualComponents

List<Component> getVisualComponents(CallPeer peer)
Gets the visual/video Components available in this telephony for a specific CallPeer.

Parameters:
peer - the CallPeer whose videos are to be retrieved
Returns:
the visual/video Components available in this telephony for the specified peer

removeVideoListener

void removeVideoListener(CallPeer peer,
                         VideoListener listener)
Removes a specific VideoListener from this telephony in order to no longer have it receive notifications when visual/video Components are being added and removed for a specific CallPeer.

Parameters:
peer - the CallPeer whose video the specified listener is to no longer be notified about
listener - the VideoListener to no longer be notified when visual/video Components are being added or removed for peer

setLocalVideoAllowed

void setLocalVideoAllowed(Call call,
                          boolean allowed)
                          throws OperationFailedException
Sets the indicator which determines whether the streaming of local video in a specific Call is allowed. The setting does not reflect the availability of actual video capture devices, it just expresses the desire of the user to have the local video streamed in the case the system is actually able to do so.

Parameters:
call - the Call to allow/disallow the streaming of local video for
allowed - true to allow the streaming of local video for the specified Call; false to disallow it
Throws:
OperationFailedException - if initializing local video fails.

isLocalVideoAllowed

boolean isLocalVideoAllowed(Call call)
Gets the indicator which determines whether the streaming of local video in a specific Call is allowed. The setting does not reflect the availability of actual video capture devices, it just expresses the desire of the user to have the local video streamed in the case the system is actually able to do so.

Parameters:
call - the Call to get the indicator of
Returns:
true if the streaming of local video for the specified Call is allowed; otherwise, false

isLocalVideoStreaming

boolean isLocalVideoStreaming(Call call)
Gets the indicator which determines whether a specific Call is currently streaming the local video (to a remote destination).

Parameters:
call - the Call to get the indicator of
Returns:
true if the specified Call is currently streaming the local video (to a remote destination); otherwise, false

addPropertyChangeListener

void addPropertyChangeListener(Call call,
                               PropertyChangeListener listener)
Adds a specific PropertyChangeListener to the list of listeners which get notified when the properties (e.g. LOCAL_VIDEO_STREAMING) associated with a specific Call change their values.

Parameters:
call - the Call to start listening to the changes of the property values of
listener - the PropertyChangeListener to be notified when the properties associated with the specified Call change their values

removePropertyChangeListener

void removePropertyChangeListener(Call call,
                                  PropertyChangeListener listener)
Removes a specific PropertyChangeListener from the list of listeners which get notified when the properties (e.g. LOCAL_VIDEO_STREAMING) associated with a specific Call change their values.

Parameters:
call - the Call to stop listening to the changes of the property values of
listener - the PropertyChangeListener to no longer be notified when the properties associated with the specified Call change their values

createVideoCall

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

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

Call createVideoCall(String uri,
                     QualityPreset qualityPreferences)
                     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.
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

Call createVideoCall(Contact callee,
                     QualityPreset qualityPreferences)
                     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.
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

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

QualityControl getQualityControl(CallPeer peer)
Returns the quality control for video calls if any. It can be null if we were able to successfully determine that other party does not support it.

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.