OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_BACKEND_FACTORY_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_BACKEND_FACTORY_H_ |
6 #define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_BACKEND_FACTORY_H_ | 6 #define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_BACKEND_FACTORY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | |
10 | |
11 #include "base/macros.h" | |
12 | 9 |
13 namespace chromecast { | 10 namespace chromecast { |
14 namespace media { | 11 namespace media { |
15 | 12 |
16 class MediaPipelineBackend; | 13 class MediaPipelineBackend; |
17 class MediaPipelineBackendManager; | |
18 struct MediaPipelineDeviceParams; | 14 struct MediaPipelineDeviceParams; |
19 | 15 |
20 // Creates MediaPipelineBackends using a given MediaPipelineBackendManager. | 16 // Abstract base class to create MediaPipelineBackend. |
21 class MediaPipelineBackendFactory { | 17 class MediaPipelineBackendFactory { |
22 public: | 18 public: |
23 // TODO(slan): Use a static Create method once all of the constructor | 19 virtual ~MediaPipelineBackendFactory() {} |
24 // dependencies are removed from the internal implemenation. | |
25 explicit MediaPipelineBackendFactory( | |
26 MediaPipelineBackendManager* media_pipeline_backend_manager); | |
27 virtual ~MediaPipelineBackendFactory(); | |
28 | 20 |
29 virtual std::unique_ptr<MediaPipelineBackend> CreateBackend( | 21 virtual std::unique_ptr<MediaPipelineBackend> CreateBackend( |
30 const MediaPipelineDeviceParams& params); | 22 const MediaPipelineDeviceParams& params) = 0; |
31 | |
32 protected: | |
33 MediaPipelineBackendManager* media_pipeline_backend_manager() { | |
34 return media_pipeline_backend_manager_; | |
35 } | |
36 | |
37 private: | |
38 media::MediaPipelineBackendManager* const media_pipeline_backend_manager_; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(MediaPipelineBackendFactory); | |
41 }; | 23 }; |
42 | 24 |
43 } // media | 25 } // media |
slan
2017/05/30 16:26:01
nit: namespace here and below
alokp
2017/05/30 23:19:33
Done.
| |
44 } // chromecast | 26 } // chromecast |
45 | 27 |
46 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_BACKEND_FACTORY_H_ | 28 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_BACKEND_FACTORY_H_ |
OLD | NEW |