Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: media/mojo/services/mojo_renderer_service.h

Issue 2643713003: Allow to use the DefaultRendererFactory from a Utility Process (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <memory> 9 #include <memory>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/timer/timer.h" 16 #include "base/timer/timer.h"
17 #include "base/unguessable_token.h" 17 #include "base/unguessable_token.h"
18 #include "media/base/buffering_state.h" 18 #include "media/base/buffering_state.h"
19 #include "media/base/media_resource.h" 19 #include "media/base/media_resource.h"
20 #include "media/base/pipeline_status.h" 20 #include "media/base/pipeline_status.h"
21 #include "media/base/renderer_client.h" 21 #include "media/base/renderer_client.h"
22 #include "media/mojo/interfaces/renderer.mojom.h" 22 #include "media/mojo/interfaces/renderer.mojom.h"
23 #include "media/mojo/interfaces/video_renderer_sink.mojom.h"
23 #include "media/mojo/services/media_mojo_export.h" 24 #include "media/mojo/services/media_mojo_export.h"
24 #include "mojo/public/cpp/bindings/strong_binding.h" 25 #include "mojo/public/cpp/bindings/strong_binding.h"
25 26
26 namespace media { 27 namespace media {
27 28
28 class AudioRendererSink; 29 class AudioRendererSink;
29 class MediaResourceShim; 30 class MediaResourceShim;
30 class ContentDecryptionModule; 31 class ContentDecryptionModule;
31 class MojoCdmServiceContext; 32 class MojoCdmServiceContext;
32 class Renderer; 33 class Renderer;
(...skipping 24 matching lines...) Expand all
57 scoped_refptr<AudioRendererSink> audio_sink, 58 scoped_refptr<AudioRendererSink> audio_sink,
58 std::unique_ptr<VideoRendererSink> video_sink, 59 std::unique_ptr<VideoRendererSink> video_sink,
59 std::unique_ptr<media::Renderer> renderer, 60 std::unique_ptr<media::Renderer> renderer,
60 InitiateSurfaceRequestCB initiate_surface_request_cb); 61 InitiateSurfaceRequestCB initiate_surface_request_cb);
61 62
62 ~MojoRendererService() final; 63 ~MojoRendererService() final;
63 64
64 // mojom::Renderer implementation. 65 // mojom::Renderer implementation.
65 void Initialize(mojom::RendererClientAssociatedPtrInfo client, 66 void Initialize(mojom::RendererClientAssociatedPtrInfo client,
66 base::Optional<std::vector<mojom::DemuxerStreamPtr>> streams, 67 base::Optional<std::vector<mojom::DemuxerStreamPtr>> streams,
68 mojom::VideoRendererSinkPtr video_renderer_sink_ptr,
67 const base::Optional<GURL>& media_url, 69 const base::Optional<GURL>& media_url,
68 const base::Optional<GURL>& first_party_for_cookies, 70 const base::Optional<GURL>& first_party_for_cookies,
69 const InitializeCallback& callback) final; 71 const InitializeCallback& callback) final;
70 void Flush(const FlushCallback& callback) final; 72 void Flush(const FlushCallback& callback) final;
71 void StartPlayingFrom(base::TimeDelta time_delta) final; 73 void StartPlayingFrom(base::TimeDelta time_delta) final;
72 void SetPlaybackRate(double playback_rate) final; 74 void SetPlaybackRate(double playback_rate) final;
73 void SetVolume(float volume) final; 75 void SetVolume(float volume) final;
74 void SetCdm(int32_t cdm_id, const SetCdmCallback& callback) final; 76 void SetCdm(int32_t cdm_id, const SetCdmCallback& callback) final;
75 void InitiateScopedSurfaceRequest( 77 void InitiateScopedSurfaceRequest(
76 const InitiateScopedSurfaceRequestCallback& callback) final; 78 const InitiateScopedSurfaceRequestCallback& callback) final;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 162
161 base::WeakPtr<MojoRendererService> weak_this_; 163 base::WeakPtr<MojoRendererService> weak_this_;
162 base::WeakPtrFactory<MojoRendererService> weak_factory_; 164 base::WeakPtrFactory<MojoRendererService> weak_factory_;
163 165
164 DISALLOW_COPY_AND_ASSIGN(MojoRendererService); 166 DISALLOW_COPY_AND_ASSIGN(MojoRendererService);
165 }; 167 };
166 168
167 } // namespace media 169 } // namespace media
168 170
169 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ 171 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_
OLDNEW
« no previous file with comments | « media/mojo/services/media_service_unittest.cc ('k') | media/mojo/services/mojo_renderer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698