if( toclean != null )
devices.remove(toclean);
}
}
private MediaFormat getSupportedFormat( String name, PayloadTypePacketExtension payloadType ) {
MediaDevice dev = devices.get(name);
MediaType mediaType = dev.getMediaType();
for( MediaFormat mf : dev.getSupportedFormats() ) {
// if( ( mf.getRTPPayloadType() == MediaFormat.RTP_PAYLOAD_TYPE_UNKNOWN || mf.getRTPPayloadType() == payloadType.getID() ) //FIXME: will this work for locally defined ids?
// && mf.getClockRateString().equals( String.valueOf(payloadType.getClockrate())) //FIXME: does the clockrate really need to match? will the device report all available clock rates?
// && mf.getEncoding().equals(payloadType.getName()) ) {
//FIXME: we should probably check advanced attributes and format parameters, but my guess is
// that in most cases we can adapt.