| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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_FILTERS_PIPELINE_CONTROLLER_H_ | 5 #ifndef MEDIA_FILTERS_PIPELINE_CONTROLLER_H_ |
| 6 #define MEDIA_FILTERS_PIPELINE_CONTROLLER_H_ | 6 #define MEDIA_FILTERS_PIPELINE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 enum class State { | 31 enum class State { |
| 32 CREATED, | 32 CREATED, |
| 33 STARTING, | 33 STARTING, |
| 34 PLAYING, | 34 PLAYING, |
| 35 SEEKING, | 35 SEEKING, |
| 36 SUSPENDING, | 36 SUSPENDING, |
| 37 SUSPENDED, | 37 SUSPENDED, |
| 38 RESUMING, | 38 RESUMING, |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 using RendererFactoryCB = base::Callback<scoped_ptr<Renderer>(void)>; | 41 using RendererFactoryCB = base::Callback<std::unique_ptr<Renderer>(void)>; |
| 42 using SeekedCB = base::Callback<void(bool time_updated)>; | 42 using SeekedCB = base::Callback<void(bool time_updated)>; |
| 43 using SuspendedCB = base::Callback<void()>; | 43 using SuspendedCB = base::Callback<void()>; |
| 44 | 44 |
| 45 // Construct a PipelineController wrapping |pipeline_|. |pipeline_| must | 45 // Construct a PipelineController wrapping |pipeline_|. |pipeline_| must |
| 46 // outlive the resulting PipelineController. The callbacks are: | 46 // outlive the resulting PipelineController. The callbacks are: |
| 47 // - |renderer_factory_cb| is called by PipelineController to create new | 47 // - |renderer_factory_cb| is called by PipelineController to create new |
| 48 // renderers when starting and resuming. | 48 // renderers when starting and resuming. |
| 49 // - |seeked_cb| is called upon reaching a stable state if a seek occured. | 49 // - |seeked_cb| is called upon reaching a stable state if a seek occured. |
| 50 // - |suspended_cb| is called immediately after suspendeding. | 50 // - |suspended_cb| is called immediately after suspendeding. |
| 51 // - |error_cb| is called if any operation on |pipeline_| does not result | 51 // - |error_cb| is called if any operation on |pipeline_| does not result |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 base::ThreadChecker thread_checker_; | 166 base::ThreadChecker thread_checker_; |
| 167 base::WeakPtrFactory<PipelineController> weak_factory_; | 167 base::WeakPtrFactory<PipelineController> weak_factory_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(PipelineController); | 169 DISALLOW_COPY_AND_ASSIGN(PipelineController); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace media | 172 } // namespace media |
| 173 | 173 |
| 174 #endif // MEDIA_FILTERS_PIPELINE_CONTROLLER_H_ | 174 #endif // MEDIA_FILTERS_PIPELINE_CONTROLLER_H_ |
| OLD | NEW |