OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ |
6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
14 #include "media/base/buffering_state.h" | 14 #include "media/base/buffering_state.h" |
15 #include "media/base/pipeline_status.h" | 15 #include "media/base/pipeline_status.h" |
16 #include "media/mojo/interfaces/renderer.mojom.h" | 16 #include "media/mojo/interfaces/renderer.mojom.h" |
17 #include "mojo/public/cpp/bindings/strong_binding.h" | 17 #include "mojo/public/cpp/bindings/strong_binding.h" |
18 | 18 |
19 namespace mojo { | 19 namespace mojo { |
20 class ApplicationConnection; | 20 class Connection; |
21 } | 21 } |
22 | 22 |
23 namespace media { | 23 namespace media { |
24 | 24 |
25 class DemuxerStreamProviderShim; | 25 class DemuxerStreamProviderShim; |
26 class CdmContextProvider; | 26 class CdmContextProvider; |
27 class Renderer; | 27 class Renderer; |
28 | 28 |
29 // A interfaces::Renderer implementation that uses media::AudioRenderer to | 29 // A interfaces::Renderer implementation that uses media::AudioRenderer to |
30 // decode and render audio to a sink obtained from the ApplicationConnection. | 30 // decode and render audio to a sink obtained from the Connection. |
31 class MojoRendererService : interfaces::Renderer { | 31 class MojoRendererService : interfaces::Renderer { |
32 public: | 32 public: |
33 // |cdm_context_provider| can be used to find the CdmContext to support | 33 // |cdm_context_provider| can be used to find the CdmContext to support |
34 // encrypted media. If null, encrypted media is not supported. | 34 // encrypted media. If null, encrypted media is not supported. |
35 MojoRendererService(base::WeakPtr<CdmContextProvider> cdm_context_provider, | 35 MojoRendererService(base::WeakPtr<CdmContextProvider> cdm_context_provider, |
36 scoped_ptr<media::Renderer> renderer, | 36 scoped_ptr<media::Renderer> renderer, |
37 mojo::InterfaceRequest<interfaces::Renderer> request); | 37 mojo::InterfaceRequest<interfaces::Renderer> request); |
38 ~MojoRendererService() final; | 38 ~MojoRendererService() final; |
39 | 39 |
40 // interfaces::Renderer implementation. | 40 // interfaces::Renderer implementation. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 base::WeakPtr<MojoRendererService> weak_this_; | 110 base::WeakPtr<MojoRendererService> weak_this_; |
111 base::WeakPtrFactory<MojoRendererService> weak_factory_; | 111 base::WeakPtrFactory<MojoRendererService> weak_factory_; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(MojoRendererService); | 113 DISALLOW_COPY_AND_ASSIGN(MojoRendererService); |
114 }; | 114 }; |
115 | 115 |
116 } // namespace media | 116 } // namespace media |
117 | 117 |
118 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ | 118 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ |
OLD | NEW |