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

Side by Side Diff: chromecast/media/base/supported_codec_profile_levels_memo.cc

Issue 2697033003: [Chromecast] Fix IsSupportedVideoConfig() on Android. (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 | « no previous file | media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "chromecast/media/base/supported_codec_profile_levels_memo.h" 5 #include "chromecast/media/base/supported_codec_profile_levels_memo.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chromecast/public/media/decoder_config.h" 8 #include "chromecast/public/media/decoder_config.h"
9 9
10 namespace chromecast { 10 namespace chromecast {
(...skipping 16 matching lines...) Expand all
27 bool SupportedCodecProfileLevelsMemo::IsSupportedVideoConfig( 27 bool SupportedCodecProfileLevelsMemo::IsSupportedVideoConfig(
28 VideoCodec codec, 28 VideoCodec codec,
29 VideoProfile profile, 29 VideoProfile profile,
30 int level) const { 30 int level) const {
31 DCHECK(thread_checker_.CalledOnValidThread()); 31 DCHECK(thread_checker_.CalledOnValidThread());
32 DVLOG(1) << __func__ << "(" << codec << ", " << profile << ", " << level 32 DVLOG(1) << __func__ << "(" << codec << ", " << profile << ", " << level
33 << ")"; 33 << ")";
34 for (const auto& supported_profile_info : codec_profile_levels_) { 34 for (const auto& supported_profile_info : codec_profile_levels_) {
35 if (codec == supported_profile_info.codec && 35 if (codec == supported_profile_info.codec &&
36 profile == supported_profile_info.profile && 36 profile == supported_profile_info.profile &&
37 level == supported_profile_info.level) { 37 level <= supported_profile_info.level) {
38 return true; 38 return true;
39 } 39 }
40 } 40 }
41 return false; 41 return false;
42 } 42 }
43 43
44 } // namespace media 44 } // namespace media
45 } // namespace chromecast 45 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698