Java tutorial
//package com.java2s; import android.media.MediaCodecInfo; import android.util.Log; public class Main { public static void logColorFormat(String tag, int colorFormat) { switch (colorFormat) { case MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Planar: Log.d(tag, "COLOR_FormatYUV420Planar"); break; case MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420SemiPlanar: Log.d(tag, "COLOR_FormatYUV420SemiPlanar"); break; case MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible: Log.d(tag, "COLOR_FormatYUV420Flexible"); break; case MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface: Log.d(tag, "COLOR_FormatSurface"); break; } } }