| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 codec_ = codec; | 83 codec_ = codec; |
| 84 profile_ = profile; | 84 profile_ = profile; |
| 85 format_ = format; | 85 format_ = format; |
| 86 coded_size_ = coded_size; | 86 coded_size_ = coded_size; |
| 87 visible_rect_ = visible_rect; | 87 visible_rect_ = visible_rect; |
| 88 natural_size_ = natural_size; | 88 natural_size_ = natural_size; |
| 89 extra_data_.assign(extra_data, extra_data + extra_data_size); | 89 extra_data_.assign(extra_data, extra_data + extra_data_size); |
| 90 is_encrypted_ = is_encrypted; | 90 is_encrypted_ = is_encrypted; |
| 91 rotation_ = 0; |
| 91 } | 92 } |
| 92 | 93 |
| 93 bool VideoDecoderConfig::IsValidConfig() const { | 94 bool VideoDecoderConfig::IsValidConfig() const { |
| 94 return codec_ != kUnknownVideoCodec && | 95 return codec_ != kUnknownVideoCodec && |
| 95 natural_size_.width() > 0 && | 96 natural_size_.width() > 0 && |
| 96 natural_size_.height() > 0 && | 97 natural_size_.height() > 0 && |
| 97 VideoFrame::IsValidConfig(format_, coded_size_, visible_rect_, | 98 VideoFrame::IsValidConfig(format_, coded_size_, visible_rect_, |
| 98 natural_size_); | 99 natural_size_); |
| 99 } | 100 } |
| 100 | 101 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 161 } |
| 161 | 162 |
| 162 size_t VideoDecoderConfig::extra_data_size() const { | 163 size_t VideoDecoderConfig::extra_data_size() const { |
| 163 return extra_data_.size(); | 164 return extra_data_.size(); |
| 164 } | 165 } |
| 165 | 166 |
| 166 bool VideoDecoderConfig::is_encrypted() const { | 167 bool VideoDecoderConfig::is_encrypted() const { |
| 167 return is_encrypted_; | 168 return is_encrypted_; |
| 168 } | 169 } |
| 169 | 170 |
| 171 int VideoDecoderConfig::rotation() const { |
| 172 return rotation_; |
| 173 } |
| 174 |
| 175 void VideoDecoderConfig::set_rotation(int rotation) { |
| 176 rotation_ = rotation; |
| 177 } |
| 178 |
| 170 } // namespace media | 179 } // namespace media |
| OLD | NEW |