|
|
|
|
@ -93,9 +93,10 @@ public class CallPeerMediaHandler
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Determines whether or not streaming local video is currently enabled.
|
|
|
|
|
* Default is inactive so that default calls would be audio only.
|
|
|
|
|
*/
|
|
|
|
|
private MediaDirection videoDirectionUserPreference
|
|
|
|
|
= MediaDirection.RECVONLY;
|
|
|
|
|
= MediaDirection.INACTIVE;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Determines whether or not streaming local audio is currently enabled.
|
|
|
|
|
@ -372,10 +373,10 @@ public void setLocalVideoTransmissionEnabled(boolean enabled)
|
|
|
|
|
|
|
|
|
|
videoDirectionUserPreference
|
|
|
|
|
= enabled ? MediaDirection.SENDRECV : MediaDirection.RECVONLY;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newValue = videoDirectionUserPreference;
|
|
|
|
|
|
|
|
|
|
firePropertyChange(OperationSetVideoTelephony.LOCAL_VIDEO_STREAMING,
|
|
|
|
|
firePropertyChange(OperationSetVideoTelephony.LOCAL_VIDEO_STREAMING,
|
|
|
|
|
oldValue, newValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -825,7 +826,7 @@ private MediaStream initStream(StreamConnector connector,
|
|
|
|
|
throws OperationFailedException
|
|
|
|
|
{
|
|
|
|
|
MediaStream stream = null;
|
|
|
|
|
Dimension size = null;
|
|
|
|
|
Dimension size = null;
|
|
|
|
|
|
|
|
|
|
if (device.getMediaType() == MediaType.AUDIO)
|
|
|
|
|
stream = this.audioStream;
|
|
|
|
|
@ -838,9 +839,9 @@ private MediaStream initStream(StreamConnector connector,
|
|
|
|
|
Dimension deviceSize = ((VideoMediaFormat)device.getFormat())
|
|
|
|
|
.getSize();
|
|
|
|
|
|
|
|
|
|
if((deviceSize != null && maxRecvSize != null) &&
|
|
|
|
|
if((deviceSize != null && maxRecvSize != null) &&
|
|
|
|
|
(maxRecvSize.width > 0 && maxRecvSize.height > 0) &&
|
|
|
|
|
(deviceSize.width > maxRecvSize.width ||
|
|
|
|
|
(deviceSize.width > maxRecvSize.width ||
|
|
|
|
|
deviceSize.height > maxRecvSize.height))
|
|
|
|
|
{
|
|
|
|
|
size = maxRecvSize;
|
|
|
|
|
@ -1334,14 +1335,13 @@ private static VideoEvent neomedia2protocol(
|
|
|
|
|
neomediaEvent,
|
|
|
|
|
Object sender)
|
|
|
|
|
{
|
|
|
|
|
if (neomediaEvent
|
|
|
|
|
instanceof
|
|
|
|
|
net.java.sip.communicator.service.neomedia.event.SizeChangeVideoEvent)
|
|
|
|
|
if (neomediaEvent instanceof net.java.sip.communicator.service
|
|
|
|
|
.neomedia.event.SizeChangeVideoEvent)
|
|
|
|
|
{
|
|
|
|
|
net.java.sip.communicator.service.neomedia.event.SizeChangeVideoEvent
|
|
|
|
|
neomediaSizeChangeEvent
|
|
|
|
|
= (net.java.sip.communicator.service.neomedia.event.SizeChangeVideoEvent)
|
|
|
|
|
neomediaEvent;
|
|
|
|
|
= (net.java.sip.communicator.service.neomedia.event
|
|
|
|
|
.SizeChangeVideoEvent)neomediaEvent;
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
new SizeChangeVideoEvent(
|
|
|
|
|
@ -1406,7 +1406,7 @@ private void processAnswer(SessionDescription answer)
|
|
|
|
|
{
|
|
|
|
|
closeStream(mediaType);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<MediaFormat> supportedFormats = SdpUtils.extractFormats(
|
|
|
|
|
mediaDescription, dynamicPayloadTypes);
|
|
|
|
|
|
|
|
|
|
@ -1444,7 +1444,7 @@ private void processAnswer(SessionDescription answer)
|
|
|
|
|
if(res != null)
|
|
|
|
|
{
|
|
|
|
|
maxSendSize = res[0];
|
|
|
|
|
maxRecvSize = res[1];
|
|
|
|
|
maxRecvSize = res[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// create the corresponding stream...
|
|
|
|
|
@ -1496,7 +1496,7 @@ private MediaDescription createMediaDescription(
|
|
|
|
|
throws OperationFailedException
|
|
|
|
|
{
|
|
|
|
|
return SdpUtils.createMediaDescription(
|
|
|
|
|
captureFormat, formats, connector,
|
|
|
|
|
captureFormat, formats, connector,
|
|
|
|
|
direction, extensions,
|
|
|
|
|
dynamicPayloadTypes, rtpExtensionsRegistry);
|
|
|
|
|
}
|
|
|
|
|
@ -2046,15 +2046,16 @@ public void fireVideoEvent(VideoEvent event)
|
|
|
|
|
*/
|
|
|
|
|
public Component createLocalVisualComponent()
|
|
|
|
|
{
|
|
|
|
|
return (videoStream == null || !isLocalVideoTransmissionEnabled()) ? null : videoStream.createLocalVisualComponent();
|
|
|
|
|
return (videoStream == null || !isLocalVideoTransmissionEnabled())
|
|
|
|
|
? null : videoStream.createLocalVisualComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Dispose local visual <tt>Component</tt> of the local peer.
|
|
|
|
|
*/
|
|
|
|
|
public void disposeLocalVisualComponent()
|
|
|
|
|
{
|
|
|
|
|
if(videoStream != null)
|
|
|
|
|
if(videoStream != null)
|
|
|
|
|
{
|
|
|
|
|
videoStream.disposeLocalVisualComponent();
|
|
|
|
|
}
|
|
|
|
|
|