| 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/filters/renderer_impl.h" | 5 #include "media/filters/renderer_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 base::Bind(&RendererImpl::OnVideoRendererInitializeDone, weak_this_); | 230 base::Bind(&RendererImpl::OnVideoRendererInitializeDone, weak_this_); |
| 231 | 231 |
| 232 if (!demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO)) { | 232 if (!demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO)) { |
| 233 video_renderer_.reset(); | 233 video_renderer_.reset(); |
| 234 task_runner_->PostTask(FROM_HERE, base::Bind(done_cb, PIPELINE_OK)); | 234 task_runner_->PostTask(FROM_HERE, base::Bind(done_cb, PIPELINE_OK)); |
| 235 return; | 235 return; |
| 236 } | 236 } |
| 237 | 237 |
| 238 video_renderer_->Initialize( | 238 video_renderer_->Initialize( |
| 239 demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO), | 239 demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO), |
| 240 demuxer_stream_provider_->GetLiveness() == | |
| 241 DemuxerStreamProvider::LIVENESS_LIVE, | |
| 242 done_cb, | 240 done_cb, |
| 243 base::Bind(&RendererImpl::OnUpdateStatistics, weak_this_), | 241 base::Bind(&RendererImpl::OnUpdateStatistics, weak_this_), |
| 244 base::Bind(&RendererImpl::OnBufferingStateChanged, | 242 base::Bind(&RendererImpl::OnBufferingStateChanged, |
| 245 weak_this_, | 243 weak_this_, |
| 246 &video_buffering_state_), | 244 &video_buffering_state_), |
| 247 base::Bind(&RendererImpl::OnVideoRendererEnded, weak_this_), | 245 base::Bind(&RendererImpl::OnVideoRendererEnded, weak_this_), |
| 248 base::Bind(&RendererImpl::OnError, weak_this_), | 246 base::Bind(&RendererImpl::OnError, weak_this_), |
| 249 base::Bind(&RendererImpl::GetMediaTimeForSyncingVideo, | 247 base::Bind(&RendererImpl::GetMediaTimeForSyncingVideo, |
| 250 base::Unretained(this))); | 248 base::Unretained(this))); |
| 251 } | 249 } |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 DCHECK(task_runner_->BelongsToCurrentThread()); | 494 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 497 | 495 |
| 498 if (!init_cb_.is_null()) | 496 if (!init_cb_.is_null()) |
| 499 base::ResetAndReturn(&init_cb_).Run(); | 497 base::ResetAndReturn(&init_cb_).Run(); |
| 500 | 498 |
| 501 if (!flush_cb_.is_null()) | 499 if (!flush_cb_.is_null()) |
| 502 base::ResetAndReturn(&flush_cb_).Run(); | 500 base::ResetAndReturn(&flush_cb_).Run(); |
| 503 } | 501 } |
| 504 | 502 |
| 505 } // namespace media | 503 } // namespace media |
| OLD | NEW |