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 #ifndef MEDIA_RENDERERS_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_RENDERERS_RENDERER_IMPL_H_ |
6 #define MEDIA_RENDERERS_RENDERER_IMPL_H_ | 6 #define MEDIA_RENDERERS_RENDERER_IMPL_H_ |
7 | 7 |
8 #include "base/cancelable_callback.h" | 8 #include "base/cancelable_callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 scoped_ptr<AudioRenderer> audio_renderer, | 41 scoped_ptr<AudioRenderer> audio_renderer, |
42 scoped_ptr<VideoRenderer> video_renderer); | 42 scoped_ptr<VideoRenderer> video_renderer); |
43 | 43 |
44 ~RendererImpl() final; | 44 ~RendererImpl() final; |
45 | 45 |
46 // Renderer implementation. | 46 // Renderer implementation. |
47 void Initialize(DemuxerStreamProvider* demuxer_stream_provider, | 47 void Initialize(DemuxerStreamProvider* demuxer_stream_provider, |
48 const PipelineStatusCB& init_cb, | 48 const PipelineStatusCB& init_cb, |
49 const StatisticsCB& statistics_cb, | 49 const StatisticsCB& statistics_cb, |
50 const BufferingStateCB& buffering_state_cb, | 50 const BufferingStateCB& buffering_state_cb, |
| 51 const PaintCB& paint_cb, |
51 const base::Closure& ended_cb, | 52 const base::Closure& ended_cb, |
52 const PipelineStatusCB& error_cb, | 53 const PipelineStatusCB& error_cb, |
53 const base::Closure& waiting_for_decryption_key_cb) final; | 54 const base::Closure& waiting_for_decryption_key_cb) final; |
54 void SetCdm(CdmContext* cdm_context, | 55 void SetCdm(CdmContext* cdm_context, |
55 const CdmAttachedCB& cdm_attached_cb) final; | 56 const CdmAttachedCB& cdm_attached_cb) final; |
56 void Flush(const base::Closure& flush_cb) final; | 57 void Flush(const base::Closure& flush_cb) final; |
57 void StartPlayingFrom(base::TimeDelta time) final; | 58 void StartPlayingFrom(base::TimeDelta time) final; |
58 void SetPlaybackRate(float playback_rate) final; | 59 void SetPlaybackRate(float playback_rate) final; |
59 void SetVolume(float volume) final; | 60 void SetVolume(float volume) final; |
60 base::TimeDelta GetMediaTime() final; | 61 base::TimeDelta GetMediaTime() final; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Task runner used to execute pipeline tasks. | 133 // Task runner used to execute pipeline tasks. |
133 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 134 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
134 | 135 |
135 DemuxerStreamProvider* demuxer_stream_provider_; | 136 DemuxerStreamProvider* demuxer_stream_provider_; |
136 | 137 |
137 // Permanent callbacks to notify various renderer states/stats. | 138 // Permanent callbacks to notify various renderer states/stats. |
138 StatisticsCB statistics_cb_; | 139 StatisticsCB statistics_cb_; |
139 base::Closure ended_cb_; | 140 base::Closure ended_cb_; |
140 PipelineStatusCB error_cb_; | 141 PipelineStatusCB error_cb_; |
141 BufferingStateCB buffering_state_cb_; | 142 BufferingStateCB buffering_state_cb_; |
| 143 PaintCB paint_cb_; |
142 base::Closure waiting_for_decryption_key_cb_; | 144 base::Closure waiting_for_decryption_key_cb_; |
143 | 145 |
144 // Temporary callback used for Initialize() and Flush(). | 146 // Temporary callback used for Initialize() and Flush(). |
145 PipelineStatusCB init_cb_; | 147 PipelineStatusCB init_cb_; |
146 base::Closure flush_cb_; | 148 base::Closure flush_cb_; |
147 | 149 |
148 scoped_ptr<AudioRenderer> audio_renderer_; | 150 scoped_ptr<AudioRenderer> audio_renderer_; |
149 scoped_ptr<VideoRenderer> video_renderer_; | 151 scoped_ptr<VideoRenderer> video_renderer_; |
150 | 152 |
151 // Renderer-provided time source used to control playback. | 153 // Renderer-provided time source used to control playback. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 188 |
187 base::WeakPtr<RendererImpl> weak_this_; | 189 base::WeakPtr<RendererImpl> weak_this_; |
188 base::WeakPtrFactory<RendererImpl> weak_factory_; | 190 base::WeakPtrFactory<RendererImpl> weak_factory_; |
189 | 191 |
190 DISALLOW_COPY_AND_ASSIGN(RendererImpl); | 192 DISALLOW_COPY_AND_ASSIGN(RendererImpl); |
191 }; | 193 }; |
192 | 194 |
193 } // namespace media | 195 } // namespace media |
194 | 196 |
195 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ | 197 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ |
OLD | NEW |