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