Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.codec
Class EncodingConfiguration

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.codec.EncodingConfiguration

public class EncodingConfiguration
extends Object

Simple configuration of encoding priorities.

Author:
Damian Minkov, Lyubomir Marinov

Field Summary
static boolean G729
          The indicator which determines whether the G.729 codec is enabled.
 
Constructor Summary
EncodingConfiguration()
          Default constructor.
 
Method Summary
 MediaFormat[] getAvailableEncodings(MediaType type)
          Get the available encodings for a specific MediaType.
 int getPriority(MediaFormat encoding)
          Set the priority for a MediaFormat.
 MediaFormat[] getSupportedEncodings(MediaType type)
          Gets the supported MediaFormats i.e.
 void initializeFormatPreferences()
          Retrieves (from the configuration service) preferences specified for various formats and assigns default ones to those that haven't been mentioned.
 void registerCustomCodecs()
          Register in JMF the custom codecs we provide
 void registerCustomPackages()
          Register in JMF the custom packages we provide
 void setPriority(MediaFormat encoding, int priority)
          Sets priority as the preference associated with encoding.
 void setPriorityConfig(MediaFormat encoding, int priority)
          Sets the priority of the given encoding in the configuration service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

G729

public static final boolean G729
The indicator which determines whether the G.729 codec is enabled. WARNING: The use of G.729 may require a license fee and/or royalty fee in some countries and is licensed by SIPRO Lab Telecom.

See Also:
Constant Field Values
Constructor Detail

EncodingConfiguration

public EncodingConfiguration()
Default constructor.

Method Detail

initializeFormatPreferences

public void initializeFormatPreferences()
Retrieves (from the configuration service) preferences specified for various formats and assigns default ones to those that haven't been mentioned.


setPriority

public void setPriority(MediaFormat encoding,
                        int priority)
Sets priority as the preference associated with encoding. Use this method for both audio and video encodings and don't worry if the preferences are equal since we rarely need to compare the preferences of video encodings to those of audio encodings.

Parameters:
encoding - the MediaFormat specifying the encoding to set the priority of
priority - a positive int indicating the priority of encoding to set

setPriorityConfig

public void setPriorityConfig(MediaFormat encoding,
                              int priority)
Sets the priority of the given encoding in the configuration service.

Parameters:
encoding - the MediaFormat specifying the encoding to set the priority of
priority - a positive int indicating the priority of encoding to set

getPriority

public int getPriority(MediaFormat encoding)
Set the priority for a MediaFormat.

Parameters:
encoding - the MediaFormat
Returns:
the priority

registerCustomCodecs

public void registerCustomCodecs()
Register in JMF the custom codecs we provide


registerCustomPackages

public void registerCustomPackages()
Register in JMF the custom packages we provide


getAvailableEncodings

public MediaFormat[] getAvailableEncodings(MediaType type)
Get the available encodings for a specific MediaType.

Parameters:
type - the MediaType we would like to know its available encodings
Returns:
array of MediaFormat supported for the MediaType

getSupportedEncodings

public MediaFormat[] getSupportedEncodings(MediaType type)
Gets the supported MediaFormats i.e. the enabled available MediaFormats sorted in decreasing priority.

Parameters:
type - the MediaType of the supported MediaFormats to get
Returns:
an array of the supported MediaFormats i.e. the enabled available MediaFormats sorted in decreasing priority

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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