| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/video_decoder_config.h" | 5 #include "media/base/video_decoder_config.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 video_config.extra_data(), | 107 video_config.extra_data(), |
| 108 video_config.extra_data_size(), | 108 video_config.extra_data_size(), |
| 109 video_config.is_encrypted(), | 109 video_config.is_encrypted(), |
| 110 false); | 110 false); |
| 111 } | 111 } |
| 112 | 112 |
| 113 bool VideoDecoderConfig::IsValidConfig() const { | 113 bool VideoDecoderConfig::IsValidConfig() const { |
| 114 return codec_ != kUnknownVideoCodec && | 114 return codec_ != kUnknownVideoCodec && |
| 115 natural_size_.width() > 0 && | 115 natural_size_.width() > 0 && |
| 116 natural_size_.height() > 0 && | 116 natural_size_.height() > 0 && |
| 117 VideoFrame::IsValidConfig(format_, visible_rect().size(), natural_size_); | 117 VideoFrame::IsValidConfig(format_, coded_size_, visible_rect_, |
| 118 natural_size_); |
| 118 } | 119 } |
| 119 | 120 |
| 120 bool VideoDecoderConfig::Matches(const VideoDecoderConfig& config) const { | 121 bool VideoDecoderConfig::Matches(const VideoDecoderConfig& config) const { |
| 121 return ((codec() == config.codec()) && | 122 return ((codec() == config.codec()) && |
| 122 (format() == config.format()) && | 123 (format() == config.format()) && |
| 123 (profile() == config.profile()) && | 124 (profile() == config.profile()) && |
| 124 (coded_size() == config.coded_size()) && | 125 (coded_size() == config.coded_size()) && |
| 125 (visible_rect() == config.visible_rect()) && | 126 (visible_rect() == config.visible_rect()) && |
| 126 (natural_size() == config.natural_size()) && | 127 (natural_size() == config.natural_size()) && |
| 127 (extra_data_size() == config.extra_data_size()) && | 128 (extra_data_size() == config.extra_data_size()) && |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 179 |
| 179 size_t VideoDecoderConfig::extra_data_size() const { | 180 size_t VideoDecoderConfig::extra_data_size() const { |
| 180 return extra_data_size_; | 181 return extra_data_size_; |
| 181 } | 182 } |
| 182 | 183 |
| 183 bool VideoDecoderConfig::is_encrypted() const { | 184 bool VideoDecoderConfig::is_encrypted() const { |
| 184 return is_encrypted_; | 185 return is_encrypted_; |
| 185 } | 186 } |
| 186 | 187 |
| 187 } // namespace media | 188 } // namespace media |
| OLD | NEW |