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

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

Issue 1764813002: Catch CodecException in MediaCodecBridge and return MEDIA_CODEC_ERROR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dale's comment Created 4 years, 9 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
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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return STATUS_FAILURE; 144 return STATUS_FAILURE;
145 145
146 return STATUS_SUCCESS; 146 return STATUS_SUCCESS;
147 } 147 }
148 148
149 bool VideoDecoderJob::UpdateOutputFormat() { 149 bool VideoDecoderJob::UpdateOutputFormat() {
150 if (!media_codec_bridge_) 150 if (!media_codec_bridge_)
151 return false; 151 return false;
152 int prev_output_width = output_width_; 152 int prev_output_width = output_width_;
153 int prev_output_height = output_height_; 153 int prev_output_height = output_height_;
154 // See b/18224769. The values reported from MediaCodecBridge::GetOutputFormat 154 // See b/18224769. The values reported from MediaCodecBridge::GetOutputSize
155 // correspond to the actual video frame size, but this is not necessarily the 155 // correspond to the actual video frame size, but this is not necessarily the
156 // size that should be output. 156 // size that should be output.
157 output_width_ = config_width_; 157 output_width_ = config_width_;
158 output_height_ = config_height_; 158 output_height_ = config_height_;
159 return (output_width_ != prev_output_width) || 159 return (output_width_ != prev_output_width) ||
160 (output_height_ != prev_output_height); 160 (output_height_ != prev_output_height);
161 } 161 }
162 162
163 bool VideoDecoderJob::IsProtectedSurfaceRequired() { 163 bool VideoDecoderJob::IsProtectedSurfaceRequired() {
164 return is_content_encrypted() && drm_bridge() && 164 return is_content_encrypted() && drm_bridge() &&
165 drm_bridge()->IsProtectedSurfaceRequired(); 165 drm_bridge()->IsProtectedSurfaceRequired();
166 } 166 }
167 167
168 } // namespace media 168 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/sdk_media_codec_bridge.cc ('k') | media/base/android/video_media_codec_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698