public class MediaUtils
extends java.lang.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 java.lang.String |
createImageAttr(java.awt.Dimension sendSize,
java.awt.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(java.lang.String encoding,
double clockRate)
Gets the MediaFormat known to MediaUtils and having the
specified well-known encoding (name) and clockRate.
|
static MediaFormat |
getMediaFormat(java.lang.String encoding,
double clockRate,
java.util.Map<java.lang.String,java.lang.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(MediaType mediaType)
Gets the MediaFormats known to MediaUtils and being of
the specified MediaType.
|
static java.util.List<MediaFormat> |
getMediaFormats(java.lang.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(java.lang.String jmfEncoding,
double clockRate)
Gets the RTP payload type corresponding to a specific JMF encoding and
clock rate.
|
static java.lang.String |
jmfEncodingToEncoding(java.lang.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 java.lang.String createImageAttr(java.awt.Dimension sendSize, java.awt.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(java.lang.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(java.lang.String encoding, double clockRate, java.util.Map<java.lang.String,java.lang.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(MediaType mediaType)
mediaType
- the MediaType of the MediaFormats to
getpublic static java.util.List<MediaFormat> getMediaFormats(java.lang.String encoding)
encoding
- the well-known encoding (name) to get the corresponding
MediaFormats ofpublic static byte getRTPPayloadType(java.lang.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_UNKNOWN
public static java.lang.String jmfEncodingToEncoding(java.lang.String jmfEncoding)
jmfEncoding
- the JMF encoding to get the corresponding well-known
encoding of
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.