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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 config_height_ = configs.video_size.height(); | 71 config_height_ = configs.video_size.height(); |
72 set_is_content_encrypted(configs.is_video_encrypted); | 72 set_is_content_encrypted(configs.is_video_encrypted); |
73 if (!media_codec_bridge_) { | 73 if (!media_codec_bridge_) { |
74 output_width_ = config_width_; | 74 output_width_ = config_width_; |
75 output_height_ = config_height_; | 75 output_height_ = config_height_; |
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 size, | 82 size_t size, |
82 bool render_output, | 83 bool render_output, |
83 base::TimeDelta current_presentation_timestamp, | 84 base::TimeDelta current_presentation_timestamp, |
84 const ReleaseOutputCompletionCallback& callback) { | 85 const ReleaseOutputCompletionCallback& callback) { |
85 media_codec_bridge_->ReleaseOutputBuffer(output_buffer_index, render_output); | 86 media_codec_bridge_->ReleaseOutputBuffer(output_buffer_index, render_output); |
86 callback.Run(current_presentation_timestamp, current_presentation_timestamp); | 87 callback.Run(current_presentation_timestamp, current_presentation_timestamp); |
87 } | 88 } |
88 | 89 |
89 bool VideoDecoderJob::ComputeTimeToRender() const { | 90 bool VideoDecoderJob::ComputeTimeToRender() const { |
90 return true; | 91 return true; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 return (output_width_ != prev_output_width) || | 158 return (output_width_ != prev_output_width) || |
158 (output_height_ != prev_output_height); | 159 (output_height_ != prev_output_height); |
159 } | 160 } |
160 | 161 |
161 bool VideoDecoderJob::IsProtectedSurfaceRequired() { | 162 bool VideoDecoderJob::IsProtectedSurfaceRequired() { |
162 return is_content_encrypted() && drm_bridge() && | 163 return is_content_encrypted() && drm_bridge() && |
163 drm_bridge()->IsProtectedSurfaceRequired(); | 164 drm_bridge()->IsProtectedSurfaceRequired(); |
164 } | 165 } |
165 | 166 |
166 } // namespace media | 167 } // namespace media |
OLD | NEW |