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

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

Issue 1796393002: Remove Exynos from MediaCodec blacklist. Limit MediaTek blacklist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert hunks. Created 4 years, 9 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/media_codec_util.h ('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 #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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 break; 196 break;
197 } 197 }
198 } 198 }
199 } 199 }
200 DVLOG(1) << __PRETTY_FUNCTION__ << "Default codec for " << mime_type << " : " 200 DVLOG(1) << __PRETTY_FUNCTION__ << "Default codec for " << mime_type << " : "
201 << codec_name; 201 << codec_name;
202 // It would be nice if MediaCodecInfo externalized some notion of 202 // It would be nice if MediaCodecInfo externalized some notion of
203 // HW-acceleration but it doesn't. Android Media guidance is that the 203 // HW-acceleration but it doesn't. Android Media guidance is that the
204 // "OMX.google" prefix is always used for SW decoders, so that's what we 204 // "OMX.google" prefix is always used for SW decoders, so that's what we
205 // use. "OMX.SEC.*" codec is Samsung software implementation - report it 205 // use. "OMX.SEC.*" codec is Samsung software implementation - report it
206 // as unaccelerated as well. Also temporary blacklist Exynos and MediaTek 206 // as unaccelerated as well. MediaTek hardware vp8 is known slower than
207 // devices while HW decoder video freezes and distortions are 207 // the software implementation. http://crbug.com/446974.
208 // investigated - http://crbug.com/446974.
209 if (codec_name.length() > 0) { 208 if (codec_name.length() > 0) {
210 return (base::StartsWith(codec_name, "OMX.google.", 209 return base::StartsWith(codec_name, "OMX.google.",
211 base::CompareCase::SENSITIVE) || 210 base::CompareCase::SENSITIVE) ||
212 base::StartsWith(codec_name, "OMX.SEC.", 211 base::StartsWith(codec_name, "OMX.SEC.",
213 base::CompareCase::SENSITIVE) || 212 base::CompareCase::SENSITIVE) ||
214 base::StartsWith(codec_name, "OMX.MTK.", 213 (base::StartsWith(codec_name, "OMX.MTK.",
215 base::CompareCase::SENSITIVE) || 214 base::CompareCase::SENSITIVE) &&
216 base::StartsWith(codec_name, "OMX.Exynos.", 215 mime_type == "video/x-vnd.on2.vp8");
217 base::CompareCase::SENSITIVE));
218 } 216 }
219 return true; 217 return true;
220 } 218 }
221 219
222 // static 220 // static
223 bool MediaCodecUtil::IsHLSPath(const GURL& url) { 221 bool MediaCodecUtil::IsHLSPath(const GURL& url) {
224 if (!url.SchemeIsHTTPOrHTTPS() && !url.SchemeIsFile()) 222 if (!url.SchemeIsHTTPOrHTTPS() && !url.SchemeIsFile())
225 return false; 223 return false;
226 224
227 std::string path = url.path(); 225 std::string path = url.path();
(...skipping 20 matching lines...) Expand all
248 // static 246 // static
249 bool MediaCodecUtil::IsVp8DecoderAvailable() { 247 bool MediaCodecUtil::IsVp8DecoderAvailable() {
250 if (!IsMediaCodecAvailable()) 248 if (!IsMediaCodecAvailable())
251 return false; 249 return false;
252 250
253 JNIEnv* env = AttachCurrentThread(); 251 JNIEnv* env = AttachCurrentThread();
254 ScopedJavaLocalRef<jstring> j_mime = ConvertUTF8ToJavaString(env, "vp8"); 252 ScopedJavaLocalRef<jstring> j_mime = ConvertUTF8ToJavaString(env, "vp8");
255 return Java_MediaCodecUtil_isDecoderSupportedForDevice(env, j_mime.obj()); 253 return Java_MediaCodecUtil_isDecoderSupportedForDevice(env, j_mime.obj());
256 } 254 }
257 255
256 // static
257 bool MediaCodecUtil::IsVp8EncoderAvailable() {
258 // Currently the vp8 encoder and decoder blacklists cover the same devices,
259 // but we have a second method for clarity in future issues.
260 return IsVp8DecoderAvailable();
261 }
262
258 } // namespace media 263 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698