SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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

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

public class EncodingConfiguration
extends Object

Simple configuration of encoding priorities.

Author:
Damian Minkov

Constructor Summary
EncodingConfiguration()
          Default constructor.
 
Method Summary
 String[] getAvailableAudioEncodings()
           
 String[] getAvailableVideoEncodings()
           
 int getPriority(String encoding)
           
 String[] getSupportedAudioEncodings()
           
 String[] getSupportedVideoEncodings()
           
 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(String encoding, int priority)
          Sets pref as the preference associated with encoding.
 String[] updateEncodings(List<String> encs)
          Updates the codecs in the set according preferences in encodingPreferences.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


updateEncodings

public String[] updateEncodings(List<String> encs)
Updates the codecs in the set according preferences in encodingPreferences. If value is "0" the codec is disabled.


setPriority

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

Parameters:
encoding - a string containing the SDP int of the encoding whose pref we're setting.
priority - a positive int indicating the preference for that encoding.

getPriority

public int getPriority(String encoding)

registerCustomCodecs

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


registerCustomPackages

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


getAvailableVideoEncodings

public String[] getAvailableVideoEncodings()

getAvailableAudioEncodings

public String[] getAvailableAudioEncodings()

getSupportedVideoEncodings

public String[] getSupportedVideoEncodings()

getSupportedAudioEncodings

public String[] getSupportedAudioEncodings()

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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