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

Side by Side Diff: media/base/android/media_codec_util.cc

Issue 2028433002: blacklist some devices with buggy MediaCodec support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: blacklist some devices with buggy MediaCodec support Created 4 years, 6 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 | « no previous file | 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 #include "media/base/android/media_codec_util.h" 5 #include "media/base/android/media_codec_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ScopedJavaLocalRef<jstring> j_mime = 82 ScopedJavaLocalRef<jstring> j_mime =
83 ConvertUTF8ToJavaString(env, android_mime_type); 83 ConvertUTF8ToJavaString(env, android_mime_type);
84 return Java_MediaCodecUtil_isDecoderSupportedForDevice(env, j_mime.obj()); 84 return Java_MediaCodecUtil_isDecoderSupportedForDevice(env, j_mime.obj());
85 } 85 }
86 86
87 // static 87 // static
88 bool MediaCodecUtil::IsMediaCodecAvailable() { 88 bool MediaCodecUtil::IsMediaCodecAvailable() {
89 // MediaCodec is only available on JB and greater. 89 // MediaCodec is only available on JB and greater.
90 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) 90 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16)
91 return false; 91 return false;
92
92 // Blacklist some devices on Jellybean as for MediaCodec support is buggy. 93 // Blacklist some devices on Jellybean as for MediaCodec support is buggy.
93 // http://crbug.com/365494. 94 // http://crbug.com/365494, http://crbug.com/615872
94 if (base::android::BuildInfo::GetInstance()->sdk_int() == 16) { 95 if (base::android::BuildInfo::GetInstance()->sdk_int() <= 19) {
95 std::string model(base::android::BuildInfo::GetInstance()->model()); 96 std::string model(base::android::BuildInfo::GetInstance()->model());
96 return model != "GT-I9100" && model != "GT-I9300" && model != "GT-N7000"; 97 return model != "GT-I9100" && model != "GT-I9300" && model != "GT-N7000" &&
98 model != "GT-N7100";
97 } 99 }
98 return true; 100 return true;
99 } 101 }
100 102
101 // static 103 // static
102 bool MediaCodecUtil::SupportsSetParameters() { 104 bool MediaCodecUtil::SupportsSetParameters() {
103 // MediaCodec.setParameters() is only available starting with K. 105 // MediaCodec.setParameters() is only available starting with K.
104 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; 106 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19;
105 } 107 }
106 108
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 if (base::StartsWith(model, model_prefixes[i], 239 if (base::StartsWith(model, model_prefixes[i],
238 base::CompareCase::INSENSITIVE_ASCII)) { 240 base::CompareCase::INSENSITIVE_ASCII)) {
239 return false; 241 return false;
240 } 242 }
241 } 243 }
242 244
243 return true; 245 return true;
244 } 246 }
245 247
246 } // namespace media 248 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698