当前位置: 首页>>代码示例>>Java>>正文


Java CodecProfileLevel.AVCLevel11方法代码示例

本文整理汇总了Java中android.media.MediaCodecInfo.CodecProfileLevel.AVCLevel11方法的典型用法代码示例。如果您正苦于以下问题:Java CodecProfileLevel.AVCLevel11方法的具体用法?Java CodecProfileLevel.AVCLevel11怎么用?Java CodecProfileLevel.AVCLevel11使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.media.MediaCodecInfo.CodecProfileLevel的用法示例。


在下文中一共展示了CodecProfileLevel.AVCLevel11方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLevelName

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:41,代码来源:IjkMediaCodecInfo.java

示例2: parseAvcLevel

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
@SuppressLint("InlinedApi")
private static int parseAvcLevel(byte[] data) {
  int levelIdc = data[8] & 0xFF;
  switch (levelIdc) {
    case 9:
      return CodecProfileLevel.AVCLevel1b;
    case 10:
      return CodecProfileLevel.AVCLevel1;
    case 11:
      return CodecProfileLevel.AVCLevel11;
    case 12:
      return CodecProfileLevel.AVCLevel12;
    case 13:
      return CodecProfileLevel.AVCLevel13;
    case 20:
      return CodecProfileLevel.AVCLevel2;
    case 21:
      return CodecProfileLevel.AVCLevel21;
    case 22:
      return CodecProfileLevel.AVCLevel22;
    case 30:
      return CodecProfileLevel.AVCLevel3;
    case 31:
      return CodecProfileLevel.AVCLevel31;
    case 32:
      return CodecProfileLevel.AVCLevel32;
    case 40:
      return CodecProfileLevel.AVCLevel4;
    case 41:
      return CodecProfileLevel.AVCLevel41;
    case 42:
      return CodecProfileLevel.AVCLevel42;
    case 50:
      return CodecProfileLevel.AVCLevel5;
    case 51:
      return CodecProfileLevel.AVCLevel51;
    default:
      return 0;
  }
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:41,代码来源:CodecSpecificDataUtil.java


注:本文中的android.media.MediaCodecInfo.CodecProfileLevel.AVCLevel11方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。