| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_BASE_PIPELINE_IMPL_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ |
| 6 #define MEDIA_BASE_PIPELINE_IMPL_H_ | 6 #define MEDIA_BASE_PIPELINE_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 void OnError(PipelineStatus error); | 121 void OnError(PipelineStatus error); |
| 122 void OnEnded(); | 122 void OnEnded(); |
| 123 void OnMetadata(PipelineMetadata metadata); | 123 void OnMetadata(PipelineMetadata metadata); |
| 124 void OnBufferingStateChange(BufferingState state); | 124 void OnBufferingStateChange(BufferingState state); |
| 125 void OnDurationChange(base::TimeDelta duration); | 125 void OnDurationChange(base::TimeDelta duration); |
| 126 void OnAddTextTrack(const TextTrackConfig& config, | 126 void OnAddTextTrack(const TextTrackConfig& config, |
| 127 const AddTextTrackDoneCB& done_cb); | 127 const AddTextTrackDoneCB& done_cb); |
| 128 void OnWaitingForDecryptionKey(); | 128 void OnWaitingForDecryptionKey(); |
| 129 void OnVideoNaturalSizeChange(const gfx::Size& size); | 129 void OnVideoNaturalSizeChange(const gfx::Size& size); |
| 130 void OnVideoOpacityChange(bool opaque); | 130 void OnVideoOpacityChange(bool opaque); |
| 131 void OnBufferedTimeRangesChange(const Ranges<base::TimeDelta>& ranges); | |
| 132 void OnStatisticsUpdate(const PipelineStatistics& stats); | |
| 133 | 131 |
| 134 // Task completion callbacks from RendererWrapper. | 132 // Task completion callbacks from RendererWrapper. |
| 135 void OnSeekDone(base::TimeDelta start_time); | 133 void OnSeekDone(base::TimeDelta start_time); |
| 136 void OnSuspendDone(base::TimeDelta suspend_time); | 134 void OnSuspendDone(base::TimeDelta suspend_time); |
| 137 | 135 |
| 138 // Parameters passed in the constructor. | 136 // Parameters passed in the constructor. |
| 139 const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; | 137 const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; |
| 140 const scoped_refptr<MediaLog> media_log_; | 138 const scoped_refptr<MediaLog> media_log_; |
| 141 | 139 |
| 142 // Pipeline client. Valid only while the pipeline is running. | 140 // Pipeline client. Valid only while the pipeline is running. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 154 // Current playback rate (>= 0.0). This value is set immediately via | 152 // Current playback rate (>= 0.0). This value is set immediately via |
| 155 // SetPlaybackRate() and a task is dispatched on the task runner to notify | 153 // SetPlaybackRate() and a task is dispatched on the task runner to notify |
| 156 // the filters. | 154 // the filters. |
| 157 double playback_rate_; | 155 double playback_rate_; |
| 158 | 156 |
| 159 // Current volume level (from 0.0f to 1.0f). This value is set immediately | 157 // Current volume level (from 0.0f to 1.0f). This value is set immediately |
| 160 // via SetVolume() and a task is dispatched on the task runner to notify the | 158 // via SetVolume() and a task is dispatched on the task runner to notify the |
| 161 // filters. | 159 // filters. |
| 162 float volume_; | 160 float volume_; |
| 163 | 161 |
| 164 // Amount of available buffered data as reported by Demuxer. | |
| 165 Ranges<base::TimeDelta> buffered_time_ranges_; | |
| 166 | |
| 167 // Current duration as reported by Demuxer. | 162 // Current duration as reported by Demuxer. |
| 168 base::TimeDelta duration_; | 163 base::TimeDelta duration_; |
| 169 | 164 |
| 170 // True when OnBufferedTimeRangesChange() has been called more recently than | |
| 171 // DidLoadingProgress(). | |
| 172 bool did_loading_progress_; | |
| 173 | |
| 174 // Accumulated statistics reported by the renderer. | |
| 175 PipelineStatistics statistics_; | |
| 176 | |
| 177 base::ThreadChecker thread_checker_; | 165 base::ThreadChecker thread_checker_; |
| 178 base::WeakPtrFactory<PipelineImpl> weak_factory_; | 166 base::WeakPtrFactory<PipelineImpl> weak_factory_; |
| 179 | 167 |
| 180 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); | 168 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); |
| 181 }; | 169 }; |
| 182 | 170 |
| 183 } // namespace media | 171 } // namespace media |
| 184 | 172 |
| 185 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ | 173 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ |
| OLD | NEW |