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

Side by Side Diff: media/base/video_decoder_config.cc

Issue 10824141: Remove VideoDecoder::natural_size() & added VideoFrame::natural_size(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright year. Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « media/base/video_decoder.h ('k') | media/base/video_frame.h » ('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 (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
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
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
OLDNEW
« no previous file with comments | « media/base/video_decoder.h ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698