OLD | NEW |
---|---|
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 Loading... | |
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 output_width_ = config_width_; |
qinmin
2014/11/17 19:55:48
please add a link to the internal bug so we can ke
gunsch
2014/11/17 20:04:45
Done.
| |
162 output_height_ = config_height_; | |
162 return (output_width_ != prev_output_width) || | 163 return (output_width_ != prev_output_width) || |
163 (output_height_ != prev_output_height); | 164 (output_height_ != prev_output_height); |
164 } | 165 } |
165 | 166 |
166 bool VideoDecoderJob::IsProtectedSurfaceRequired() { | 167 bool VideoDecoderJob::IsProtectedSurfaceRequired() { |
167 return is_content_encrypted() && drm_bridge() && | 168 return is_content_encrypted() && drm_bridge() && |
168 drm_bridge()->IsProtectedSurfaceRequired(); | 169 drm_bridge()->IsProtectedSurfaceRequired(); |
169 } | 170 } |
170 | 171 |
171 } // namespace media | 172 } // namespace media |
OLD | NEW |