| 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/renderers/renderer_impl.h" | 5 #include "media/renderers/renderer_impl.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.h" | 10 #include "base/callback.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 return true; | 346 return true; |
| 347 } | 347 } |
| 348 | 348 |
| 349 return time_source_->GetWallClockTimes(media_timestamps, wall_clock_times); | 349 return time_source_->GetWallClockTimes(media_timestamps, wall_clock_times); |
| 350 } | 350 } |
| 351 | 351 |
| 352 bool RendererImpl::HasEncryptedStream() { | 352 bool RendererImpl::HasEncryptedStream() { |
| 353 std::vector<DemuxerStream*> demuxer_streams = | 353 std::vector<DemuxerStream*> demuxer_streams = |
| 354 media_resource_->GetAllStreams(); | 354 media_resource_->GetAllStreams(); |
| 355 | 355 |
| 356 for (auto* stream : demuxer_streams) { | 356 for (const auto& stream : demuxer_streams) { |
| 357 if (stream->type() == DemuxerStream::AUDIO && | 357 if (stream->type() == DemuxerStream::AUDIO && |
| 358 stream->audio_decoder_config().is_encrypted()) | 358 stream->audio_decoder_config().is_encrypted()) |
| 359 return true; | 359 return true; |
| 360 if (stream->type() == DemuxerStream::VIDEO && | 360 if (stream->type() == DemuxerStream::VIDEO && |
| 361 stream->video_decoder_config().is_encrypted()) | 361 stream->video_decoder_config().is_encrypted()) |
| 362 return true; | 362 return true; |
| 363 } | 363 } |
| 364 | 364 |
| 365 return false; | 365 return false; |
| 366 } | 366 } |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 DCHECK(task_runner_->BelongsToCurrentThread()); | 848 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 849 client_->OnVideoNaturalSizeChange(size); | 849 client_->OnVideoNaturalSizeChange(size); |
| 850 } | 850 } |
| 851 | 851 |
| 852 void RendererImpl::OnVideoOpacityChange(bool opaque) { | 852 void RendererImpl::OnVideoOpacityChange(bool opaque) { |
| 853 DCHECK(task_runner_->BelongsToCurrentThread()); | 853 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 854 client_->OnVideoOpacityChange(opaque); | 854 client_->OnVideoOpacityChange(opaque); |
| 855 } | 855 } |
| 856 | 856 |
| 857 } // namespace media | 857 } // namespace media |
| OLD | NEW |