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

Side by Side Diff: media/base/android/video_decoder_job.cc

Issue 730133003: Android: use demuxer configs for video output size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: documents UpdateOutputFormat reasoning Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/video_decoder_job.h" 5 #include "media/base/android/video_decoder_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "media/base/android/media_codec_bridge.h" 10 #include "media/base/android/media_codec_bridge.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 void VideoDecoderJob::CurrentDataConsumed(bool is_config_change) { 152 void VideoDecoderJob::CurrentDataConsumed(bool is_config_change) {
153 next_video_data_is_iframe_ = is_config_change; 153 next_video_data_is_iframe_ = is_config_change;
154 } 154 }
155 155
156 bool VideoDecoderJob::UpdateOutputFormat() { 156 bool VideoDecoderJob::UpdateOutputFormat() {
157 if (!media_codec_bridge_) 157 if (!media_codec_bridge_)
158 return false; 158 return false;
159 int prev_output_width = output_width_; 159 int prev_output_width = output_width_;
160 int prev_output_height = output_height_; 160 int prev_output_height = output_height_;
161 media_codec_bridge_->GetOutputFormat(&output_width_, &output_height_); 161 // See b/18224769. The values reported from MediaCodecBridge::GetOutputFormat
162 // correspond to the actual video frame size, but this is not necessarily the
163 // size that should be output.
164 output_width_ = config_width_;
165 output_height_ = config_height_;
162 return (output_width_ != prev_output_width) || 166 return (output_width_ != prev_output_width) ||
163 (output_height_ != prev_output_height); 167 (output_height_ != prev_output_height);
164 } 168 }
165 169
166 bool VideoDecoderJob::IsProtectedSurfaceRequired() { 170 bool VideoDecoderJob::IsProtectedSurfaceRequired() {
167 return is_content_encrypted() && drm_bridge() && 171 return is_content_encrypted() && drm_bridge() &&
168 drm_bridge()->IsProtectedSurfaceRequired(); 172 drm_bridge()->IsProtectedSurfaceRequired();
169 } 173 }
170 174
171 } // namespace media 175 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698