-/* Header for class net_java_sip_communicator_impl_neomedia_directshow_DSManager */
-
-#ifndef _Included_net_java_sip_communicator_impl_neomedia_directshow_DSManager
-#define _Included_net_java_sip_communicator_impl_neomedia_directshow_DSManager
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: net_java_sip_communicator_impl_neomedia_directshow_DSManager
- * Method: init
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSManager_init
- (JNIEnv *, jclass);
-
-/*
- * Class: net_java_sip_communicator_impl_neomedia_directshow_DSManager
- * Method: destroy
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSManager_destroy
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: net_java_sip_communicator_impl_neomedia_directshow_DSManager
- * Method: getCaptureDevices
- * Signature: (J)[J
- */
-JNIEXPORT jlongArray JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSManager_getCaptureDevices
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/src/native/windows/directshow/qedit.h b/src/native/windows/directshow/qedit.h
deleted file mode 100644
index 5c4121176..000000000
--- a/src/native/windows/directshow/qedit.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* as qedit.h has been removed from recent Microsoft Platform SDK,
- * we add it here. This code comes from the following web page:
- * http://social.msdn.microsoft.com/Forums/en/windowsdirectshowdevelopment/thread/2ab5c212-5824-419d-b5d9-7f5db82f57cd
- */
-
-///////////////////////////////////////////////////////////////////////////////////
-
-#ifndef __qedit_h__
-#define __qedit_h__
-
-///////////////////////////////////////////////////////////////////////////////////
-
-#pragma once
-
-///////////////////////////////////////////////////////////////////////////////////
-
-interface
-ISampleGrabberCB
-:
- public IUnknown
-{
- virtual STDMETHODIMP SampleCB( double SampleTime, IMediaSample *pSample ) = 0;
- virtual STDMETHODIMP BufferCB( double SampleTime, BYTE *pBuffer, long BufferLen ) = 0;
-};
-
-///////////////////////////////////////////////////////////////////////////////////
-
-static
-const
-IID IID_ISampleGrabberCB = { 0x0579154A, 0x2B53, 0x4994, { 0xB0, 0xD0, 0xE7, 0x73, 0x14, 0x8E, 0xFF, 0x85 } };
-
-///////////////////////////////////////////////////////////////////////////////////
-
-interface
-ISampleGrabber
-:
- public IUnknown
-{
- virtual HRESULT STDMETHODCALLTYPE SetOneShot( BOOL OneShot ) = 0;
- virtual HRESULT STDMETHODCALLTYPE SetMediaType( const AM_MEDIA_TYPE *pType ) = 0;
- virtual HRESULT STDMETHODCALLTYPE GetConnectedMediaType( AM_MEDIA_TYPE *pType ) = 0;
- virtual HRESULT STDMETHODCALLTYPE SetBufferSamples( BOOL BufferThem ) = 0;
- virtual HRESULT STDMETHODCALLTYPE GetCurrentBuffer( long *pBufferSize, long *pBuffer ) = 0;
- virtual HRESULT STDMETHODCALLTYPE GetCurrentSample( IMediaSample **ppSample ) = 0;
- virtual HRESULT STDMETHODCALLTYPE SetCallback( ISampleGrabberCB *pCallback, long WhichMethodToCallback ) = 0;
-};
-
-///////////////////////////////////////////////////////////////////////////////////
-
-static
-const
-IID IID_ISampleGrabber = { 0x6B652FFF, 0x11FE, 0x4fce, { 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F } };
-
-///////////////////////////////////////////////////////////////////////////////////
-
-static
-const
-CLSID CLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
-
-///////////////////////////////////////////////////////////////////////////////////
-
-static
-const
-CLSID CLSID_NullRenderer = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
-
-///////////////////////////////////////////////////////////////////////////////////
-
-static
-const
-CLSID CLSID_VideoEffects1Category = { 0xcc7bfb42, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
-
-///////////////////////////////////////////////////////////////////////////////////
-
-static
-const
-CLSID CLSID_VideoEffects2Category = { 0xcc7bfb43, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
-
-///////////////////////////////////////////////////////////////////////////////////
-
-static
-const
-CLSID CLSID_AudioEffects1Category = { 0xcc7bfb44, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
-
-///////////////////////////////////////////////////////////////////////////////////
-
-static
-const
-CLSID CLSID_AudioEffects2Category = { 0xcc7bfb45, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
-
-///////////////////////////////////////////////////////////////////////////////////
-
-#endif
-
-///////////////////////////////////////////////////////////////////////////////////
-
diff --git a/src/native/windows/directshow/video_format.h b/src/native/windows/directshow/video_format.h
deleted file mode 100644
index 1842f95b5..000000000
--- a/src/native/windows/directshow/video_format.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-/**
- * \file video_format.h
- * \brief Useful structures and enumerations for video format.
- * \author Sebastien Vincent
- */
-
-#ifndef VIDEO_FORMAT_H
-#define VIDEO_FORMAT_H
-
-/**
- * \struct VideoFormat
- * \brief Information about video format
- */
-struct VideoFormat
-{
- size_t width; /**< Video width */
- size_t height; /**< Video height */
- unsigned long pixelFormat; /**< Pixel format */
- GUID mediaType; /**< Media type */
-};
-
-#endif /* VIDEO_FORMAT_H */
-
diff --git a/src/net/java/sip/communicator/impl/gui/main/GeneralDialPanel.java b/src/net/java/sip/communicator/impl/gui/main/GeneralDialPanel.java
index a58c71ef6..3b51beedb 100755
--- a/src/net/java/sip/communicator/impl/gui/main/GeneralDialPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/GeneralDialPanel.java
@@ -19,6 +19,7 @@
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.skin.*;
+import org.jitsi.service.resources.*;
import org.jitsi.util.*;
/**
@@ -27,12 +28,18 @@
*
* @author Yana Stamcheva
* @author Adam Netocny
+ * @author Lyubomir Marinov
*/
public class GeneralDialPanel
extends TransparentPanel
- implements MouseListener,
- Skinnable
+ implements MouseListener,
+ Skinnable
{
+ /**
+ * The parent dial pad dialog.
+ */
+ private final GeneralDialPadDialog dialPadDialog;
+
/**
* The dial panel.
*/
@@ -46,12 +53,7 @@ public class GeneralDialPanel
/**
* Handles DTMFs.
*/
- private DTMFHandler dtmfHandler;
-
- /**
- * The parent dial pad dialog.
- */
- private final GeneralDialPadDialog dialPadDialog;
+ private final DTMFHandler dtmfHandler;
/**
* Creates an instance of DialPanel for a specific call, by
@@ -69,20 +71,6 @@ public GeneralDialPanel(GeneralDialPadDialog dialPadDialog,
this.init();
}
- /**
- * Initializes this panel by adding all dial buttons to it.
- */
- public void init()
- {
- this.dialPadPanel.setOpaque(false);
-
- this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
-
- loadSkin();
-
- this.add(dialPadPanel, BorderLayout.CENTER);
- }
-
/**
* Creates DTMF button.
*
@@ -94,8 +82,8 @@ public void init()
private JButton createDialButton(Image bgImage, ImageID iconImage,
String name)
{
- JButton button =
- new SIPCommButton(bgImage, ImageLoader.getImage(iconImage));
+ JButton button
+ = new SIPCommButton(bgImage, ImageLoader.getImage(iconImage));
button.setAlignmentY(JButton.LEFT_ALIGNMENT);
button.setName(name);
@@ -105,31 +93,75 @@ private JButton createDialButton(Image bgImage, ImageID iconImage,
}
/**
- * Creates DTMF button.
+ * Initializes a new dial button which is to be used on Mac OS X.
*
- * @param bgImage
- * @param iconImage
+ * @param imageID
+ * @param rolloverImageID
* @param name
- * @return the created dial button
+ * @return the newly-initialized dial button
*/
private JButton createMacOSXDialButton( ImageID imageID,
ImageID rolloverImageID,
String name)
{
- JButton button = new SIPCommButton(
- ImageLoader.getImage(imageID),
- ImageLoader.getImage(rolloverImageID),
- ImageLoader.getImage(rolloverImageID),
- null,
- null,
- null);
+ JButton button
+ = new SIPCommButton(
+ ImageLoader.getImage(imageID),
+ ImageLoader.getImage(rolloverImageID),
+ ImageLoader.getImage(rolloverImageID),
+ null,
+ null,
+ null);
button.setName(name);
button.addMouseListener(this);
-
return button;
}
+ /**
+ * Initializes this panel by adding all dial buttons to it.
+ */
+ public void init()
+ {
+ this.dialPadPanel.setOpaque(false);
+
+ this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
+
+ loadSkin();
+
+ this.add(dialPadPanel, BorderLayout.CENTER);
+ }
+
+ /**
+ * Reloads dial buttons.
+ */
+ public void loadSkin()
+ {
+ dialPadPanel.removeAll();
+
+ Image bgImage = ImageLoader.getImage(ImageLoader.DIAL_BUTTON_BG);
+
+ for (DTMFHandler.DTMFToneInfo info : DTMFHandler.AVAILABLE_TONES)
+ {
+ // We only add buttons with images.
+ if (info.imageID == null)
+ continue;
+
+ JComponent c
+ = OSUtils.IS_MAC
+ ? createMacOSXDialButton(
+ info.macImageID,
+ info.macImageRolloverID,
+ info.tone.getValue())
+ : createDialButton(
+ bgImage,
+ info.imageID,
+ info.tone.getValue());
+
+ dialPadPanel.add(c);
+ }
+ }
+
public void mouseClicked(MouseEvent e) {}
public void mouseEntered(MouseEvent e) {}
@@ -164,83 +196,50 @@ public void mouseReleased(MouseEvent e)
*
* @param g the Graphics object used for painting
*/
+ @Override
public void paintComponent(Graphics g)
{
- // do the superclass behavior first
+ // do the superclass behavior first
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
- boolean isTextureBackground
- = Boolean.parseBoolean(GuiActivator.getResources()
- .getSettingsString("impl.gui.IS_CONTACT_LIST_TEXTURE_BG_ENABLED"));
-
BufferedImage bgImage
= ImageLoader.getImage(ImageLoader.MAIN_WINDOW_BACKGROUND);
// paint the image
if (bgImage != null)
{
+ ResourceManagementService r = GuiActivator.getResources();
+ boolean isTextureBackground
+ = Boolean.parseBoolean(
+ r.getSettingsString(
+ "impl.gui.IS_CONTACT_LIST_TEXTURE_BG_ENABLED"));
+ int width = getWidth();
+ int height = getHeight();
+
if (isTextureBackground)
{
Rectangle rect
= new Rectangle(0, 0,
bgImage.getWidth(null),
bgImage.getHeight(null));
-
TexturePaint texture = new TexturePaint(bgImage, rect);
g2.setPaint(texture);
-
- g2.fillRect(0, 0, this.getWidth(), this.getHeight());
+ g2.fillRect(0, 0, width, height);
}
else
{
- g.setColor(new Color(
- GuiActivator.getResources()
- .getColor("contactListBackground")));
-
- // paint the background with the choosen color
- g.fillRect(0, 0, getWidth(), getHeight());
-
- g2.drawImage(bgImage,
- this.getWidth() - bgImage.getWidth(),
- this.getHeight() - bgImage.getHeight(),
+ g.setColor(new Color(r.getColor("contactListBackground")));
+ // Paint the background with the chosen color.
+ g.fillRect(0, 0, width, height);
+ g2.drawImage(
+ bgImage,
+ width - bgImage.getWidth(),
+ height - bgImage.getHeight(),
this);
}
}
}
-
- /**
- * Reloads dial buttons.
- */
- public void loadSkin()
- {
- dialPadPanel.removeAll();
-
- Image bgImage = ImageLoader.getImage(ImageLoader.DIAL_BUTTON_BG);
- DTMFHandler.DTMFToneInfo[] availableTones = DTMFHandler.AVAILABLE_TONES;
-
- for (int i = 0; i < availableTones.length; i++)
- {
- DTMFHandler.DTMFToneInfo info = availableTones[i];
-
- // we add only buttons having image
- if(info.imageID == null)
- continue;
-
- JComponent c
- = OSUtils.IS_MAC
- ? createMacOSXDialButton(
- info.macImageID,
- info.macImageRolloverID,
- info.tone.getValue())
- : createDialButton(
- bgImage,
- info.imageID,
- info.tone.getValue());
-
- dialPadPanel.add(c);
- }
- }
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
index f28c6fa3c..334bb801f 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
@@ -1290,7 +1290,7 @@ private void initializeUserInterfaceHierarchy()
* buttons which accept a Call as an argument should be changed to take
* into account the whole CallConference.
*/
- Call aCall = this.callConference.getCalls().get(0);
+ Call aCall = callConference.getCalls().get(0);
chatButton
= new CallToolBarButton(
@@ -1351,6 +1351,7 @@ private void initializeUserInterfaceHierarchy()
false);
remoteLevel
= new OutputVolumeControlButton(
+ callConference,
ImageLoader.VOLUME_CONTROL_BUTTON,
false,
true)
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java
index a753b17db..120ee2efd 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java
@@ -361,7 +361,11 @@ private void createSoundLevelIndicators()
false,
false);
remoteLevel
- = new OutputVolumeControlButton(ImageLoader.HEADPHONE, false, false)
+ = new OutputVolumeControlButton(
+ call.getConference(),
+ ImageLoader.HEADPHONE,
+ false,
+ false)
.getComponent();
final SoundLevelIndicator localLevelIndicator
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/OutputVolumeControlButton.java b/src/net/java/sip/communicator/impl/gui/main/call/OutputVolumeControlButton.java
index 1da4869bd..9cf234e94 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/OutputVolumeControlButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/OutputVolumeControlButton.java
@@ -14,9 +14,12 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.plugin.desktoputil.*;
+import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.protocol.media.*;
import net.java.sip.communicator.service.resources.*;
import org.jitsi.service.neomedia.*;
+import org.jitsi.service.resources.*;
/**
* The VolumeControlButton is the button shown in the call window,
@@ -24,84 +27,49 @@
*
* @author Yana Stamcheva
* @author Damian Minkov
+ * @author Lyubomir Marinov
*/
public class OutputVolumeControlButton
{
/**
- * The background image.
+ * The CallConference (i.e. telephony conference-related state)
+ * depicted by this instance.
*/
- private ImageID bgImage;
+ private final CallConference callConference;
/**
- * The pressed image.
+ * The indicator which determines whether the user interface
+ * (representation) of this instance is (to be) displayed in full-screen
+ * mode.
*/
- private ImageID pressedImage;
+ private final boolean fullScreen;
/**
* The icon image.
*/
private ImageID iconImageID;
- /**
- * Indicates if we're in full screen mode.
- */
- private final boolean fullScreen;
-
- /**
- *
- */
private final boolean inButtonToolBar;
- /**
- * Creates not full screen button.
- */
- public OutputVolumeControlButton()
- {
- this(false);
- }
-
- /**
- * Creates volume control button.
- *
- * @param fullScreen is full screen.
- */
- public OutputVolumeControlButton(boolean fullScreen)
- {
- this(ImageLoader.VOLUME_CONTROL_BUTTON, fullScreen, true);
- }
-
/**
* Creates volume control button.
*
+ * @param callConference
* @param iconImageID the image.
* @param fullScreen is full screen.
* @param inButtonToolBar indicates if this button is shown in the button
* tool bar
*/
- public OutputVolumeControlButton(ImageID iconImageID,
- boolean fullScreen,
- boolean inButtonToolBar)
+ public OutputVolumeControlButton(
+ CallConference callConference,
+ ImageID iconImageID,
+ boolean fullScreen,
+ boolean inButtonToolBar)
{
+ this.callConference = callConference;
+ this.iconImageID = iconImageID;
this.fullScreen = fullScreen;
this.inButtonToolBar = inButtonToolBar;
-
- this.iconImageID = iconImageID;
- }
-
- /**
- * Returns the component associated with this output volume control button.
- *
- * @return the component associated with this output volume control button
- */
- public Component getComponent()
- {
- if (!fullScreen)
- return createVolumeControlButton(
- inButtonToolBar,
- iconImageID,
- "service.gui.VOLUME_CONTROL_TOOL_TIP");
- else
- return createSliderComponent();
}
/**
@@ -111,48 +79,48 @@ public Component getComponent()
*/
public Component createSliderComponent()
{
+ ResourceManagementService r = GuiActivator.getResources();
final Color bgColor
- = new Color(GuiActivator.getResources().getColor(
- "service.gui.CALL_TOOL_BAR_SOUND_BG"));
+ = new Color(r.getColor("service.gui.CALL_TOOL_BAR_SOUND_BG"));
@SuppressWarnings("serial")
- TransparentPanel soundPanel = new TransparentPanel(
- new FlowLayout(FlowLayout.LEFT, 0, 0))
- {
- public void paintComponent(Graphics g)
+ TransparentPanel soundPanel
+ = new TransparentPanel(new FlowLayout(FlowLayout.LEFT, 0, 0))
{
- super.paintComponent(g);
-
- g = g.create();
-
- AntialiasingManager.activateAntialiasing(g);
-
- try
+ @Override
+ public void paintComponent(Graphics g)
{
- g.setColor(bgColor);
-
- g.fillRoundRect(0, 0, getWidth()-1, getHeight()-1, 8, 8);
- }
- finally
- {
- g.dispose();
+ super.paintComponent(g);
+
+ g = g.create();
+ try
+ {
+ AntialiasingManager.activateAntialiasing(g);
+
+ g.setColor(bgColor);
+ g.fillRoundRect(
+ 0, 0, getWidth() - 1, getHeight() - 1,
+ 8, 8);
+ }
+ finally
+ {
+ g.dispose();
+ }
}
- }
- };
+ };
soundPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
- final VolumeControl volumeControl
- = GuiActivator.getMediaService().getOutputVolumeControl();
+ VolumeControl volumeControl = getOutputVolumeControl();
// Creates the menu that would contain the volume control component.
VolumeControlSlider slider
= new VolumeControlSlider(volumeControl, JSlider.HORIZONTAL);
- soundPanel.add(new JLabel(GuiActivator.getResources()
- .getImage("service.gui.icons.NO_SOUND_ICON")));
+ soundPanel.add(
+ new JLabel(r.getImage("service.gui.icons.NO_SOUND_ICON")));
soundPanel.add(slider);
- soundPanel.add(new JLabel(GuiActivator.getResources()
- .getImage("service.gui.icons.SOUND_MENU_ICON")));
+ soundPanel.add(
+ new JLabel(r.getImage("service.gui.icons.SOUND_MENU_ICON")));
return soundPanel;
}
@@ -180,9 +148,7 @@ public Component createVolumeControlButton( boolean isButtonBar,
GuiActivator.getResources().getI18NString(toolTipTextKey));
}
- final VolumeControl volumeControl
- = GuiActivator.getMediaService().getOutputVolumeControl();
-
+ VolumeControl volumeControl = getOutputVolumeControl();
// Creates the menu that would contain the volume control component.
final JPopupMenu sliderMenu
= new VolumeControlSlider(volumeControl, JSlider.VERTICAL)
@@ -190,26 +156,71 @@ public Component createVolumeControlButton( boolean isButtonBar,
sliderMenu.setInvoker(volumeControlButton);
- volumeControlButton.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent arg0)
- {
- Point location = new Point(
- volumeControlButton.getX(),
- volumeControlButton.getY()
- + volumeControlButton.getHeight());
+ volumeControlButton.addActionListener(
+ new ActionListener()
+ {
+ public void actionPerformed(ActionEvent ev)
+ {
+ Point location
+ = new Point(
+ volumeControlButton.getX(),
+ volumeControlButton.getY()
+ + volumeControlButton.getHeight());
+
+ SwingUtilities.convertPointToScreen(
+ location,
+ volumeControlButton.getParent());
+
+ sliderMenu.setLocation(location);
+ sliderMenu.setVisible(!sliderMenu.isVisible());
+ }
+ });
- SwingUtilities.convertPointToScreen(
- location,
- volumeControlButton.getParent());
+ return volumeControlButton;
+ }
- sliderMenu.setLocation(location);
+ /**
+ * Returns the component associated with this output volume control button.
+ *
+ * @return the component associated with this output volume control button
+ */
+ public Component getComponent()
+ {
+ if (fullScreen)
+ return createSliderComponent();
+ else
+ {
+ return
+ createVolumeControlButton(
+ inButtonToolBar,
+ iconImageID,
+ "service.gui.VOLUME_CONTROL_TOOL_TIP");
+ }
+ }
- sliderMenu.setVisible(!sliderMenu.isVisible());
- }
- });
+ /**
+ * Gets the VolumeControl instance (to be) depicted by this
+ * instance.
+ *
+ * @return the VolumeControl instance (to be) depicted by this
+ * instance
+ */
+ private VolumeControl getOutputVolumeControl()
+ {
+ VolumeControl volumeControl = null;
- return volumeControlButton;
+ if (callConference instanceof MediaAwareCallConference)
+ {
+ volumeControl
+ = ((MediaAwareCallConference) callConference)
+ .getOutputVolumeControl();
+ }
+ if (volumeControl == null)
+ {
+ volumeControl
+ = GuiActivator.getMediaService().getOutputVolumeControl();
+ }
+ return volumeControl;
}
/**
@@ -219,6 +230,16 @@ public void actionPerformed(ActionEvent arg0)
private class VolumeControlButton
extends SIPCommButton
{
+ /**
+ * The background image.
+ */
+ private ImageID bgImage;
+
+ /**
+ * The pressed image.
+ */
+ private ImageID pressedImage;
+
public VolumeControlButton(boolean inSettingsPanel)
{
super(
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
index 2fe14387d..50eea0dc4 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
@@ -15,7 +15,6 @@
import javax.swing.event.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.contactlist.addgroup.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.plugin.desktoputil.*;
diff --git a/src/net/java/sip/communicator/impl/protocol/dict/ContactDictImpl.java b/src/net/java/sip/communicator/impl/protocol/dict/ContactDictImpl.java
index 5ec55a910..6e48b14d3 100644
--- a/src/net/java/sip/communicator/impl/protocol/dict/ContactDictImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/dict/ContactDictImpl.java
@@ -6,8 +6,6 @@
*/
package net.java.sip.communicator.impl.protocol.dict;
-import java.util.*;
-
import net.java.dict4j.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/ContactGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/ContactGibberishImpl.java
index 0dca03bd3..8bae28c03 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/ContactGibberishImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/ContactGibberishImpl.java
@@ -6,8 +6,6 @@
*/
package net.java.sip.communicator.impl.protocol.gibberish;
-import java.util.*;
-
import net.java.sip.communicator.service.protocol.*;
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/ContactRssImpl.java b/src/net/java/sip/communicator/impl/protocol/rss/ContactRssImpl.java
index fc727fb61..8ff4f4eac 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/ContactRssImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/ContactRssImpl.java
@@ -8,7 +8,6 @@
import java.io.*;
import java.net.*;
-import java.util.*;
import net.java.sip.communicator.service.protocol.*;
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/ContactZeroconfImpl.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/ContactZeroconfImpl.java
index 8c0e8d33c..2390f463f 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/ContactZeroconfImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/ContactZeroconfImpl.java
@@ -7,7 +7,6 @@
package net.java.sip.communicator.impl.protocol.zeroconf;
import java.net.*;
-import java.util.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
diff --git a/src/net/java/sip/communicator/service/gui/AuthenticationWindowService.java b/src/net/java/sip/communicator/service/gui/AuthenticationWindowService.java
index f134444e3..71dc7befb 100644
--- a/src/net/java/sip/communicator/service/gui/AuthenticationWindowService.java
+++ b/src/net/java/sip/communicator/service/gui/AuthenticationWindowService.java
@@ -6,7 +6,6 @@
*/
package net.java.sip.communicator.service.gui;
-import javax.swing.*;
/**
* Creates and show authentication window, normally to fill in username and
diff --git a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java
index c89d2253f..6d0369e0a 100644
--- a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java
+++ b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java
@@ -50,6 +50,15 @@ public class MediaAwareCallConference
*/
private final MediaDevice[] mixers;
+ /**
+ * The VolumeControl implementation which is to control the volume
+ * (level) of the audio played back the telephony conference represented by
+ * this instance.
+ */
+ private final VolumeControl outputVolumeControl
+ = new BasicVolumeControl(
+ VolumeControl.PLAYBACK_VOLUME_LEVEL_PROPERTY_NAME);
+
/**
* The PropertyChangeListener which listens to sources of
* PropertyChangeEvents on behalf of this instance.
@@ -188,7 +197,7 @@ protected void callRemoved(Call call)
{
super.callRemoved(call);
- if (getCallCount() == 0 && videoRTPTranslator != null)
+ if (getCallCount() == 0 && (videoRTPTranslator != null))
{
videoRTPTranslator.dispose();
videoRTPTranslator = null;
@@ -265,6 +274,20 @@ public MediaDevice getDefaultDevice(
return device;
}
+ /**
+ * Gets the VolumeControl which controls the volume (level) of the
+ * audio played back in the telephony conference represented by this
+ * instance.
+ *
+ * @return the VolumeControl which controls the volume (level) of
+ * the audio played back in the telephony conference represented by this
+ * instance
+ */
+ public VolumeControl getOutputVolumeControl()
+ {
+ return outputVolumeControl;
+ }
+
/**
* Gets the RTPTranslator which forwards RTP and RTCP traffic
* between the CallPeers of the Calls participating in
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 1ab2f3f96..62ecfa67f 100644
--- a/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java
+++ b/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java
@@ -658,7 +658,7 @@ protected MediaStream configureStream(
stream.setDirection(direction);
stream.setFormat(format);
- MediaAwareCall, ?, ?> call = callPeerMediaHandler.getPeer().getCall();
+ MediaAwareCall,?,?> call = callPeerMediaHandler.getPeer().getCall();
MediaType mediaType
= (stream instanceof AudioMediaStream)
? MediaType.AUDIO
@@ -669,7 +669,16 @@ protected MediaStream configureStream(
switch (mediaType)
{
case AUDIO:
- setAudioStream((AudioMediaStream) stream);
+ AudioMediaStream audioStream = (AudioMediaStream) stream;
+
+ /*
+ * The volume (level) of the audio played back in calls should be
+ * call-specific i.e. it should be able to change the volume (level)
+ * of a call without affecting any other simultaneous calls.
+ */
+ setOutputVolumeControl(audioStream, call);
+
+ setAudioStream(audioStream);
break;
case VIDEO:
@@ -1327,6 +1336,43 @@ private void setLocalSSRC(MediaType mediaType, long localSSRC)
}
}
+ /**
+ * Sets the VolumeControl which is to control the volume (level) of
+ * the audio received in/by a specific AudioMediaStream and played
+ * back in order to achieve call-specific volume (level).
+ *
+ * Note: The implementation makes the volume (level) telephony
+ * conference-specific.
+ *
+ *
+ * @param audioStream the AudioMediaStream on which a
+ * VolumeControl from the specified call is to be set
+ * @param call the MediaAwareCall which provides the
+ * VolumeControl to be set on the specified audioStream
+ */
+ private void setOutputVolumeControl(
+ AudioMediaStream audioStream,
+ MediaAwareCall,?,?> call)
+ {
+ /*
+ * The volume (level) of the audio played back in calls should be
+ * call-specific i.e. it should be able to change the volume (level) of
+ * a call without affecting any other simultaneous calls. The
+ * implementation makes the volume (level) telephony
+ * conference-specific.
+ */
+ MediaAwareCallConference conference = call.getConference();
+
+ if (conference != null)
+ {
+ VolumeControl outputVolumeControl
+ = conference.getOutputVolumeControl();
+
+ if (outputVolumeControl != null)
+ audioStream.setOutputVolumeControl(outputVolumeControl);
+ }
+ }
+
/**
* Sets the last-known remote SSRC of the MediaStream of a specific
* MediaType.