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


Java CodecProfileLevel.AVCProfileHigh444方法代码示例

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


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

示例1: getProfileName

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
public static String getProfileName(int profile) {
    switch (profile) {
    case CodecProfileLevel.AVCProfileBaseline:
        return "Baseline";
    case CodecProfileLevel.AVCProfileMain:
        return "Main";
    case CodecProfileLevel.AVCProfileExtended:
        return "Extends";
    case CodecProfileLevel.AVCProfileHigh:
        return "High";
    case CodecProfileLevel.AVCProfileHigh10:
        return "High10";
    case CodecProfileLevel.AVCProfileHigh422:
        return "High422";
    case CodecProfileLevel.AVCProfileHigh444:
        return "High444";
    default:
        return "Unknown";
    }
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:21,代码来源:IjkMediaCodecInfo.java

示例2: parseAvcProfile

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
@SuppressLint("InlinedApi")
private static int parseAvcProfile(byte[] data) {
  int profileIdc = data[6] & 0xFF;
  switch (profileIdc) {
    case 0x42:
      return CodecProfileLevel.AVCProfileBaseline;
    case 0x4d:
      return CodecProfileLevel.AVCProfileMain;
    case 0x58:
      return CodecProfileLevel.AVCProfileExtended;
    case 0x64:
      return CodecProfileLevel.AVCProfileHigh;
    case 0x6e:
      return CodecProfileLevel.AVCProfileHigh10;
    case 0x7a:
      return CodecProfileLevel.AVCProfileHigh422;
    case 0xf4:
      return CodecProfileLevel.AVCProfileHigh444;
    default:
      return 0;
  }
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:23,代码来源:CodecSpecificDataUtil.java

示例3: mediaCodecProfileToChromiumMediaProfile

import android.media.MediaCodecInfo.CodecProfileLevel; //导入方法依赖的package包/类
private static int mediaCodecProfileToChromiumMediaProfile(int codec, int profile) {
    switch (codec) {
        case VideoCodec.CODEC_H264:
            switch (profile) {
                case CodecProfileLevel.AVCProfileBaseline:
                    return VideoCodecProfile.H264PROFILE_BASELINE;
                case CodecProfileLevel.AVCProfileMain:
                    return VideoCodecProfile.H264PROFILE_MAIN;
                case CodecProfileLevel.AVCProfileExtended:
                    return VideoCodecProfile.H264PROFILE_EXTENDED;
                case CodecProfileLevel.AVCProfileHigh:
                    return VideoCodecProfile.H264PROFILE_HIGH;
                case CodecProfileLevel.AVCProfileHigh10:
                    return VideoCodecProfile.H264PROFILE_HIGH10PROFILE;
                case CodecProfileLevel.AVCProfileHigh422:
                    return VideoCodecProfile.H264PROFILE_HIGH422PROFILE;
                case CodecProfileLevel.AVCProfileHigh444:
                    return VideoCodecProfile.H264PROFILE_HIGH444PREDICTIVEPROFILE;
                default:
                    throw new UnsupportedCodecProfileException();
            }
        case VideoCodec.CODEC_VP8:
            switch (profile) {
                case CodecProfileLevel.VP8ProfileMain:
                    return VideoCodecProfile.VP8PROFILE_ANY;
                default:
                    throw new UnsupportedCodecProfileException();
            }
        case VideoCodec.CODEC_VP9:
            switch (profile) {
                case CodecProfileLevel.VP9Profile0:
                    return VideoCodecProfile.VP9PROFILE_PROFILE0;
                case CodecProfileLevel.VP9Profile1:
                    return VideoCodecProfile.VP9PROFILE_PROFILE1;
                case CodecProfileLevel.VP9Profile2:
                    return VideoCodecProfile.VP9PROFILE_PROFILE2;
                case CodecProfileLevel.VP9Profile3:
                    return VideoCodecProfile.VP9PROFILE_PROFILE3;
                default:
                    throw new UnsupportedCodecProfileException();
            }
        case VideoCodec.CODEC_HEVC:
            switch (profile) {
                case CodecProfileLevel.HEVCProfileMain:
                    return VideoCodecProfile.HEVCPROFILE_MAIN;
                case CodecProfileLevel.HEVCProfileMain10:
                    return VideoCodecProfile.HEVCPROFILE_MAIN10;
                case CodecProfileLevel.HEVCProfileMain10HDR10:
                    return VideoCodecProfile.HEVCPROFILE_MAIN_STILL_PICTURE;
                default:
                    throw new UnsupportedCodecProfileException();
            }
        default:
            throw new UnsupportedCodecProfileException();
    }
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:57,代码来源:CodecProfileLevelList.java


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