Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Unified Diff: media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java

Issue 2815103004: Android: convert kEnumName to ENUM_NAME in java_cpp_enum.py. (Closed)
Patch Set: Address agrieve@ comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java
diff --git a/media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java b/media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java
index 06bb9e8bfc72d44f611d18f4c2fd4f2d29b4d34d..8a8c6921bebe43092ed4526a23aacd1d3cd5fbed 100644
--- a/media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java
+++ b/media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java
@@ -75,16 +75,16 @@ class CodecProfileLevelList {
private static class UnsupportedCodecProfileException extends RuntimeException {}
private static int getCodecFromMime(String mime) {
- if (mime.endsWith("vp9")) return VideoCodec.kCodecVP9;
- if (mime.endsWith("vp8")) return VideoCodec.kCodecVP8;
- if (mime.endsWith("avc")) return VideoCodec.kCodecH264;
- if (mime.endsWith("hevc")) return VideoCodec.kCodecHEVC;
+ if (mime.endsWith("vp9")) return VideoCodec.CODEC_VP9;
+ if (mime.endsWith("vp8")) return VideoCodec.CODEC_VP8;
+ if (mime.endsWith("avc")) return VideoCodec.CODEC_H264;
+ if (mime.endsWith("hevc")) return VideoCodec.CODEC_HEVC;
throw new UnsupportedCodecProfileException();
}
private static int mediaCodecProfileToChromiumMediaProfile(int codec, int profile) {
switch (codec) {
- case VideoCodec.kCodecH264:
+ case VideoCodec.CODEC_H264:
switch (profile) {
case CodecProfileLevel.AVCProfileBaseline:
return VideoCodecProfile.H264PROFILE_BASELINE;
@@ -103,14 +103,14 @@ class CodecProfileLevelList {
default:
throw new UnsupportedCodecProfileException();
}
- case VideoCodec.kCodecVP8:
+ case VideoCodec.CODEC_VP8:
switch (profile) {
case CodecProfileLevel.VP8ProfileMain:
return VideoCodecProfile.VP8PROFILE_ANY;
default:
throw new UnsupportedCodecProfileException();
}
- case VideoCodec.kCodecVP9:
+ case VideoCodec.CODEC_VP9:
switch (profile) {
case CodecProfileLevel.VP9Profile0:
return VideoCodecProfile.VP9PROFILE_PROFILE0;
@@ -123,7 +123,7 @@ class CodecProfileLevelList {
default:
throw new UnsupportedCodecProfileException();
}
- case VideoCodec.kCodecHEVC:
+ case VideoCodec.CODEC_HEVC:
switch (profile) {
case CodecProfileLevel.HEVCProfileMain:
return VideoCodecProfile.HEVCPROFILE_MAIN;
@@ -141,7 +141,7 @@ class CodecProfileLevelList {
private static int mediaCodecLevelToChromiumMediaLevel(int codec, int level) {
switch (codec) {
- case VideoCodec.kCodecH264:
+ case VideoCodec.CODEC_H264:
switch (level) {
case CodecProfileLevel.AVCLevel1:
return 10;
@@ -178,7 +178,7 @@ class CodecProfileLevelList {
default:
throw new UnsupportedCodecProfileException();
}
- case VideoCodec.kCodecVP8:
+ case VideoCodec.CODEC_VP8:
switch (level) {
case CodecProfileLevel.VP8Level_Version0:
return 0;
@@ -191,7 +191,7 @@ class CodecProfileLevelList {
default:
throw new UnsupportedCodecProfileException();
}
- case VideoCodec.kCodecVP9:
+ case VideoCodec.CODEC_VP9:
switch (level) {
case CodecProfileLevel.VP9Level1:
return 10;
@@ -224,7 +224,7 @@ class CodecProfileLevelList {
default:
throw new UnsupportedCodecProfileException();
}
- case VideoCodec.kCodecHEVC:
+ case VideoCodec.CODEC_HEVC:
switch (level) {
case CodecProfileLevel.HEVCHighTierLevel1:
case CodecProfileLevel.HEVCMainTierLevel1:

Powered by Google App Engine
This is Rietveld 408576698