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

Side by Side Diff: media/base/android/java/src/org/chromium/media/MediaCodecUtil.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 unified diff | Download patch
« no previous file with comments | « media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.media; 5 package org.chromium.media;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.media.MediaCodec; 8 import android.media.MediaCodec;
9 import android.media.MediaCodec.CryptoInfo; 9 import android.media.MediaCodec.CryptoInfo;
10 import android.media.MediaCodecInfo; 10 import android.media.MediaCodecInfo;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 {200, 10}, {800, 11}, {1800, 20}, {3600, 21}, {7200, 30}, {12000 , 31}, {18000, 40}, 221 {200, 10}, {800, 11}, {1800, 20}, {3600, 21}, {7200, 30}, {12000 , 31}, {18000, 40},
222 {30000, 41}, {60000, 50}, {120000, 51}, {180000, 52}, 222 {30000, 41}, {60000, 50}, {120000, 51}, {180000, 52},
223 }; 223 };
224 VideoCapabilities videoCapabilities = codecCapabilities.getVideoCapabili ties(); 224 VideoCapabilities videoCapabilities = codecCapabilities.getVideoCapabili ties();
225 for (int[] entry : bitrateMapping) { 225 for (int[] entry : bitrateMapping) {
226 int bitrate = entry[0]; 226 int bitrate = entry[0];
227 int level = entry[1]; 227 int level = entry[1];
228 if (videoCapabilities.getBitrateRange().contains(bitrate)) { 228 if (videoCapabilities.getBitrateRange().contains(bitrate)) {
229 // Assume all platforms before N only support VP9 profile 0. 229 // Assume all platforms before N only support VP9 profile 0.
230 profileLevels.addCodecProfileLevel( 230 profileLevels.addCodecProfileLevel(
231 VideoCodec.kCodecVP9, VideoCodecProfile.VP9PROFILE_PROFI LE0, level); 231 VideoCodec.CODEC_VP9, VideoCodecProfile.VP9PROFILE_PROFI LE0, level);
232 } 232 }
233 } 233 }
234 } 234 }
235 235
236 /** 236 /**
237 * Return an array of supported codecs and profiles. 237 * Return an array of supported codecs and profiles.
238 */ 238 */
239 @CalledByNative 239 @CalledByNative
240 private static Object[] getSupportedCodecProfileLevels() { 240 private static Object[] getSupportedCodecProfileLevels() {
241 CodecProfileLevelList profileLevels = new CodecProfileLevelList(); 241 CodecProfileLevelList profileLevels = new CodecProfileLevelList();
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 * supported. 633 * supported.
634 * This method was introduced in Android N. Note that if platformSupportsCbc sEncryption 634 * This method was introduced in Android N. Note that if platformSupportsCbc sEncryption
635 * returns true, then this function will set the pattern. 635 * returns true, then this function will set the pattern.
636 */ 636 */
637 static void setPatternIfSupported(CryptoInfo cryptoInfo, int encrypt, int sk ip) { 637 static void setPatternIfSupported(CryptoInfo cryptoInfo, int encrypt, int sk ip) {
638 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { 638 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
639 cryptoInfo.setPattern(new CryptoInfo.Pattern(encrypt, skip)); 639 cryptoInfo.setPattern(new CryptoInfo.Pattern(encrypt, skip));
640 } 640 }
641 } 641 }
642 } 642 }
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698