| 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 "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // If any error ever happens, this object will transition to the "Error" state | 68 // If any error ever happens, this object will transition to the "Error" state |
| 69 // from any state. If Stop() is ever called, this object will transition to | 69 // from any state. If Stop() is ever called, this object will transition to |
| 70 // "Stopped" state. | 70 // "Stopped" state. |
| 71 // | 71 // |
| 72 // TODO(sandersd): It should be possible to pass through Suspended when going | 72 // TODO(sandersd): It should be possible to pass through Suspended when going |
| 73 // from InitDemuxer to InitRenderer, thereby eliminating the Resuming state. | 73 // from InitDemuxer to InitRenderer, thereby eliminating the Resuming state. |
| 74 // Some annoying differences between the two paths need to be removed first. | 74 // Some annoying differences between the two paths need to be removed first. |
| 75 class MEDIA_EXPORT PipelineImpl : public Pipeline, public DemuxerHost { | 75 class MEDIA_EXPORT PipelineImpl : public Pipeline, public DemuxerHost { |
| 76 public: | 76 public: |
| 77 // Constructs a media pipeline that will execute on |task_runner|. | 77 // Constructs a media pipeline that will execute on |task_runner|. |
| 78 PipelineImpl(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 78 PipelineImpl(PipelineClient* client, |
| 79 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 79 MediaLog* media_log); | 80 MediaLog* media_log); |
| 80 ~PipelineImpl() override; | 81 ~PipelineImpl() override; |
| 81 | 82 |
| 82 void SetErrorForTesting(PipelineStatus status); | 83 void SetErrorForTesting(PipelineStatus status); |
| 83 bool HasWeakPtrsForTesting() const; | 84 bool HasWeakPtrsForTesting() const; |
| 84 | 85 |
| 85 // Pipeline implementation. | 86 // Pipeline implementation. |
| 86 void Start(Demuxer* demuxer, | 87 void Start(Demuxer* demuxer, |
| 87 scoped_ptr<Renderer> renderer, | 88 scoped_ptr<Renderer> renderer, |
| 88 const base::Closure& ended_cb, | 89 const base::Closure& ended_cb, |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 // Declared last so that weak pointers will be invalidated before all other | 338 // Declared last so that weak pointers will be invalidated before all other |
| 338 // member variables. | 339 // member variables. |
| 339 base::WeakPtrFactory<PipelineImpl> weak_factory_; | 340 base::WeakPtrFactory<PipelineImpl> weak_factory_; |
| 340 | 341 |
| 341 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); | 342 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); |
| 342 }; | 343 }; |
| 343 | 344 |
| 344 } // namespace media | 345 } // namespace media |
| 345 | 346 |
| 346 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ | 347 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ |
| OLD | NEW |