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

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

Issue 66953005: Remove media::BindToLoop() in favour of media::BindToCurrentLoop(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix cros Created 6 years, 11 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 | Annotate | Revision Log
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/media_decoder_job.h" 5 #include "media/base/android/media_decoder_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 MEDIA_CODEC_DEQUEUE_INPUT_AGAIN_LATER, 251 MEDIA_CODEC_DEQUEUE_INPUT_AGAIN_LATER,
252 kNoTimestamp(), 252 kNoTimestamp(),
253 0)); 253 0));
254 return; 254 return;
255 } 255 }
256 256
257 decoder_task_runner_->PostTask(FROM_HERE, base::Bind( 257 decoder_task_runner_->PostTask(FROM_HERE, base::Bind(
258 &MediaDecoderJob::DecodeInternal, base::Unretained(this), 258 &MediaDecoderJob::DecodeInternal, base::Unretained(this),
259 received_data_.access_units[access_unit_index_], 259 received_data_.access_units[access_unit_index_],
260 start_time_ticks, start_presentation_timestamp, needs_flush_, 260 start_time_ticks, start_presentation_timestamp, needs_flush_,
261 media::BindToLoop(ui_task_runner_, base::Bind( 261 media::BindToCurrentLoop(base::Bind(
262 &MediaDecoderJob::OnDecodeCompleted, base::Unretained(this))))); 262 &MediaDecoderJob::OnDecodeCompleted, base::Unretained(this)))));
263 needs_flush_ = false; 263 needs_flush_ = false;
264 } 264 }
265 265
266 void MediaDecoderJob::DecodeInternal( 266 void MediaDecoderJob::DecodeInternal(
267 const AccessUnit& unit, 267 const AccessUnit& unit,
268 const base::TimeTicks& start_time_ticks, 268 const base::TimeTicks& start_time_ticks,
269 const base::TimeDelta& start_presentation_timestamp, 269 const base::TimeDelta& start_presentation_timestamp,
270 bool needs_flush, 270 bool needs_flush,
271 const MediaDecoderJob::DecoderCallback& callback) { 271 const MediaDecoderJob::DecoderCallback& callback) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 // Do nothing. 422 // Do nothing.
423 break; 423 break;
424 }; 424 };
425 425
426 stop_decode_pending_ = false; 426 stop_decode_pending_ = false;
427 base::ResetAndReturn(&decode_cb_).Run(status, presentation_timestamp, 427 base::ResetAndReturn(&decode_cb_).Run(status, presentation_timestamp,
428 audio_output_bytes); 428 audio_output_bytes);
429 } 429 }
430 430
431 } // namespace media 431 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698