| OLD | NEW |
| 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/services/mojo_renderer_impl.h" | 5 #include "media/mojo/services/mojo_renderer_impl.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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 weak_factory_(this) { | 26 weak_factory_(this) { |
| 27 DVLOG(1) << __FUNCTION__; | 27 DVLOG(1) << __FUNCTION__; |
| 28 } | 28 } |
| 29 | 29 |
| 30 MojoRendererImpl::~MojoRendererImpl() { | 30 MojoRendererImpl::~MojoRendererImpl() { |
| 31 DVLOG(1) << __FUNCTION__; | 31 DVLOG(1) << __FUNCTION__; |
| 32 DCHECK(task_runner_->BelongsToCurrentThread()); | 32 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 33 // Connection to |remote_media_renderer_| will error-out here. | 33 // Connection to |remote_media_renderer_| will error-out here. |
| 34 } | 34 } |
| 35 | 35 |
| 36 // TODO(xhwang): Support |paint_cb| and |waiting_for_decryption_key_cb|, | 36 // TODO(xhwang): Support |waiting_for_decryption_key_cb| if needed. |
| 37 // if needed. | |
| 38 void MojoRendererImpl::Initialize( | 37 void MojoRendererImpl::Initialize( |
| 39 DemuxerStreamProvider* demuxer_stream_provider, | 38 DemuxerStreamProvider* demuxer_stream_provider, |
| 40 const PipelineStatusCB& init_cb, | 39 const PipelineStatusCB& init_cb, |
| 41 const StatisticsCB& statistics_cb, | 40 const StatisticsCB& statistics_cb, |
| 42 const BufferingStateCB& buffering_state_cb, | 41 const BufferingStateCB& buffering_state_cb, |
| 43 const PaintCB& /* paint_cb */, | |
| 44 const base::Closure& ended_cb, | 42 const base::Closure& ended_cb, |
| 45 const PipelineStatusCB& error_cb, | 43 const PipelineStatusCB& error_cb, |
| 46 const base::Closure& /* waiting_for_decryption_key_cb */) { | 44 const base::Closure& /* waiting_for_decryption_key_cb */) { |
| 47 DVLOG(1) << __FUNCTION__; | 45 DVLOG(1) << __FUNCTION__; |
| 48 DCHECK(task_runner_->BelongsToCurrentThread()); | 46 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 49 DCHECK(demuxer_stream_provider); | 47 DCHECK(demuxer_stream_provider); |
| 50 | 48 |
| 51 demuxer_stream_provider_ = demuxer_stream_provider; | 49 demuxer_stream_provider_ = demuxer_stream_provider; |
| 52 init_cb_ = init_cb; | 50 init_cb_ = init_cb; |
| 53 ended_cb_ = ended_cb; | 51 ended_cb_ = ended_cb; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 197 } |
| 200 | 198 |
| 201 void MojoRendererImpl::OnInitialized() { | 199 void MojoRendererImpl::OnInitialized() { |
| 202 DVLOG(1) << __FUNCTION__; | 200 DVLOG(1) << __FUNCTION__; |
| 203 DCHECK(task_runner_->BelongsToCurrentThread()); | 201 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 204 if (!init_cb_.is_null()) | 202 if (!init_cb_.is_null()) |
| 205 base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK); | 203 base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK); |
| 206 } | 204 } |
| 207 | 205 |
| 208 } // namespace media | 206 } // namespace media |
| OLD | NEW |