AudioCodec
open classAudioCodec
kotlin.Any | |
↳ | android.net.rtp.AudioCodec |
This class defines a collection of audio codecs to be used with AudioStream
s. Their parameters are designed to be exchanged using Session Description Protocol (SDP). Most of the values listed here can be found in RFC 3551, while others are described in separated standards.
Few simple configurations are defined as public static instances for the convenience of direct uses. More complicated ones could be obtained using getCodec(int,java.lang.String,java.lang.String)
. For example, one can use the following snippet to create a mode-1-only AMR codec.
AudioCodec codec = AudioCodec.getCodec(100, "AMR/8000", "mode-set=1");
Summary
Public methods | |
---|---|
open static AudioCodec! |
Creates an AudioCodec according to the given configuration. |
open static Array<AudioCodec!>! |
Returns system supported audio codecs. |
Properties | |
---|---|
static AudioCodec! |
Adaptive Multi-Rate narrowband audio codec, also known as AMR or AMR-NB. |
static AudioCodec! |
GSM Full-Rate audio codec, also known as GSM-FR, GSM 06. |
static AudioCodec! |
GSM Enhanced Full-Rate audio codec, also known as GSM-EFR, GSM 06. |
static AudioCodec! |
G. |
static AudioCodec! |
G. |
String! |
The format parameters to be used in the corresponding SDP attribute. |
String! |
The encoding parameters to be used in the corresponding SDP attribute. |
Int |
The RTP payload type of the encoding. |
Public methods
getCodec
open static fungetCodec(
type: Int,
rtpmap: String!,
fmtp: String!
): AudioCodec!
Deprecated: Deprecated in Java.
Creates an AudioCodec according to the given configuration.
Parameters | |
---|---|
type |
Int: The payload type of the encoding defined in RTP/AVP. |
rtpmap |
String!: The encoding parameters specified in the corresponding SDP attribute, or null if it is not available. |
fmtp |
String!: The format parameters specified in the corresponding SDP attribute, or null if it is not available. |
Return | |
---|---|
AudioCodec! |
The configured AudioCodec or null if it is not supported. |
getCodecs
open static fungetCodecs(): Array<AudioCodec!>!
Deprecated: Deprecated in Java.
Returns system supported audio codecs.
Properties
AMR
static valAMR: AudioCodec!
Deprecated: Deprecated in Java.
Adaptive Multi-Rate narrowband audio codec, also known as AMR or AMR-NB. Currently CRC, robust sorting, and interleaving are not supported. See more details about these features in RFC 4867.
GSM
static valGSM: AudioCodec!
Deprecated: Deprecated in Java.
GSM Full-Rate audio codec, also known as GSM-FR, GSM 06.10, GSM, or simply FR.
GSM_EFR
static valGSM_EFR: AudioCodec!
Deprecated: Deprecated in Java.
GSM Enhanced Full-Rate audio codec, also known as GSM-EFR, GSM 06.60, or simply EFR.
PCMA
static valPCMA: AudioCodec!
Deprecated: Deprecated in Java.
G.711 a-law audio codec.
PCMU
static valPCMU: AudioCodec!
Deprecated: Deprecated in Java.
G.711 u-law audio codec.
fmtp
valfmtp: String!
Deprecated: Deprecated in Java.
The format parameters to be used in the corresponding SDP attribute.
rtpmap
valrtpmap: String!
Deprecated: Deprecated in Java.
The encoding parameters to be used in the corresponding SDP attribute.
type
valtype: Int
Deprecated: Deprecated in Java.
The RTP payload type of the encoding.