|
|
|
|
@ -325,9 +325,7 @@ else if (format instanceof VideoFormat)
|
|
|
|
|
|
|
|
|
|
if (MediaFormatImpl.RTP_PAYLOAD_TYPE_UNKNOWN != rtpPayloadType)
|
|
|
|
|
{
|
|
|
|
|
for (MediaFormat mediaFormat
|
|
|
|
|
: rtpPayloadTypeToMediaFormats(
|
|
|
|
|
Byte.toString(rtpPayloadType)))
|
|
|
|
|
for (MediaFormat mediaFormat : getMediaFormats(rtpPayloadType))
|
|
|
|
|
{
|
|
|
|
|
MediaFormatImpl<? extends Format> mediaFormatImpl
|
|
|
|
|
= (MediaFormatImpl<? extends Format>) mediaFormat;
|
|
|
|
|
@ -428,6 +426,26 @@ public static MediaFormat[] getMediaFormats(MediaType mediaType)
|
|
|
|
|
return mediaFormats.toArray(EMPTY_MEDIA_FORMATS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets the <tt>MediaFormat</tt>s (expressed as an array) corresponding to
|
|
|
|
|
* a specific RTP payload type.
|
|
|
|
|
*
|
|
|
|
|
* @param rtpPayloadType the RTP payload type to retrieve the
|
|
|
|
|
* corresponding <tt>MediaFormat</tt>s for
|
|
|
|
|
* @return an array of <tt>MediaFormat</tt>s corresponding to the specified
|
|
|
|
|
* RTP payload type
|
|
|
|
|
*/
|
|
|
|
|
public static MediaFormat[] getMediaFormats(byte rtpPayloadType)
|
|
|
|
|
{
|
|
|
|
|
MediaFormat[] mediaFormats
|
|
|
|
|
= rtpPayloadTypeStrToMediaFormats.get(Byte.toString(rtpPayloadType));
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
(mediaFormats == null)
|
|
|
|
|
? EMPTY_MEDIA_FORMATS
|
|
|
|
|
: mediaFormats.clone();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets the well-known encoding (name) as defined in RFC 3551 "RTP Profile
|
|
|
|
|
* for Audio and Video Conferences with Minimal Control" corresponding to a
|
|
|
|
|
@ -493,25 +511,4 @@ else if (jmfEncoding.equals(VideoFormat.H261_RTP))
|
|
|
|
|
else
|
|
|
|
|
return MediaFormat.RTP_PAYLOAD_TYPE_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets the <tt>MediaFormat</tt>s (expressed as an array) corresponding to
|
|
|
|
|
* a specific RTP payload type (expressed as a <tt>String</tt>).
|
|
|
|
|
*
|
|
|
|
|
* @param rtpPayloadTypeStr the RTP payload type to retrieve the
|
|
|
|
|
* corresponding <tt>MediaFormat</tt>s for
|
|
|
|
|
* @return an array of <tt>MediaFormat</tt>s corresponding to the specified
|
|
|
|
|
* RTP payload type
|
|
|
|
|
*/
|
|
|
|
|
private static MediaFormat[] rtpPayloadTypeToMediaFormats(
|
|
|
|
|
String rtpPayloadTypeStr)
|
|
|
|
|
{
|
|
|
|
|
MediaFormat[] mediaFormats
|
|
|
|
|
= rtpPayloadTypeStrToMediaFormats.get(rtpPayloadTypeStr);
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
(mediaFormats == null)
|
|
|
|
|
? EMPTY_MEDIA_FORMATS
|
|
|
|
|
: mediaFormats.clone();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|