| 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/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 ~RendererImpl() final; | 43 ~RendererImpl() final; |
| 44 | 44 |
| 45 // Renderer implementation. | 45 // Renderer implementation. |
| 46 void Initialize(DemuxerStreamProvider* demuxer_stream_provider, | 46 void Initialize(DemuxerStreamProvider* demuxer_stream_provider, |
| 47 const PipelineStatusCB& init_cb, | 47 const PipelineStatusCB& init_cb, |
| 48 const StatisticsCB& statistics_cb, | 48 const StatisticsCB& statistics_cb, |
| 49 const BufferingStateCB& buffering_state_cb, | 49 const BufferingStateCB& buffering_state_cb, |
| 50 const PaintCB& paint_cb, | 50 const PaintCB& paint_cb, |
| 51 const base::Closure& ended_cb, | 51 const base::Closure& ended_cb, |
| 52 const PipelineStatusCB& error_cb) final; | 52 const PipelineStatusCB& error_cb, |
| 53 const base::Closure& waiting_for_decryption_key_cb) final; |
| 53 void SetCdm(CdmContext* cdm_context, | 54 void SetCdm(CdmContext* cdm_context, |
| 54 const CdmAttachedCB& cdm_attached_cb) final; | 55 const CdmAttachedCB& cdm_attached_cb) final; |
| 55 void Flush(const base::Closure& flush_cb) final; | 56 void Flush(const base::Closure& flush_cb) final; |
| 56 void StartPlayingFrom(base::TimeDelta time) final; | 57 void StartPlayingFrom(base::TimeDelta time) final; |
| 57 void SetPlaybackRate(float playback_rate) final; | 58 void SetPlaybackRate(float playback_rate) final; |
| 58 void SetVolume(float volume) final; | 59 void SetVolume(float volume) final; |
| 59 base::TimeDelta GetMediaTime() final; | 60 base::TimeDelta GetMediaTime() final; |
| 60 bool HasAudio() final; | 61 bool HasAudio() final; |
| 61 bool HasVideo() final; | 62 bool HasVideo() final; |
| 62 | 63 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 127 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 127 | 128 |
| 128 DemuxerStreamProvider* demuxer_stream_provider_; | 129 DemuxerStreamProvider* demuxer_stream_provider_; |
| 129 | 130 |
| 130 // Permanent callbacks to notify various renderer states/stats. | 131 // Permanent callbacks to notify various renderer states/stats. |
| 131 StatisticsCB statistics_cb_; | 132 StatisticsCB statistics_cb_; |
| 132 base::Closure ended_cb_; | 133 base::Closure ended_cb_; |
| 133 PipelineStatusCB error_cb_; | 134 PipelineStatusCB error_cb_; |
| 134 BufferingStateCB buffering_state_cb_; | 135 BufferingStateCB buffering_state_cb_; |
| 135 PaintCB paint_cb_; | 136 PaintCB paint_cb_; |
| 137 base::Closure waiting_for_decryption_key_cb_; |
| 136 | 138 |
| 137 // Temporary callback used for Initialize() and Flush(). | 139 // Temporary callback used for Initialize() and Flush(). |
| 138 PipelineStatusCB init_cb_; | 140 PipelineStatusCB init_cb_; |
| 139 base::Closure flush_cb_; | 141 base::Closure flush_cb_; |
| 140 | 142 |
| 141 scoped_ptr<AudioRenderer> audio_renderer_; | 143 scoped_ptr<AudioRenderer> audio_renderer_; |
| 142 scoped_ptr<VideoRenderer> video_renderer_; | 144 scoped_ptr<VideoRenderer> video_renderer_; |
| 143 | 145 |
| 144 // Renderer-provided time source used to control playback. | 146 // Renderer-provided time source used to control playback. |
| 145 TimeSource* time_source_; | 147 TimeSource* time_source_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 171 | 173 |
| 172 base::WeakPtr<RendererImpl> weak_this_; | 174 base::WeakPtr<RendererImpl> weak_this_; |
| 173 base::WeakPtrFactory<RendererImpl> weak_factory_; | 175 base::WeakPtrFactory<RendererImpl> weak_factory_; |
| 174 | 176 |
| 175 DISALLOW_COPY_AND_ASSIGN(RendererImpl); | 177 DISALLOW_COPY_AND_ASSIGN(RendererImpl); |
| 176 }; | 178 }; |
| 177 | 179 |
| 178 } // namespace media | 180 } // namespace media |
| 179 | 181 |
| 180 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ | 182 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ |
| OLD | NEW |