| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |