public class AudioCodec extends Object
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, String, 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");
AudioStream
Modifier and Type | Field and Description |
---|---|
static AudioCodec |
AMR
Adaptive Multi-Rate narrowband audio codec, also known as AMR or AMR-NB.
|
String |
fmtp
The format parameters to be used in the corresponding SDP attribute.
|
static AudioCodec |
GSM
GSM Full-Rate audio codec, also known as GSM-FR, GSM 06.10, GSM, or
simply FR.
|
static AudioCodec |
GSM_EFR
GSM Enhanced Full-Rate audio codec, also known as GSM-EFR, GSM 06.60, or
simply EFR.
|
static AudioCodec |
PCMA
G.711 a-law audio codec.
|
static AudioCodec |
PCMU
G.711 u-law audio codec.
|
String |
rtpmap
The encoding parameters to be used in the corresponding SDP attribute.
|
int |
type
The RTP payload type of the encoding.
|
Modifier and Type | Method and Description |
---|---|
static AudioCodec |
getCodec(int type,
String rtpmap,
String fmtp)
Creates an AudioCodec according to the given configuration.
|
static AudioCodec[] |
getCodecs()
Returns system supported audio codecs.
|
public final int type
public final String rtpmap
public final String fmtp
public static final AudioCodec PCMU
public static final AudioCodec PCMA
public static final AudioCodec GSM
public static final AudioCodec GSM_EFR
public static final AudioCodec AMR
public static AudioCodec[] getCodecs()
public static AudioCodec getCodec(int type, String rtpmap, String fmtp)
type
- The payload type of the encoding defined in RTP/AVP.rtpmap
- The encoding parameters specified in the corresponding SDP
attribute, or null if it is not available.fmtp
- The format parameters specified in the corresponding SDP
attribute, or null if it is not available.null
if it is not supported.