diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2015-08-23 14:31:22 +0200 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2015-08-23 15:03:52 +0200 |
commit | f1115f77541a6fb816b62163295259e07d9c9202 (patch) | |
tree | 06e4bba6b3b168056843a427b0880de015cedf06 /src/net/java | |
parent | 14f27d93dc99490b55a885a69e3f726ec8424d42 (diff) | |
download | jitsi-f1115f77541a6fb816b62163295259e07d9c9202.zip jitsi-f1115f77541a6fb816b62163295259e07d9c9202.tar.gz jitsi-f1115f77541a6fb816b62163295259e07d9c9202.tar.bz2 |
Use MediaException for QualityControl error handling
Corresponds to jitsi/libjitsi@2c3ff65bbd2060c53de0af8ffff62ddca1c25324
Diffstat (limited to 'src/net/java')
5 files changed, 9 insertions, 39 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java index 83792e1..2ffd2d6 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java @@ -2112,7 +2112,7 @@ public class CallManager qualityControl.setPreferredRemoteSendMaxPreset( qualityPreset); } - catch(org.jitsi.service.protocol.OperationFailedException e) + catch(Exception e) { logger.info("Unable to change video quality.", e); diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/QualityControlWrapper.java b/src/net/java/sip/communicator/impl/protocol/jabber/QualityControlWrapper.java index 1591d70..323ea13 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/QualityControlWrapper.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/QualityControlWrapper.java @@ -18,10 +18,8 @@ package net.java.sip.communicator.impl.protocol.jabber; import net.java.sip.communicator.service.protocol.media.*; -import net.java.sip.communicator.util.*; import org.jitsi.service.neomedia.*; -import org.jitsi.service.protocol.*; /** * A wrapper of media quality control. @@ -33,12 +31,6 @@ public class QualityControlWrapper extends AbstractQualityControlWrapper<CallPeerJabberImpl> { /** - * Our class logger. - */ - private static final Logger logger - = Logger.getLogger(QualityControlWrapper.class); - - /** * Creates quality control for peer. * @param peer peer */ @@ -53,35 +45,17 @@ public class QualityControlWrapper * with those settings. * * @param preset the desired video settings - * @throws OperationFailedException */ @Override public void setPreferredRemoteSendMaxPreset(QualityPreset preset) - throws OperationFailedException { QualityControl qControls = getMediaQualityControl(); if(qControls != null) { qControls.setRemoteSendMaxPreset(preset); - - try - { - // re-invites the peer with the new settings - peer.sendModifyVideoResolutionContent(); - } - catch (Throwable cause) - { - String message - = "Failed to re-invite for video quality change."; - - logger.error(message, cause); - - throw new OperationFailedException( - message, - OperationFailedException.INTERNAL_ERROR, - cause); - } + // re-invites the peer with the new settings + peer.sendModifyVideoResolutionContent(); } } } diff --git a/src/net/java/sip/communicator/impl/protocol/sip/QualityControlWrapper.java b/src/net/java/sip/communicator/impl/protocol/sip/QualityControlWrapper.java index ca60d34..92d8786 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/QualityControlWrapper.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/QualityControlWrapper.java @@ -21,7 +21,6 @@ import net.java.sip.communicator.service.protocol.media.*; import net.java.sip.communicator.util.*; import org.jitsi.service.neomedia.*; -import org.jitsi.service.protocol.*; /** * A wrapper of media quality control. @@ -51,18 +50,17 @@ public class QualityControlWrapper * with those settings. * * @param preset the desired video settings - * @throws OperationFailedException + * @throws MediaException when the re-invite fails */ @Override public void setPreferredRemoteSendMaxPreset(QualityPreset preset) - throws OperationFailedException + throws MediaException { QualityControl qControls = getMediaQualityControl(); if(qControls != null) { qControls.setRemoteSendMaxPreset(preset); - try { // re-invites the peer with the new settings @@ -75,9 +73,9 @@ public class QualityControlWrapper logger.error(message, cause); - throw new OperationFailedException( + throw new MediaException( message, - OperationFailedException.INTERNAL_ERROR, + MediaException.GENERAL_ERROR, cause); } } diff --git a/src/net/java/sip/communicator/service/protocol/media/AbstractQualityControlWrapper.java b/src/net/java/sip/communicator/service/protocol/media/AbstractQualityControlWrapper.java index da5adc4..9f070eb 100644 --- a/src/net/java/sip/communicator/service/protocol/media/AbstractQualityControlWrapper.java +++ b/src/net/java/sip/communicator/service/protocol/media/AbstractQualityControlWrapper.java @@ -18,7 +18,6 @@ package net.java.sip.communicator.service.protocol.media; import org.jitsi.service.neomedia.*; -import org.jitsi.service.protocol.*; /** * A wrapper of media quality control. @@ -153,8 +152,8 @@ public abstract class AbstractQualityControlWrapper< * with those settings. * * @param preset the desired video settings - * @throws OperationFailedException + * @throws MediaException */ public abstract void setPreferredRemoteSendMaxPreset(QualityPreset preset) - throws OperationFailedException; + throws MediaException; } diff --git a/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java b/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java index 1d5aa2f..7ceed29 100644 --- a/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java +++ b/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java @@ -32,7 +32,6 @@ import org.jitsi.service.neomedia.control.*; import org.jitsi.service.neomedia.device.*; import org.jitsi.service.neomedia.event.*; import org.jitsi.service.neomedia.format.*; -import org.jitsi.service.protocol.*; import org.jitsi.util.event.*; /** |