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

Side by Side Diff: media/mojo/clients/mojo_renderer.cc

Issue 2237243002: CL for perf tryjob on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/mojo/clients/mojo_renderer.h" 5 #include "media/mojo/clients/mojo_renderer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 DCHECK(task_runner_->BelongsToCurrentThread()); 190 DCHECK(task_runner_->BelongsToCurrentThread());
191 DCHECK(remote_renderer_.is_bound()); 191 DCHECK(remote_renderer_.is_bound());
192 192
193 return !!demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO); 193 return !!demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO);
194 } 194 }
195 195
196 void MojoRenderer::OnTimeUpdate(int64_t time_usec, int64_t max_time_usec) { 196 void MojoRenderer::OnTimeUpdate(int64_t time_usec, int64_t max_time_usec) {
197 DVLOG(3) << __FUNCTION__ << ": " << time_usec << ", " << max_time_usec; 197 DVLOG(3) << __FUNCTION__ << ": " << time_usec << ", " << max_time_usec;
198 DCHECK(task_runner_->BelongsToCurrentThread()); 198 DCHECK(task_runner_->BelongsToCurrentThread());
199 199
200 base::AutoLock auto_lock(lock_); 200 {
201 time_ = base::TimeDelta::FromMicroseconds(time_usec); 201 base::AutoLock auto_lock(lock_);
202 time_ = base::TimeDelta::FromMicroseconds(time_usec);
203 }
204 // TODO(alokp): Plumb reference time through mojo interface.
205 client_->OnTimeUpdate(time_, time_, base::TimeTicks::Now());
202 } 206 }
203 207
204 void MojoRenderer::OnBufferingStateChange(mojom::BufferingState state) { 208 void MojoRenderer::OnBufferingStateChange(mojom::BufferingState state) {
205 DVLOG(2) << __FUNCTION__; 209 DVLOG(2) << __FUNCTION__;
206 DCHECK(task_runner_->BelongsToCurrentThread()); 210 DCHECK(task_runner_->BelongsToCurrentThread());
207 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state)); 211 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state));
208 } 212 }
209 213
210 void MojoRenderer::OnEnded() { 214 void MojoRenderer::OnEnded() {
211 DVLOG(1) << __FUNCTION__; 215 DVLOG(1) << __FUNCTION__;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); 339 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED);
336 340
337 if (!flush_cb_.is_null()) 341 if (!flush_cb_.is_null())
338 base::ResetAndReturn(&flush_cb_).Run(); 342 base::ResetAndReturn(&flush_cb_).Run();
339 343
340 if (!cdm_attached_cb_.is_null()) 344 if (!cdm_attached_cb_.is_null())
341 base::ResetAndReturn(&cdm_attached_cb_).Run(false); 345 base::ResetAndReturn(&cdm_attached_cb_).Run(false);
342 } 346 }
343 347
344 } // namespace media 348 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_renderer_algorithm_unittest.cc ('k') | media/mojo/services/mojo_renderer_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698