Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.format
Class AudioMediaFormatImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.format.MediaFormatImpl<javax.media.format.AudioFormat>
      extended by net.java.sip.communicator.impl.neomedia.format.AudioMediaFormatImpl
All Implemented Interfaces:
AudioMediaFormat, MediaFormat

public class AudioMediaFormatImpl
extends MediaFormatImpl<javax.media.format.AudioFormat>
implements AudioMediaFormat

Implements AudioMediaFormat for the JMF AudioFormat.

Author:
Lubomir Marinov

Field Summary
 
Fields inherited from class net.java.sip.communicator.impl.neomedia.format.MediaFormatImpl
CLOCK_RATE_PNAME, EMPTY_CODEC_SETTINGS, EMPTY_FORMAT_PARAMETERS, ENCODING_PNAME, format, FORMAT_PARAMETERS_PNAME
 
Fields inherited from interface net.java.sip.communicator.service.neomedia.format.MediaFormat
MAX_DYNAMIC_PAYLOAD_TYPE, MIN_DYNAMIC_PAYLOAD_TYPE, RTP_PAYLOAD_TYPE_UNKNOWN
 
Constructor Summary
AudioMediaFormatImpl(javax.media.format.AudioFormat format)
          Initializes a new AudioMediaFormatImpl instance which is to provide an implementation of AudioMediaFormat for a specific JMF AudioFormat.
AudioMediaFormatImpl(javax.media.format.AudioFormat format, Map<String,String> formatParameters, Map<String,String> advancedParameters)
          Initializes a new AudioMediaFormatImpl instance which is to provide an implementation of AudioMediaFormat for a specific JMF AudioFormat and to have a specific set of format-specific parameters.
AudioMediaFormatImpl(String encoding)
          Initializes a new AudioMediaFormatImpl instance with the specified encoding and a single audio channel.
AudioMediaFormatImpl(String encoding, double clockRate)
          Initializes a new AudioMediaFormatImpl instance with the specified encoding and clock rate and a single audio channel.
AudioMediaFormatImpl(String encoding, double clockRate, int channels)
          Initializes a new AudioMediaFormatImpl instance with the specified encoding, clock rate and number of audio channels.
AudioMediaFormatImpl(String encoding, double clockRate, int channels, Map<String,String> formatParameters, Map<String,String> advancedParameters)
          Initializes a new AudioMediaFormatImpl instance with the specified encoding, clock rate, number of audio channels and format parameters.
AudioMediaFormatImpl(String encoding, double clockRate, Map<String,String> formatParameters, Map<String,String> advancedParameters)
          Initializes a new AudioMediaFormatImpl instance with the specified encoding, clock rate and format parameters and a single audio channel.
 
Method Summary
 int getChannels()
          Gets the number of audio channels associated with this AudioMediaFormat.
 double getClockRate()
          Gets the clock rate associated with this MediaFormat.
 MediaType getMediaType()
          Gets the type of this MediaFormat which is MediaType.AUDIO for AudioMediaFormatImpl instances.
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.format.MediaFormatImpl
advancedAttributesAreEqual, createInstance, createInstance, equals, formatParametersAreEqual, formatParametersAreEqual, formatParametersMatch, getAdditionalCodecSettings, getAdvancedAttributes, getClockRateString, getEncoding, getFormat, getFormatParameters, getJMFEncoding, getRealUsedClockRateString, getRTPPayloadType, hashCode, setAdditionalCodecSettings, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.java.sip.communicator.service.neomedia.format.MediaFormat
equals, formatParametersMatch, getAdditionalCodecSettings, getAdvancedAttributes, getClockRateString, getEncoding, getFormatParameters, getRealUsedClockRateString, getRTPPayloadType, setAdditionalCodecSettings, toString
 

Constructor Detail

AudioMediaFormatImpl

AudioMediaFormatImpl(javax.media.format.AudioFormat format)
Initializes a new AudioMediaFormatImpl instance which is to provide an implementation of AudioMediaFormat for a specific JMF AudioFormat.

