MediaCodecList mcl = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
String mime = "video/avc";
for (MediaCodecInfo info : mcl.getCodecInfos()) {
if (!info.isEncoder()) {
continue;
}
if (!info.isHardwareAccelerated()) {
continue;
}
try {
MediaCodecInfo.CodecCapabilities caps = info.getCapabilitiesForType(mime);
int maxWidth = caps.getVideoCapabilities().getSupportedWidths().getUpper();
int maxHeight = caps.getVideoCapabilities().getSupportedHeights().getUpper();
boolean fhd = caps.getVideoCapabilities().isSizeSupported(2376,1080);
if (fhd){
double maxrange = caps.getVideoCapabilities().getSupportedFrameRatesFor(2376,1080).getUpper();
Log.d("tag", " isfhd "+fhd+" maxWidth " + maxWidth+" maxHeight "+maxHeight+" fhd range "+maxrange );
}
} catch (IllegalArgumentException e) {
Log.d("tag", "error getSupportedFrameRatesFor");
}
}