public class MediaUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static MediaFormat[] |
EMPTY_MEDIA_FORMATS
An empty array with MediaFormat element type.
|
static int |
MAX_AUDIO_CHANNELS
The maximum number of channels for audio that is available through
MediaUtils.
|
static double |
MAX_AUDIO_SAMPLE_RATE
The maximum sample rate for audio that is available through
MediaUtils.
|
static int |
MAX_AUDIO_SAMPLE_SIZE_IN_BITS
The maximum sample size in bits for audio that is available through
MediaUtils.
|
| Constructor and Description |
|---|
MediaUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createImageAttr(Dimension sendSize,
Dimension maxRecvSize)
Creates value of an imgattr.
|
static MediaFormat |
getMediaFormat(javax.media.Format format)
Gets a MediaFormat predefined in MediaUtils which
represents a specific JMF Format.
|
static MediaFormat |
getMediaFormat(String encoding,
double clockRate)
Gets the MediaFormat known to MediaUtils and having the
specified well-known encoding (name) and clockRate.
|
static MediaFormat |
getMediaFormat(String encoding,
double clockRate,
Map<String,String> fmtps)
Gets the MediaFormat known to MediaUtils and having the
specified well-known encoding (name), clockRate and
matching format parameters.
|
static int |
getMediaFormatIndex(MediaFormat mediaFormat)
Gets the index of a specific MediaFormat instance within the
internal storage of MediaUtils.
|
static MediaFormat[] |
getMediaFormats(byte rtpPayloadType)
Gets the MediaFormats (expressed as an array) corresponding to
a specific RTP payload type.
|
static MediaFormat[] |
getMediaFormats(org.jitsi.utils.MediaType mediaType)
Gets the MediaFormats known to MediaUtils and being of
the specified MediaType.
|
static List<MediaFormat> |
getMediaFormats(String encoding)
Gets the MediaFormats predefined in MediaUtils with a
specific well-known encoding (name) as defined by RFC 3551 "RTP Profile
for Audio and Video Conferences with Minimal Control".
|
static byte |
getRTPPayloadType(String jmfEncoding,
double clockRate)
Gets the RTP payload type corresponding to a specific JMF encoding and
clock rate.
|
static String |
jmfEncodingToEncoding(String jmfEncoding)
Gets the well-known encoding (name) as defined in RFC 3551 "RTP Profile
for Audio and Video Conferences with Minimal Control" corresponding to a
given JMF-specific encoding.
|
public static final MediaFormat[] EMPTY_MEDIA_FORMATS
public static final int MAX_AUDIO_CHANNELS
public static final double MAX_AUDIO_SAMPLE_RATE
public static final int MAX_AUDIO_SAMPLE_SIZE_IN_BITS
public static String createImageAttr(Dimension sendSize, Dimension maxRecvSize)
sendSize - maximum size peer can sendmaxRecvSize - maximum size peer can displaypublic static MediaFormat getMediaFormat(javax.media.Format format)
format - the JMF Format to get the MediaFormat
representation forpublic static MediaFormat getMediaFormat(String encoding, double clockRate)
encoding - the well-known encoding (name) of the
MediaFormat to getclockRate - the clock rate of the MediaFormat to getpublic static MediaFormat getMediaFormat(String encoding, double clockRate, Map<String,String> fmtps)
encoding - the well-known encoding (name) of the
MediaFormat to getclockRate - the clock rate of the MediaFormat to getfmtps - the format parameters of the MediaFormat to getpublic static int getMediaFormatIndex(MediaFormat mediaFormat)
mediaFormat - the MediaFormat to determine the index ofpublic static MediaFormat[] getMediaFormats(byte rtpPayloadType)
rtpPayloadType - the RTP payload type to retrieve the
corresponding MediaFormats forpublic static MediaFormat[] getMediaFormats(org.jitsi.utils.MediaType mediaType)
mediaType - the MediaType of the MediaFormats to
getpublic static List<MediaFormat> getMediaFormats(String encoding)
encoding - the well-known encoding (name) to get the corresponding
MediaFormats ofpublic static byte getRTPPayloadType(String jmfEncoding, double clockRate)
jmfEncoding - the JMF encoding as returned by
Format.getEncoding() or the respective AudioFormat and
VideoFormat encoding constants to get the corresponding RTP
payload type ofclockRate - the clock rate to be taken into account in the search
for the RTP payload type if the JMF encoding does not uniquely identify
itMediaFormat.RTP_PAYLOAD_TYPE_UNKNOWNpublic static String jmfEncodingToEncoding(String jmfEncoding)
jmfEncoding - the JMF encoding to get the corresponding well-known
encoding ofCopyright © 2021 jitsi.org. All rights reserved.