Module webrtc.java

Class RTCRtpCodecCapability


  • public class RTCRtpCodecCapability
    extends Object
    Represents the static capabilities of an endpoint's implementation of a codec.
    Author:
    Alex Andres
    • Constructor Detail

      • RTCRtpCodecCapability

        public RTCRtpCodecCapability​(MediaType mediaType,
                                     String name,
                                     int clockRate,
                                     int channels,
                                     Map<String,​String> sdpFmtp)
        Creates an instance of RTCRtpCodecCapability with the specified capability parameters.
        Parameters:
        mediaType - The media type of the codec. Equivalent to the MIME top-level type.
        name - The codec name. Equivalent to the MIME subtype.
        clockRate - The codec clock rate expressed in Hertz.
        channels - The number of audio channels. Unused for video codecs.
        sdpFmtp - The "a=fmtp" parameters in the SDP.
    • Method Detail

      • getMediaType

        public MediaType getMediaType()
        Returns media type of the codec equivalent to the MIME top-level type.
        Returns:
        The media type of the codec.
      • getName

        public String getName()
        Returns the name of the codec equivalent to the MIME subtype.
        Returns:
        The name of the codec.
      • getClockRate

        public int getClockRate()
        Returns the codec clock rate expressed in Hertz.
        Returns:
        The codec clock rate expressed in Hertz.
      • getChannels

        public int getChannels()
        Returns the number of audio channels (mono=1, stereo=2).

        Unused for video codecs.

        Returns:
        The number of audio channels.
      • getSDPFmtp

        public Map<String,​String> getSDPFmtp()
        Returns the format specific parameters in the SDP corresponding to the codec. The map contains the "a=fmtp" line in the SDP for convenient access of the values.
        Returns:
        The format specific parameters in the SDP.
      • getMimeType

        public String getMimeType()
        Returns the MIME type composed of the mediaType and the name.
        Returns:
        The codec MIME type.