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

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

Issue 1285733002: Pass buffer offset to PlayOutputBuffer() call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bot Created 5 years, 4 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
« no previous file with comments | « media/base/android/video_decoder_job.h ('k') | 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « media/base/android/video_decoder_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698