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/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 ~PipelineImpl() override; | 87 ~PipelineImpl() override; |
88 | 88 |
89 void SetErrorForTesting(PipelineStatus status); | 89 void SetErrorForTesting(PipelineStatus status); |
90 bool HasWeakPtrsForTesting() const; | 90 bool HasWeakPtrsForTesting() const; |
91 | 91 |
92 // Pipeline implementation. | 92 // Pipeline implementation. |
93 void Start(Demuxer* demuxer, | 93 void Start(Demuxer* demuxer, |
94 std::unique_ptr<Renderer> renderer, | 94 std::unique_ptr<Renderer> renderer, |
95 Client* client, | 95 Client* client, |
96 const PipelineStatusCB& seek_cb) override; | 96 const PipelineStatusCB& seek_cb) override; |
| 97 void RestartStreamPlayback(DemuxerStream* stream, |
| 98 base::TimeDelta time) override; |
97 void Stop() override; | 99 void Stop() override; |
98 void Seek(base::TimeDelta time, const PipelineStatusCB& seek_cb) override; | 100 void Seek(base::TimeDelta time, const PipelineStatusCB& seek_cb) override; |
99 bool IsRunning() const override; | 101 bool IsRunning() const override; |
100 double GetPlaybackRate() const override; | 102 double GetPlaybackRate() const override; |
101 void SetPlaybackRate(double playback_rate) override; | 103 void SetPlaybackRate(double playback_rate) override; |
102 void Suspend(const PipelineStatusCB& suspend_cb) override; | 104 void Suspend(const PipelineStatusCB& suspend_cb) override; |
103 void Resume(std::unique_ptr<Renderer> renderer, | 105 void Resume(std::unique_ptr<Renderer> renderer, |
104 base::TimeDelta timestamp, | 106 base::TimeDelta timestamp, |
105 const PipelineStatusCB& seek_cb) override; | 107 const PipelineStatusCB& seek_cb) override; |
106 float GetVolume() const override; | 108 float GetVolume() const override; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 void OnBufferingStateChange(BufferingState state) override; | 159 void OnBufferingStateChange(BufferingState state) override; |
158 void OnWaitingForDecryptionKey() override; | 160 void OnWaitingForDecryptionKey() override; |
159 void OnVideoNaturalSizeChange(const gfx::Size& size) override; | 161 void OnVideoNaturalSizeChange(const gfx::Size& size) override; |
160 void OnVideoOpacityChange(bool opaque) override; | 162 void OnVideoOpacityChange(bool opaque) override; |
161 | 163 |
162 // The following "task" methods correspond to the public methods, but these | 164 // The following "task" methods correspond to the public methods, but these |
163 // methods are run as the result of posting a task to the Pipeline's | 165 // methods are run as the result of posting a task to the Pipeline's |
164 // task runner. | 166 // task runner. |
165 void StartTask(); | 167 void StartTask(); |
166 | 168 |
| 169 void RestartStreamPlaybackTask(DemuxerStream* stream, base::TimeDelta time); |
| 170 |
167 // Suspends the pipeline, discarding the current renderer. | 171 // Suspends the pipeline, discarding the current renderer. |
168 void SuspendTask(const PipelineStatusCB& suspend_cb); | 172 void SuspendTask(const PipelineStatusCB& suspend_cb); |
169 | 173 |
170 // Resumes the pipeline with a new renderer, and initializes it with a seek. | 174 // Resumes the pipeline with a new renderer, and initializes it with a seek. |
171 void ResumeTask(std::unique_ptr<Renderer> renderer, | 175 void ResumeTask(std::unique_ptr<Renderer> renderer, |
172 base::TimeDelta timestamp, | 176 base::TimeDelta timestamp, |
173 const PipelineStatusCB& seek_sb); | 177 const PipelineStatusCB& seek_sb); |
174 | 178 |
175 // Stops and destroys all filters, placing the pipeline in the kStopped state. | 179 // Stops and destroys all filters, placing the pipeline in the kStopped state. |
176 void StopTask(const base::Closure& stop_cb); | 180 void StopTask(const base::Closure& stop_cb); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 // Declared last so that weak pointers will be invalidated before all other | 341 // Declared last so that weak pointers will be invalidated before all other |
338 // member variables. | 342 // member variables. |
339 base::WeakPtrFactory<PipelineImpl> weak_factory_; | 343 base::WeakPtrFactory<PipelineImpl> weak_factory_; |
340 | 344 |
341 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); | 345 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); |
342 }; | 346 }; |
343 | 347 |
344 } // namespace media | 348 } // namespace media |
345 | 349 |
346 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ | 350 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ |
OLD | NEW |