android 获取设备支持的编解码器的方法

版权申明:未经允许请勿转载。转载前请先联系作者([email protected]

MediaCodecList

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
    int numCodecs = MediaCodecList.getCodecCount();
    for (int i = 0; i < numCodecs; i++) {
        MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
        String[] types = codecInfo.getSupportedTypes();
        for (String type : types) {
            Log.e("MediaCodecList, name:", codecInfo.getName() + ",type:" + type);
        }
    }
}

你可能感兴趣的:(Android)