throws OperationFailedException
{
int[] payloadTypesArray = new int[formats.size()];
Vector<Attribute> mediaAttributes
= new Vector<Attribute>(2 * payloadTypesArray.length + 1);
MediaType mediaType = null;
// a=sendonly|sendrecv|recvonly|inactive
if( direction != MediaDirection.SENDRECV)
mediaAttributes.add(createDirectionAttribute(direction));
for (int i = 0; i < payloadTypesArray.length; i++)
{
MediaFormat format = formats.get(i);
MediaType fmtMediaType = format.getMediaType();
// determine whether we are dealing with audio or video.
if (mediaType == null)
mediaType = fmtMediaType;