本文整理汇总了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";
}
}
示例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;
}
}
示例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();
}
}