List of usage examples for android.media MediaCodecInfo getName
public final String getName()
From source file:org.xwalk.runtime.extension.api.device_capabilities.MediaCodec.java
public void getCodecsList() { int numCodecs = android.media.MediaCodecList.getCodecCount(); for (int i = 0; i < numCodecs; i++) { android.media.MediaCodecInfo codecInfo = android.media.MediaCodecList.getCodecInfoAt(i); String name = codecInfo.getName().toUpperCase(); boolean hasAdded = false; for (String nameListElement : AUDIO_CODEC_NAMES) { if (name.contains(nameListElement)) { mAudioCodecsSet.add(new AudioCodecElement(nameListElement)); hasAdded = true;/* w ww . j a v a 2 s.c o m*/ break; } } if (hasAdded) { continue; } for (String nameListElement : VIDEO_CODEC_NAMES) { if (name.contains(nameListElement)) { boolean isEncoder = codecInfo.isEncoder(); // FIXME(fyraimar): Get the right hwAccel value. mVideoCodecsSet.add(new VideoCodecElement(nameListElement, isEncoder, false)); break; } } } }