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_REMOTING_COURIER_RENDERER_H_ | 5 #ifndef MEDIA_REMOTING_COURIER_RENDERER_H_ |
6 #define MEDIA_REMOTING_COURIER_RENDERER_H_ | 6 #define MEDIA_REMOTING_COURIER_RENDERER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // media thread to avoid threading race condition. | 76 // media thread to avoid threading race condition. |
77 static void RequestUpdateInterstitialOnMainThread( | 77 static void RequestUpdateInterstitialOnMainThread( |
78 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner, | 78 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner, |
79 base::WeakPtr<CourierRenderer> self, | 79 base::WeakPtr<CourierRenderer> self, |
80 const base::Optional<SkBitmap>& background_image, | 80 const base::Optional<SkBitmap>& background_image, |
81 const gfx::Size& canvas_size, | 81 const gfx::Size& canvas_size, |
82 InterstitialType interstitial_type); | 82 InterstitialType interstitial_type); |
83 | 83 |
84 public: | 84 public: |
85 // media::Renderer implementation. | 85 // media::Renderer implementation. |
86 void Initialize(DemuxerStreamProvider* demuxer_stream_provider, | 86 void Initialize(MediaResource* media_resource, |
87 RendererClient* client, | 87 RendererClient* client, |
88 const PipelineStatusCB& init_cb) final; | 88 const PipelineStatusCB& init_cb) final; |
89 void SetCdm(CdmContext* cdm_context, | 89 void SetCdm(CdmContext* cdm_context, |
90 const CdmAttachedCB& cdm_attached_cb) final; | 90 const CdmAttachedCB& cdm_attached_cb) final; |
91 void Flush(const base::Closure& flush_cb) final; | 91 void Flush(const base::Closure& flush_cb) final; |
92 void StartPlayingFrom(base::TimeDelta time) final; | 92 void StartPlayingFrom(base::TimeDelta time) final; |
93 void SetPlaybackRate(double playback_rate) final; | 93 void SetPlaybackRate(double playback_rate) final; |
94 void SetVolume(float volume) final; | 94 void SetVolume(float volume) final; |
95 base::TimeDelta GetMediaTime() final; | 95 base::TimeDelta GetMediaTime() final; |
96 | 96 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 162 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
163 const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; | 163 const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; |
164 | 164 |
165 // Current renderer playback time information. | 165 // Current renderer playback time information. |
166 base::TimeDelta current_media_time_; | 166 base::TimeDelta current_media_time_; |
167 base::TimeDelta current_max_time_; | 167 base::TimeDelta current_max_time_; |
168 // Both |current_media_time_| and |current_max_time_| should be protected by | 168 // Both |current_media_time_| and |current_max_time_| should be protected by |
169 // lock because it can be accessed from both media and render main thread. | 169 // lock because it can be accessed from both media and render main thread. |
170 base::Lock time_lock_; | 170 base::Lock time_lock_; |
171 | 171 |
172 DemuxerStreamProvider* demuxer_stream_provider_; | 172 MediaResource* media_resource_; |
173 RendererClient* client_; | 173 RendererClient* client_; |
174 std::unique_ptr<DemuxerStreamAdapter> audio_demuxer_stream_adapter_; | 174 std::unique_ptr<DemuxerStreamAdapter> audio_demuxer_stream_adapter_; |
175 std::unique_ptr<DemuxerStreamAdapter> video_demuxer_stream_adapter_; | 175 std::unique_ptr<DemuxerStreamAdapter> video_demuxer_stream_adapter_; |
176 | 176 |
177 // Component to establish mojo remoting service on browser process. | 177 // Component to establish mojo remoting service on browser process. |
178 const base::WeakPtr<RendererController> controller_; | 178 const base::WeakPtr<RendererController> controller_; |
179 // Broker class to process incoming and outgoing RPC message. | 179 // Broker class to process incoming and outgoing RPC message. |
180 const base::WeakPtr<RpcBroker> rpc_broker_; | 180 const base::WeakPtr<RpcBroker> rpc_broker_; |
181 // RPC handle value for CourierRenderer component. | 181 // RPC handle value for CourierRenderer component. |
182 const int rpc_handle_; | 182 const int rpc_handle_; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 base::WeakPtrFactory<CourierRenderer> weak_factory_; | 232 base::WeakPtrFactory<CourierRenderer> weak_factory_; |
233 | 233 |
234 DISALLOW_COPY_AND_ASSIGN(CourierRenderer); | 234 DISALLOW_COPY_AND_ASSIGN(CourierRenderer); |
235 }; | 235 }; |
236 | 236 |
237 } // namespace remoting | 237 } // namespace remoting |
238 } // namespace media | 238 } // namespace media |
239 | 239 |
240 #endif // MEDIA_REMOTING_COURIER_RENDERER_H_ | 240 #endif // MEDIA_REMOTING_COURIER_RENDERER_H_ |
OLD | NEW |