diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopStreamingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopStreamingJabberImpl.java index 5090768b5..fb2c19655 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopStreamingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopStreamingJabberImpl.java @@ -88,6 +88,27 @@ public Call createVideoCall(Contact callee, MediaDevice mediaDevice) return this.createOutgoingVideoCall(callee.getAddress(), mediaDevice); } + /** + * 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. + * + * @param call the call where we'd like to allow sending local video. + * @param allowed true if local video transmission is allowed and + * false otherwise. + * + * @throws OperationFailedException if video initialization fails. + */ + @Override + public void setLocalVideoAllowed(Call call, boolean allowed) + throws OperationFailedException + { + ((CallJabberImpl)call).setLocalVideoAllowed(allowed, + MediaUseCase.DESKTOP); + ((CallJabberImpl)call).modifyVideoContent(allowed); + } + /** * Sets the indicator which determines whether the streaming of local video * in a specific Call is allowed. The setting does not reflect diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopStreamingSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopStreamingSipImpl.java index 2b068d5c7..d2ec8eaf1 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopStreamingSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopStreamingSipImpl.java @@ -112,6 +112,28 @@ public Call createVideoCall(Contact callee, MediaDevice mediaDevice) return call; } + /** + * 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. + * + * @param call the call where we'd like to allow sending local video. + * @param allowed true if local video transmission is allowed and + * false otherwise. + * + * @throws OperationFailedException if video initialization fails. + */ + @Override + public void setLocalVideoAllowed(Call call, boolean allowed) + throws OperationFailedException + { + ((CallSipImpl)call).setLocalVideoAllowed(allowed, MediaUseCase.DESKTOP); + + /* reinvite all peers */ + ((CallSipImpl)call).reInvite(); + } + /** * Sets the indicator which determines whether the streaming of local video * in a specific Call is allowed. The setting does not reflect