| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 video_config.natural_size(), | 101 video_config.natural_size(), |
| 102 video_config.extra_data(), | 102 video_config.extra_data(), |
| 103 video_config.extra_data_size(), | 103 video_config.extra_data_size(), |
| 104 false); | 104 false); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool VideoDecoderConfig::IsValidConfig() const { | 107 bool VideoDecoderConfig::IsValidConfig() const { |
| 108 return codec_ != kUnknownVideoCodec && | 108 return codec_ != kUnknownVideoCodec && |
| 109 natural_size_.width() > 0 && | 109 natural_size_.width() > 0 && |
| 110 natural_size_.height() > 0 && | 110 natural_size_.height() > 0 && |
| 111 VideoFrame::IsValidConfig( | 111 VideoFrame::IsValidConfig(format_, visible_rect().size(), natural_size_); |
| 112 format_, natural_size_.width(), natural_size_.height()); | |
| 113 } | 112 } |
| 114 | 113 |
| 115 bool VideoDecoderConfig::Matches(const VideoDecoderConfig& config) const { | 114 bool VideoDecoderConfig::Matches(const VideoDecoderConfig& config) const { |
| 116 return ((codec() == config.codec()) && | 115 return ((codec() == config.codec()) && |
| 117 (format() == config.format()) && | 116 (format() == config.format()) && |
| 118 (profile() == config.profile()) && | 117 (profile() == config.profile()) && |
| 119 (coded_size() == config.coded_size()) && | 118 (coded_size() == config.coded_size()) && |
| 120 (visible_rect() == config.visible_rect()) && | 119 (visible_rect() == config.visible_rect()) && |
| 121 (natural_size() == config.natural_size()) && | 120 (natural_size() == config.natural_size()) && |
| 122 (extra_data_size() == config.extra_data_size()) && | 121 (extra_data_size() == config.extra_data_size()) && |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 164 |
| 166 uint8* VideoDecoderConfig::extra_data() const { | 165 uint8* VideoDecoderConfig::extra_data() const { |
| 167 return extra_data_.get(); | 166 return extra_data_.get(); |
| 168 } | 167 } |
| 169 | 168 |
| 170 size_t VideoDecoderConfig::extra_data_size() const { | 169 size_t VideoDecoderConfig::extra_data_size() const { |
| 171 return extra_data_size_; | 170 return extra_data_size_; |
| 172 } | 171 } |
| 173 | 172 |
| 174 } // namespace media | 173 } // namespace media |
| OLD | NEW |