private int[] getPriorities() { MediaFormat[] encodings = getEncodings(); final int count = encodings.length; int[] priorities = new int[count]; for (int i = 0; i < count; i++) { int priority = encodingConfiguration.getPriority(encodings[i]); priorities[i] = (priority > 0) ? (count - i) : 0; } return priorities; }
public Object getValueAt(int rowIndex, int columnIndex) { MediaFormat encoding = getEncodings()[rowIndex]; switch (columnIndex) { case 0: return (encodingConfiguration.getPriority(encoding) > 0); case 1: if (MediaType.VIDEO.equals(encoding.getMediaType()) && (VideoMediaFormatImpl.DEFAULT_CLOCK_RATE == encoding.getClockRate())) return encoding.getEncoding(); else { return encoding.getEncoding() + "/" + encoding.getRealUsedClockRateString(); } default: return null; } }