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

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

Issue 2693653003: Merge M57: "Make setOutputSurface, encrypted capabilities. Blacklist hi6210sft." (Closed)
Patch Set: Created 3 years, 10 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') | media/filters/gpu_video_decoder.cc » ('j') | 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 if (base::StartsWith(model, model_prefixes[i], 258 if (base::StartsWith(model, model_prefixes[i],
259 base::CompareCase::INSENSITIVE_ASCII)) { 259 base::CompareCase::INSENSITIVE_ASCII)) {
260 return false; 260 return false;
261 } 261 }
262 } 262 }
263 263
264 return true; 264 return true;
265 } 265 }
266 266
267 // static 267 // static
268 bool MediaCodecUtil::IsSetOutputSurfaceSupported() {
269 JNIEnv* env = AttachCurrentThread();
270 return Java_MediaCodecUtil_isSetOutputSurfaceSupported(env);
271 }
272
273 // static
268 bool MediaCodecUtil::CodecNeedsFlushWorkaround(MediaCodecBridge* codec) { 274 bool MediaCodecUtil::CodecNeedsFlushWorkaround(MediaCodecBridge* codec) {
269 int sdk_int = base::android::BuildInfo::GetInstance()->sdk_int(); 275 int sdk_int = base::android::BuildInfo::GetInstance()->sdk_int();
270 std::string codec_name = codec->GetName(); 276 std::string codec_name = codec->GetName();
271 return sdk_int < 18 || 277 return sdk_int < 18 ||
272 (sdk_int == 18 && ("OMX.SEC.avc.dec" == codec_name || 278 (sdk_int == 18 && ("OMX.SEC.avc.dec" == codec_name ||
273 "OMX.SEC.avc.dec.secure" == codec_name)) || 279 "OMX.SEC.avc.dec.secure" == codec_name)) ||
274 (sdk_int == 19 && 280 (sdk_int == 19 &&
275 base::StartsWith(base::android::BuildInfo::GetInstance()->model(), 281 base::StartsWith(base::android::BuildInfo::GetInstance()->model(),
276 "SM-G800", base::CompareCase::INSENSITIVE_ASCII) && 282 "SM-G800", base::CompareCase::INSENSITIVE_ASCII) &&
277 ("OMX.Exynos.avc.dec" == codec_name || 283 ("OMX.Exynos.avc.dec" == codec_name ||
278 "OMX.Exynos.avc.dec.secure" == codec_name)); 284 "OMX.Exynos.avc.dec.secure" == codec_name));
279 } 285 }
280 286
281 } // namespace media 287 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_util.h ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698