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

Side by Side Diff: media/base/pipeline_impl.cc

Issue 1978973002: Moves video frame callbacks from VideoFrameCompositor to Renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addresses comments Created 4 years, 7 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/pipeline_impl.h ('k') | media/base/pipeline_impl_unittest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pipeline_impl.h" 5 #include "media/base/pipeline_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 393
394 void PipelineImpl::OnWaitingForDecryptionKey() { 394 void PipelineImpl::OnWaitingForDecryptionKey() {
395 DCHECK(media_task_runner_->BelongsToCurrentThread()); 395 DCHECK(media_task_runner_->BelongsToCurrentThread());
396 396
397 main_task_runner_->PostTask( 397 main_task_runner_->PostTask(
398 FROM_HERE, 398 FROM_HERE,
399 base::Bind(&Pipeline::Client::OnWaitingForDecryptionKey, weak_client_)); 399 base::Bind(&Pipeline::Client::OnWaitingForDecryptionKey, weak_client_));
400 } 400 }
401 401
402 void PipelineImpl::OnVideoNaturalSizeChange(const gfx::Size& size) {
403 DCHECK(media_task_runner_->BelongsToCurrentThread());
404
405 main_task_runner_->PostTask(
406 FROM_HERE, base::Bind(&Pipeline::Client::OnVideoNaturalSizeChange,
407 weak_client_, size));
408 }
409
410 void PipelineImpl::OnVideoOpacityChange(bool opaque) {
411 DCHECK(media_task_runner_->BelongsToCurrentThread());
412
413 main_task_runner_->PostTask(
414 FROM_HERE, base::Bind(&Pipeline::Client::OnVideoOpacityChange,
415 weak_client_, opaque));
416 }
417
402 void PipelineImpl::SetDuration(TimeDelta duration) { 418 void PipelineImpl::SetDuration(TimeDelta duration) {
403 // TODO(alokp): Add thread DCHECK after ensuring that all Demuxer 419 // TODO(alokp): Add thread DCHECK after ensuring that all Demuxer
404 // implementations call DemuxerHost on the media thread. 420 // implementations call DemuxerHost on the media thread.
405 DCHECK(IsRunning()); 421 DCHECK(IsRunning());
406 media_log_->AddEvent(media_log_->CreateTimeEvent(MediaLogEvent::DURATION_SET, 422 media_log_->AddEvent(media_log_->CreateTimeEvent(MediaLogEvent::DURATION_SET,
407 "duration", duration)); 423 "duration", duration));
408 UMA_HISTOGRAM_LONG_TIMES("Media.Duration", duration); 424 UMA_HISTOGRAM_LONG_TIMES("Media.Duration", duration);
409 425
410 base::AutoLock auto_lock(lock_); 426 base::AutoLock auto_lock(lock_);
411 duration_ = duration; 427 duration_ = duration;
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 if (demuxer_->GetStream(DemuxerStream::AUDIO)) { 950 if (demuxer_->GetStream(DemuxerStream::AUDIO)) {
935 metadata.has_audio = true; 951 metadata.has_audio = true;
936 } 952 }
937 953
938 main_task_runner_->PostTask( 954 main_task_runner_->PostTask(
939 FROM_HERE, 955 FROM_HERE,
940 base::Bind(&Pipeline::Client::OnMetadata, weak_client_, metadata)); 956 base::Bind(&Pipeline::Client::OnMetadata, weak_client_, metadata));
941 } 957 }
942 958
943 } // namespace media 959 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.h ('k') | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698