diff options
author | Damian Minkov <damencho@jitsi.org> | 2011-06-03 10:36:19 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2011-06-03 10:36:19 +0000 |
commit | 6064f8d33cabe5b9fa5aa9f26f48c15091004ee5 (patch) | |
tree | 4f672d66c69002c2453524bb5a1fabb3a73b33e1 /src/net/java/sip/communicator/service/protocol | |
parent | 754f0397d2cca565f498dc15328e32743c11f22b (diff) | |
download | jitsi-6064f8d33cabe5b9fa5aa9f26f48c15091004ee5.zip jitsi-6064f8d33cabe5b9fa5aa9f26f48c15091004ee5.tar.gz jitsi-6064f8d33cabe5b9fa5aa9f26f48c15091004ee5.tar.bz2 |
Initial video size setting, when creating video call.
Hide resize button if we can detect that its not supported, and limit the resolutions we have for setting according the remote party settings.
Fix changing resolution several times. Fix duplicate field for keeping framerate.
Diffstat (limited to 'src/net/java/sip/communicator/service/protocol')
3 files changed, 107 insertions, 33 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java index 08488b1..cc5a988 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java @@ -216,6 +216,49 @@ public interface OperationSetVideoTelephony throws OperationFailedException; /** + * Create a new video call and invite the specified CallPeer to it. + * + * @param uri the address of the callee that we should invite to a new + * call. + * @param 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. + * @return 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. + * @throws ParseException if <tt>callee</tt> is not a valid sip address + * string. + */ + public Call createVideoCall(String uri, QualityPresets qualityPreferences) + throws OperationFailedException, ParseException; + + /** + * Create a new video call and invite the specified CallPeer to it. + * + * @param callee the address of the callee that we should invite to a new + * call. + * @param 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. + * @return 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. + */ + public Call createVideoCall(Contact callee, + QualityPresets qualityPreferences) + throws OperationFailedException; + + /** * Indicates a user request to answer an incoming call with video enabled * from the specified CallPeer. * @param peer the call peer that we'd like to answer. @@ -226,15 +269,10 @@ public interface OperationSetVideoTelephony throws OperationFailedException; /** - * Changes the current video settings for the peer with the desired - * quality settings and inform the peer to stream the video - * with those settings. - * - * @param peer the peer that is sending us the video - * @param preset the desired video settings - * @throws OperationFailedException + * 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. + * @param peer the peer which this control operates on. + * @return the implemented quality control. */ - public void setQualityPreset(CallPeer peer, - QualityPreset preset) - throws OperationFailedException; + public QualityControls getQualityControls(CallPeer peer); } diff --git a/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetVideoTelephony.java b/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetVideoTelephony.java index f2693fb..593aae0 100644 --- a/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetVideoTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetVideoTelephony.java @@ -8,6 +8,7 @@ package net.java.sip.communicator.service.protocol.media; import java.awt.*; import java.beans.*; +import java.text.*; import net.java.sip.communicator.service.neomedia.*; import net.java.sip.communicator.service.protocol.*; @@ -260,18 +261,67 @@ public abstract class AbstractOperationSetVideoTelephony< } /** - * Changes the current video settings for the peer with the desired - * quality settings and inform the peer to stream the video - * with those settings. + * Returns the quality control for video calls if any. + * Return null so protocols who supports it to override it. + * @param peer the peer which this control operates on. + * @return the implemented quality control. + */ + public QualityControls getQualityControls(CallPeer peer) + { + return null; + } + + /** + * Create a new video call and invite the specified CallPeer to it with + * initial video setting. * - * @param peer the peer that is sending us the video - * @param preset the desired video settings - * @throws OperationFailedException + * @param uri the address of the callee that we should invite to a new + * call. + * @param 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. + * @return 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. + * @throws java.text.ParseException if <tt>callee</tt> is not a valid sip address + * string. */ - public void setQualityPreset(CallPeer peer, - QualityPreset preset) + public Call createVideoCall(String uri, QualityPresets qualityPreferences) + throws OperationFailedException, + ParseException + { + return createVideoCall(uri); + } + + /** + * Create a new video call and invite the specified CallPeer to it with + * initial video setting. + * + * @param callee the address of the callee that we should invite to a new + * call. + * @param 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. + * @return 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. + */ + public Call createVideoCall(Contact callee, + QualityPresets qualityPreferences) throws OperationFailedException - {} + { + return createVideoCall(callee); + } /** * Represents a <tt>VideoListener</tt> which forwards notifications to a diff --git a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java index 9b64120..65287a8 100644 --- a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java +++ b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java @@ -204,11 +204,6 @@ public abstract class CallPeerMediaHandler< = new LinkedList<VideoListener>(); /** - * The currently used video quality preset. - */ - protected QualityPreset videoQualityPreset = null; - - /** * The <tt>PropertyChangeListener</tt> which listens to changes in the * values of the properties of {@link #audioStream} and * {@link #videoStream}. @@ -1612,15 +1607,6 @@ public abstract class CallPeerMediaHandler< } /** - * Changes video quality preset. - * @param preset the preset to use. - */ - public void setVideoQualityPreset(QualityPreset preset) - { - this.videoQualityPreset = preset; - } - - /** * Lets the underlying implementation take note of this error and only * then throws it to the using bundles. * |