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


Java CodecProfileLevel.AVCLevel1方法代码示例

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


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

示例1: avcLevelToMaxFrameSize

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *      (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel1b: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel13: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel2: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21: return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel3: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31: return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32: return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel41: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42: return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5: return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51: return 36864 * 16 * 16;
    default: return -1;
  }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:28,代码来源:MediaCodecUtil.java

示例2: avcLevelToMaxFrameSize

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *     (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel1b: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel13: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel2: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21: return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel3: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31: return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32: return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel41: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42: return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5: return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51: return 36864 * 16 * 16;
    case CodecProfileLevel.AVCLevel52: return 36864 * 16 * 16;
    default: return -1;
  }
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:29,代码来源:MediaCodecUtil.java

示例3: avcLevelToMaxFrameSize

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
/**
 * Conversion values taken from: https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *      (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1: return 25344;
    case CodecProfileLevel.AVCLevel1b: return 25344;
    case CodecProfileLevel.AVCLevel12: return 101376;
    case CodecProfileLevel.AVCLevel13: return 101376;
    case CodecProfileLevel.AVCLevel2: return 101376;
    case CodecProfileLevel.AVCLevel21: return 202752;
    case CodecProfileLevel.AVCLevel22: return 414720;
    case CodecProfileLevel.AVCLevel3: return 414720;
    case CodecProfileLevel.AVCLevel31: return 921600;
    case CodecProfileLevel.AVCLevel32: return 1310720;
    case CodecProfileLevel.AVCLevel4: return 2097152;
    case CodecProfileLevel.AVCLevel41: return 2097152;
    case CodecProfileLevel.AVCLevel42: return 2228224;
    case CodecProfileLevel.AVCLevel5: return 5652480;
    case CodecProfileLevel.AVCLevel51: return 9437184;
    default: return -1;
  }
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:28,代码来源:MediaCodecUtil.java

示例4: avcLevelToMaxFrameSize

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *     (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel1b: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel13: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel2: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21: return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel3: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31: return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32: return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel41: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42: return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5: return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51: return 36864 * 16 * 16;
    default: return -1;
  }
}
 
开发者ID:jcodeing,项目名称:K-Sonic,代码行数:28,代码来源:MediaCodecUtil.java

示例5: 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

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