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

Side by Side Diff: media/base/android/media_codec_video_decoder.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/media_codec_video_decoder.h ('k') | media/base/android/media_decoder_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/media_codec_video_decoder.h" 5 #include "media/base/android/media_codec_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/base/android/media_codec_bridge.h" 9 #include "media/base/android/media_codec_bridge.h"
10 #include "media/base/buffers.h" 10 #include "media/base/buffers.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // correspond to the actual video frame size, but this is not necessarily the 178 // correspond to the actual video frame size, but this is not necessarily the
179 // size that should be output. 179 // size that should be output.
180 video_size_ = configs_.video_size; 180 video_size_ = configs_.video_size;
181 if (video_size_ != prev_size) { 181 if (video_size_ != prev_size) {
182 media_task_runner_->PostTask( 182 media_task_runner_->PostTask(
183 FROM_HERE, base::Bind(video_size_changed_cb_, video_size_)); 183 FROM_HERE, base::Bind(video_size_changed_cb_, video_size_));
184 } 184 }
185 } 185 }
186 186
187 void MediaCodecVideoDecoder::Render(int buffer_index, 187 void MediaCodecVideoDecoder::Render(int buffer_index,
188 size_t offset,
188 size_t size, 189 size_t size,
189 bool render_output, 190 bool render_output,
190 base::TimeDelta pts, 191 base::TimeDelta pts,
191 bool eos_encountered) { 192 bool eos_encountered) {
192 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); 193 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread());
193 194
194 DVLOG(2) << class_name() << "::" << __FUNCTION__ << " pts:" << pts 195 DVLOG(2) << class_name() << "::" << __FUNCTION__ << " pts:" << pts
195 << " index:" << buffer_index << " size:" << size 196 << " index:" << buffer_index << " size:" << size
196 << (eos_encountered ? " EOS" : ""); 197 << (eos_encountered ? " EOS" : "");
197 198
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 280
280 // |update_current_time_cb_| might be null if there is audio stream. 281 // |update_current_time_cb_| might be null if there is audio stream.
281 // Do not update current time for stand-alone EOS frames. 282 // Do not update current time for stand-alone EOS frames.
282 if (!update_current_time_cb_.is_null() && !(eos_encountered && !size)) { 283 if (!update_current_time_cb_.is_null() && !(eos_encountered && !size)) {
283 media_task_runner_->PostTask(FROM_HERE, 284 media_task_runner_->PostTask(FROM_HERE,
284 base::Bind(update_current_time_cb_, pts, pts)); 285 base::Bind(update_current_time_cb_, pts, pts));
285 } 286 }
286 } 287 }
287 288
288 } // namespace media 289 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_video_decoder.h ('k') | media/base/android/media_decoder_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698