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

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

Issue 363813002: Update to Pipeline Metadata and Decoder Stream for Orientation Data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: VideoRotation enum added Created 6 years, 5 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_ = kRotate0;
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
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 media::VideoRotation VideoDecoderConfig::rotation() const {
172 return rotation_;
173 }
174
175 void VideoDecoderConfig::set_rotation(media::VideoRotation rotation) {
176 rotation_ = rotation;
177 }
178
170 } // namespace media 179 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698