Parameters:
format - the JMF AudioFormat the new instance is to wrap and provide an implementation of AudioMediaFormat for

AudioMediaFormatImpl

AudioMediaFormatImpl(javax.media.format.AudioFormat format,
                     Map<String,String> formatParameters,
                     Map<String,String> advancedParameters)
Initializes a new AudioMediaFormatImpl instance which is to provide an implementation of AudioMediaFormat for a specific JMF AudioFormat and to have a specific set of format-specific parameters.

Parameters:
format - the JMF AudioFormat the new instance is to wrap and provide an implementation of AudioMediaFormat for
formatParameters - the set of format-specific parameters of the new instance
advancedParameters - the set of format-specific parameters of the new instance

AudioMediaFormatImpl

public AudioMediaFormatImpl(String encoding)
Initializes a new AudioMediaFormatImpl instance with the specified encoding and a single audio channel.

Parameters:
encoding - the encoding of the new AudioMediaFormatImpl instance

AudioMediaFormatImpl

AudioMediaFormatImpl(String encoding,
                     double clockRate)
Initializes a new AudioMediaFormatImpl instance with the specified encoding and clock rate and a single audio channel.

Parameters:
encoding - the encoding of the new AudioMediaFormatImpl instance
clockRate - the clock (i.e. sample) rate of the new AudioMediaFormatImpl instance

AudioMediaFormatImpl

AudioMediaFormatImpl(String encoding,
                     double clockRate,
                     int channels)
Initializes a new AudioMediaFormatImpl instance with the specified encoding, clock rate and number of audio channels.

Parameters:
encoding - the encoding of the new AudioMediaFormatImpl instance
clockRate - the clock (i.e. sample) rate of the new AudioMediaFormatImpl instance
channels - the number of available channels (1 for mono, 2 for stereo)

AudioMediaFormatImpl

AudioMediaFormatImpl(String encoding,
                     double clockRate,
                     Map<String,String> formatParameters,
                     Map<String,String> advancedParameters)
Initializes a new AudioMediaFormatImpl instance with the specified encoding, clock rate and format parameters and a single audio channel.

Parameters:
encoding - the encoding of the new AudioMediaFormatImpl instance
clockRate - the clock (i.e. sample) rate of the new AudioMediaFormatImpl instance
formatParameters - any codec-specific parameters that have been received via SIP/SDP or XMPP/Jingle.
advancedParameters - set of advanced parameters that have been received by SIP/SDP or XMPP/Jingle

AudioMediaFormatImpl

AudioMediaFormatImpl(String encoding,
                     double clockRate,
                     int channels,
                     Map<String,String> formatParameters,
                     Map<String,String> advancedParameters)
Initializes a new AudioMediaFormatImpl instance with the specified encoding, clock rate, number of audio channels and format parameters.

Parameters:
encoding - the encoding of the new AudioMediaFormatImpl instance
clockRate - the clock (i.e. sample) rate of the new AudioMediaFormatImpl instance
channels - the number of available channels (1 for mono, 2 for stereo)
formatParameters - any codec-specific parameters that have been received via SIP/SDP or XMPP/Jingle
advancedParameters - any parameters that have been received via SIP/SDP or XMPP/Jingle
Method Detail

getChannels

public int getChannels()
Gets the number of audio channels associated with this AudioMediaFormat.

Specified by:
getChannels in interface AudioMediaFormat
Returns:
the number of audio channels associated with this AudioMediaFormat
See Also:
AudioMediaFormat.getChannels()

getClockRate

public double getClockRate()
Gets the clock rate associated with this MediaFormat.

Specified by:
getClockRate in interface MediaFormat
Returns:
the clock rate associated with this MediaFormat
See Also:
MediaFormat.getClockRate()

getMediaType

public final MediaType getMediaType()
Gets the type of this MediaFormat which is MediaType.AUDIO for AudioMediaFormatImpl instances.

Specified by:
getMediaType in interface MediaFormat
Returns:
the MediaType that this format represents and which is MediaType.AUDIO for AudioMediaFormatImpl instances
See Also:
MediaFormat.getMediaType()

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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