| 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 <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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 void VideoDecoderJob::ReleaseOutputBuffer( | 79 void VideoDecoderJob::ReleaseOutputBuffer( |
| 80 int output_buffer_index, | 80 int output_buffer_index, |
| 81 size_t offset, | 81 size_t offset, |
| 82 size_t size, | 82 size_t size, |
| 83 bool render_output, | 83 bool render_output, |
| 84 bool is_late_frame, | 84 bool is_late_frame, |
| 85 base::TimeDelta current_presentation_timestamp, | 85 base::TimeDelta current_presentation_timestamp, |
| 86 const ReleaseOutputCompletionCallback& callback) { | 86 MediaCodecStatus status, |
| 87 const DecoderCallback& callback) { |
| 87 media_codec_bridge_->ReleaseOutputBuffer(output_buffer_index, render_output); | 88 media_codec_bridge_->ReleaseOutputBuffer(output_buffer_index, render_output); |
| 88 callback.Run(is_late_frame, current_presentation_timestamp, | 89 callback.Run(status, is_late_frame, current_presentation_timestamp, |
| 89 current_presentation_timestamp); | 90 current_presentation_timestamp); |
| 90 } | 91 } |
| 91 | 92 |
| 92 bool VideoDecoderJob::ComputeTimeToRender() const { | 93 bool VideoDecoderJob::ComputeTimeToRender() const { |
| 93 return true; | 94 return true; |
| 94 } | 95 } |
| 95 | 96 |
| 96 bool VideoDecoderJob::IsCodecReconfigureNeeded( | 97 bool VideoDecoderJob::IsCodecReconfigureNeeded( |
| 97 const DemuxerConfigs& configs) const { | 98 const DemuxerConfigs& configs) const { |
| 98 if (!media_codec_bridge_) | 99 if (!media_codec_bridge_) |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 return (output_width_ != prev_output_width) || | 160 return (output_width_ != prev_output_width) || |
| 160 (output_height_ != prev_output_height); | 161 (output_height_ != prev_output_height); |
| 161 } | 162 } |
| 162 | 163 |
| 163 bool VideoDecoderJob::IsProtectedSurfaceRequired() { | 164 bool VideoDecoderJob::IsProtectedSurfaceRequired() { |
| 164 return is_content_encrypted() && drm_bridge() && | 165 return is_content_encrypted() && drm_bridge() && |
| 165 drm_bridge()->IsProtectedSurfaceRequired(); | 166 drm_bridge()->IsProtectedSurfaceRequired(); |
| 166 } | 167 } |
| 167 | 168 |
| 168 } // namespace media | 169 } // namespace media |
| OLD | NEW |