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

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

Issue 2895293002: Android: tidy up outdated version checks. (Closed)
Patch Set: Created 3 years, 7 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
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 #include <vector> 10 #include <vector>
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 // static 366 // static
367 bool MediaCodecUtil::IsPassthroughAudioFormat(AudioCodec codec) { 367 bool MediaCodecUtil::IsPassthroughAudioFormat(AudioCodec codec) {
368 return codec == kCodecAC3 || codec == kCodecEAC3; 368 return codec == kCodecAC3 || codec == kCodecEAC3;
369 } 369 }
370 370
371 // static 371 // static
372 bool MediaCodecUtil::CodecNeedsFlushWorkaround(MediaCodecBridge* codec) { 372 bool MediaCodecUtil::CodecNeedsFlushWorkaround(MediaCodecBridge* codec) {
373 int sdk_int = base::android::BuildInfo::GetInstance()->sdk_int(); 373 int sdk_int = base::android::BuildInfo::GetInstance()->sdk_int();
374 std::string codec_name = codec->GetName(); 374 std::string codec_name = codec->GetName();
375 return sdk_int < 18 || 375 return sdk_int < SDK_VERSION_JELLY_BEAN_MR2 ||
376 (sdk_int == 18 && ("OMX.SEC.avc.dec" == codec_name || 376 (sdk_int == SDK_VERSION_JELLY_BEAN_MR2 &&
377 "OMX.SEC.avc.dec.secure" == codec_name)) || 377 ("OMX.SEC.avc.dec" == codec_name ||
378 (sdk_int == 19 && 378 "OMX.SEC.avc.dec.secure" == codec_name)) ||
379 (sdk_int == SDK_VERSION_KITKAT &&
379 base::StartsWith(base::android::BuildInfo::GetInstance()->model(), 380 base::StartsWith(base::android::BuildInfo::GetInstance()->model(),
380 "SM-G800", base::CompareCase::INSENSITIVE_ASCII) && 381 "SM-G800", base::CompareCase::INSENSITIVE_ASCII) &&
381 ("OMX.Exynos.avc.dec" == codec_name || 382 ("OMX.Exynos.avc.dec" == codec_name ||
382 "OMX.Exynos.avc.dec.secure" == codec_name)); 383 "OMX.Exynos.avc.dec.secure" == codec_name));
383 } 384 }
384 385
385 } // namespace media 386 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaCodecUtil.java ('k') | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698