Restores black background in video calls (which got recently broken/removed).

cusax-fix
Lyubomir Marinov 13 years ago
parent acca18280a
commit 5cd26f3ec9

@ -15,7 +15,6 @@
import javax.swing.text.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.call.conference.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
@ -1376,26 +1375,6 @@ private void updateViewFromModelInEventDispatchThread()
this.remoteVideo = remoteVideo;
}
}
/*
* If video is depicted, it will usually look better when it is
* displayed on a black background.
*/
if (VideoConferenceCallPanel.VIDEO_CONTAINER_BACKGROUND != null)
{
if ((this.localVideo == null) && (this.remoteVideo == null))
{
center.setBackground(
VideoConferenceCallPanel
.VIDEO_CONTAINER_BACKGROUND);
center.setOpaque(true);
}
else
{
center.setBackground(null);
center.setOpaque(false);
}
}
}
}
}

@ -48,13 +48,6 @@ public class VideoConferenceCallPanel
*/
private static final boolean SHOW_TOOLBARS = true;
/**
* The default <tt>Color</tt> to be set as the background of
* <tt>VideoContainer</tt>. For example, video usually looks better when
* displayed on a black background.
*/
public static final Color VIDEO_CONTAINER_BACKGROUND = Color.BLACK;
/**
* The facility which aids this instance with the video-related information.
*/
@ -256,13 +249,6 @@ public void paintComponent(Graphics g)
private VideoContainer createVideoContainer()
{
VideoContainer videoContainer = new VideoContainer(null, true);
if (VIDEO_CONTAINER_BACKGROUND != null)
{
videoContainer.setBackground(VIDEO_CONTAINER_BACKGROUND);
videoContainer.setOpaque(true);
}
GridBagConstraints videoContainerGridBagConstraints
= new GridBagConstraints();
@ -616,35 +602,33 @@ protected ConferenceCallPeerRenderer updateViewFromModel(
OperationSetVideoTelephony videoTelephony
= aCall.getProtocolProvider().getOperationSet(
OperationSetVideoTelephony.class);
boolean localVideoIsVisible
= (videoTelephony != null)
&& uiVideoHandler.isLocalVideoVisible();
while (callPeerIter.hasNext())
{
callPeer = callPeerIter.next();
/*
* If there is no videoTelephony, no local video will be
* available and we will represent the local peer/user with
* the Call of the first CallPeer.
*/
if (videoTelephony == null)
break;
try
if (localVideoIsVisible)
{
video
= videoTelephony.getLocalVisualComponent(callPeer);
}
catch (OperationFailedException ofe)
{
logger.error(
"Failed to retrieve the local video"
+ " for display",
ofe);
try
{
video
= videoTelephony.getLocalVisualComponent(
callPeer);
}
catch (OperationFailedException ofe)
{
logger.error(
"Failed to retrieve the local video"
+ " for display",
ofe);
}
if (video != null)
break;
}
if (video != null)
break;
}
if (video != null)
break;
}

Loading…
Cancel
Save