How to query the Video Capabilities of an Android device?
问题 public void getCodecInfo() { int numCodecs = MediaCodecList.getCodecCount(); for (int i = 0; i < numCodecs; i++) { MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i); if (!codecInfo.isEncoder()) { continue; } String[] types = codecInfo.getSupportedTypes(); for (int j = 0; j < types.length; j++) { MediaCodecInfo.CodecCapabilities capabilities = codecInfo.getCapabilitiesForType(types[j]); Log.d("CodecCapabilities", new Gson().toJson(capabilities)); //MediaCodecInfo.VideoCapabilities