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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 renderer_->OnWaitingForDecryptionKey(); | 51 renderer_->OnWaitingForDecryptionKey(); |
52 } | 52 } |
53 void OnVideoNaturalSizeChange(const gfx::Size& size) override { | 53 void OnVideoNaturalSizeChange(const gfx::Size& size) override { |
54 DCHECK(type_ == DemuxerStream::VIDEO); | 54 DCHECK(type_ == DemuxerStream::VIDEO); |
55 renderer_->OnVideoNaturalSizeChange(size); | 55 renderer_->OnVideoNaturalSizeChange(size); |
56 } | 56 } |
57 void OnVideoOpacityChange(bool opaque) override { | 57 void OnVideoOpacityChange(bool opaque) override { |
58 DCHECK(type_ == DemuxerStream::VIDEO); | 58 DCHECK(type_ == DemuxerStream::VIDEO); |
59 renderer_->OnVideoOpacityChange(opaque); | 59 renderer_->OnVideoOpacityChange(opaque); |
60 } | 60 } |
61 void OnDurationChange(base::TimeDelta duration) override { | |
62 // RendererClients should only be notified of duration changes in certain | |
63 // scenarios, none of which should arrise for RendererClientInternal. | |
watk
2016/08/12 00:49:06
arise
tguilbert
2016/08/12 00:58:15
Done.
| |
64 // Duration changes should be sent to the pipeline by the DemuxerStream, via | |
65 // the DemuxerHost interface. | |
66 NOTREACHED(); | |
67 } | |
61 | 68 |
62 private: | 69 private: |
63 DemuxerStream::Type type_; | 70 DemuxerStream::Type type_; |
64 RendererImpl* renderer_; | 71 RendererImpl* renderer_; |
65 }; | 72 }; |
66 | 73 |
67 RendererImpl::RendererImpl( | 74 RendererImpl::RendererImpl( |
68 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 75 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
69 std::unique_ptr<AudioRenderer> audio_renderer, | 76 std::unique_ptr<AudioRenderer> audio_renderer, |
70 std::unique_ptr<VideoRenderer> video_renderer) | 77 std::unique_ptr<VideoRenderer> video_renderer) |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
842 DCHECK(task_runner_->BelongsToCurrentThread()); | 849 DCHECK(task_runner_->BelongsToCurrentThread()); |
843 client_->OnVideoNaturalSizeChange(size); | 850 client_->OnVideoNaturalSizeChange(size); |
844 } | 851 } |
845 | 852 |
846 void RendererImpl::OnVideoOpacityChange(bool opaque) { | 853 void RendererImpl::OnVideoOpacityChange(bool opaque) { |
847 DCHECK(task_runner_->BelongsToCurrentThread()); | 854 DCHECK(task_runner_->BelongsToCurrentThread()); |
848 client_->OnVideoOpacityChange(opaque); | 855 client_->OnVideoOpacityChange(opaque); |
849 } | 856 } |
850 | 857 |
851 } // namespace media | 858 } // namespace media |
OLD | NEW |