diff options
4 files changed, 26 insertions, 5 deletions
diff --git a/src/net/java/sip/communicator/impl/neomedia/device/AbstractMediaDevice.java b/src/net/java/sip/communicator/impl/neomedia/device/AbstractMediaDevice.java index 6d1a876..f43e365 100644 --- a/src/net/java/sip/communicator/impl/neomedia/device/AbstractMediaDevice.java +++ b/src/net/java/sip/communicator/impl/neomedia/device/AbstractMediaDevice.java @@ -24,6 +24,10 @@ import net.java.sip.communicator.service.neomedia.device.*; public abstract class AbstractMediaDevice implements MediaDevice { + /** + * The <tt>MediaDeviceSession</tt> used. + */ + private MediaDeviceSession session = null; /** * Creates a <tt>DataSource</tt> instance for this <tt>MediaDevice</tt> @@ -46,13 +50,25 @@ public abstract class AbstractMediaDevice switch (getMediaType()) { case VIDEO: - return new VideoMediaDeviceSession(this); + session = new VideoMediaDeviceSession(this); + return session; default: - return new AudioMediaDeviceSession(this); + session = new AudioMediaDeviceSession(this); + return session; } } /** + * Get the last used <tt>MediaDeviceSession</tt>. + * + * @return <tt>MediaDeviceSession</tt> + */ + public MediaDeviceSession getSession() + { + return session; + } + + /** * Connects to a specific <tt>CaptureDevice</tt> given in the form of a * <tt>DataSource</tt>. Explicitly defined in order to allow extenders to * customize the connect procedure. diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopSharingServerJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopSharingServerJabberImpl.java index 694fb7a..8084601 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopSharingServerJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopSharingServerJabberImpl.java @@ -286,7 +286,7 @@ public class OperationSetDesktopSharingServerJabberImpl throws OperationFailedException { ((CallJabberImpl)call).setLocalInputEvtAware(allowed); - super.setLocalVideoAllowed(call, allowed); + super.setLocalVideoAllowed(call, mediaDevice, allowed); } /** 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 625162a..5fd97d7 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopStreamingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopStreamingJabberImpl.java @@ -183,9 +183,11 @@ public class OperationSetDesktopStreamingJabberImpl boolean allowed) throws OperationFailedException { + ((CallJabberImpl)call).setLocalVideoAllowed(allowed, + MediaUseCase.DESKTOP); ((CallJabberImpl)call).setVideoDevice(mediaDevice); size = ((VideoMediaFormat)mediaDevice.getFormat()).getSize(); - super.setLocalVideoAllowed(call, allowed); + ((CallJabberImpl)call).modifyVideoContent(allowed); } /** 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 e55699f..e55d07a 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopStreamingSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopStreamingSipImpl.java @@ -231,9 +231,12 @@ public class OperationSetDesktopStreamingSipImpl throws OperationFailedException { ((CallSipImpl)call).setVideoDevice(mediaDevice); + ((CallSipImpl)call).setLocalVideoAllowed(allowed, MediaUseCase.DESKTOP); size = (((VideoMediaFormat)((CallSipImpl)call). getDefaultDevice(MediaType.VIDEO). getFormat()).getSize()); - super.setLocalVideoAllowed(call, allowed); + + /* reinvite all peers */ + ((CallSipImpl)call).reInvite(); } } |