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

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: 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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // correspond to the actual video frame size, but this is not necessarily the 177 // correspond to the actual video frame size, but this is not necessarily the
178 // size that should be output. 178 // size that should be output.
179 video_size_ = configs_.video_size; 179 video_size_ = configs_.video_size;
180 if (video_size_ != prev_size) { 180 if (video_size_ != prev_size) {
181 media_task_runner_->PostTask( 181 media_task_runner_->PostTask(
182 FROM_HERE, base::Bind(video_size_changed_cb_, video_size_)); 182 FROM_HERE, base::Bind(video_size_changed_cb_, video_size_));
183 } 183 }
184 } 184 }
185 185
186 void MediaCodecVideoDecoder::Render(int buffer_index, 186 void MediaCodecVideoDecoder::Render(int buffer_index,
187 size_t offset,
187 size_t size, 188 size_t size,
188 bool render_output, 189 bool render_output,
189 base::TimeDelta pts, 190 base::TimeDelta pts,
190 bool eos_encountered) { 191 bool eos_encountered) {
191 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); 192 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread());
192 193
193 DVLOG(2) << class_name() << "::" << __FUNCTION__ << " pts:" << pts 194 DVLOG(2) << class_name() << "::" << __FUNCTION__ << " pts:" << pts
194 << " index:" << buffer_index << " size:" << size 195 << " index:" << buffer_index << " size:" << size
195 << (eos_encountered ? " EOS" : ""); 196 << (eos_encountered ? " EOS" : "");
196 197
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 275
275 // |update_current_time_cb_| might be null if there is audio stream. 276 // |update_current_time_cb_| might be null if there is audio stream.
276 // Do not update current time for stand-alone EOS frames. 277 // Do not update current time for stand-alone EOS frames.
277 if (!update_current_time_cb_.is_null() && !(eos_encountered && !size)) { 278 if (!update_current_time_cb_.is_null() && !(eos_encountered && !size)) {
278 media_task_runner_->PostTask(FROM_HERE, 279 media_task_runner_->PostTask(FROM_HERE,
279 base::Bind(update_current_time_cb_, pts, pts)); 280 base::Bind(update_current_time_cb_, pts, pts));
280 } 281 }
281 } 282 }
282 283
283 } // namespace media 284 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698