Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.media
Class AbstractQualityControlWrapper<T extends MediaAwareCallPeer<?,?,?>>

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.media.AbstractQualityControlWrapper<T>
Type Parameters:
T - MediaAwareCallPeer
All Implemented Interfaces:
QualityControl
Direct Known Subclasses:
QualityControlWrapper, QualityControlWrapper

public abstract class AbstractQualityControlWrapper<T extends MediaAwareCallPeer<?,?,?>>
extends Object
implements QualityControl

A wrapper of media quality control.

Author:
Damian Minkov, Sebastien Vincent

Field Summary
protected  T peer
          The peer we are controlling.
protected  QualityPreset remoteSendMaxPreset
          The currently used video quality preset.
 
Constructor Summary
protected AbstractQualityControlWrapper(T peer)
          Creates quality control for peer.
 
Method Summary
protected  QualityControl getMediaQualityControl()
          Checks and obtains quality control from media stream.
 QualityPreset getRemoteReceivePreset()
          The currently used quality preset announced as receive by remote party.
 QualityPreset getRemoteSendMaxPreset()
          The maximum preset that the remote party is sending and we are receiving.
 QualityPreset getRemoteSendMinPreset()
          The minimum preset that the remote party is sending and we are receiving.
 void setMaxFrameRate(float f)
          Changes local value of frame rate, the one we have received from remote party.
abstract  void setPreferredRemoteSendMaxPreset(QualityPreset preset)
          Changes the current video settings for the peer with the desired quality settings and inform the peer to stream the video with those settings.
 void setRemoteSendMaxPreset(QualityPreset preset)
          Changes remote send preset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

peer

protected final T extends MediaAwareCallPeer<?,?,?> peer
The peer we are controlling.


remoteSendMaxPreset

protected QualityPreset remoteSendMaxPreset
The currently used video quality preset.

Constructor Detail

AbstractQualityControlWrapper

protected AbstractQualityControlWrapper(T peer)
Creates quality control for peer.

Parameters:
peer -
Method Detail

getMediaQualityControl

protected QualityControl getMediaQualityControl()
Checks and obtains quality control from media stream.

Returns:

getRemoteReceivePreset

public QualityPreset getRemoteReceivePreset()
The currently used quality preset announced as receive by remote party.

Specified by:
getRemoteReceivePreset in interface QualityControl
Returns:
the current quality preset.

getRemoteSendMinPreset

public QualityPreset getRemoteSendMinPreset()
The minimum preset that the remote party is sending and we are receiving. Not Used.

Specified by:
getRemoteSendMinPreset in interface QualityControl
Returns:
the minimum remote preset.

getRemoteSendMaxPreset

public QualityPreset getRemoteSendMaxPreset()
The maximum preset that the remote party is sending and we are receiving.

Specified by:
getRemoteSendMaxPreset in interface QualityControl
Returns:
the maximum preset announced from remote party as send.

setMaxFrameRate

public void setMaxFrameRate(float f)
Changes local value of frame rate, the one we have received from remote party.

Parameters:
f - new frame rate.

setRemoteSendMaxPreset

public void setRemoteSendMaxPreset(QualityPreset preset)
Changes remote send preset. This doesn't have impact of current stream. But will have on next media changes. With this we can try to change the resolution that the remote part is sending.

Specified by:
setRemoteSendMaxPreset in interface QualityControl
Parameters:
preset - the new preset value.

setPreferredRemoteSendMaxPreset

public abstract void setPreferredRemoteSendMaxPreset(QualityPreset preset)
                                              throws OperationFailedException
Changes the current video settings for the peer with the desired quality settings and inform the peer to stream the video with those settings.

Specified by:
setPreferredRemoteSendMaxPreset in interface QualityControl
Parameters:
preset - the desired video settings
Throws:
OperationFailedException

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.