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_REMOTE_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ |
6 #define MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ | 6 #define MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // media thread to avoid threading race condition. | 74 // media thread to avoid threading race condition. |
75 static void RequestUpdateInterstitialOnMainThread( | 75 static void RequestUpdateInterstitialOnMainThread( |
76 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner, | 76 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner, |
77 base::WeakPtr<RemoteRendererImpl> remote_renderer_impl, | 77 base::WeakPtr<RemoteRendererImpl> remote_renderer_impl, |
78 const base::Optional<SkBitmap>& background_image, | 78 const base::Optional<SkBitmap>& background_image, |
79 const gfx::Size& canvas_size, | 79 const gfx::Size& canvas_size, |
80 RemotingInterstitialType interstitial_type); | 80 RemotingInterstitialType interstitial_type); |
81 | 81 |
82 public: | 82 public: |
83 // media::Renderer implementation. | 83 // media::Renderer implementation. |
84 void Initialize(DemuxerStreamProvider* demuxer_stream_provider, | 84 void Initialize(MediaResource* media_resource, |
85 media::RendererClient* client, | 85 media::RendererClient* client, |
86 const PipelineStatusCB& init_cb) final; | 86 const PipelineStatusCB& init_cb) final; |
87 void SetCdm(CdmContext* cdm_context, | 87 void SetCdm(CdmContext* cdm_context, |
88 const CdmAttachedCB& cdm_attached_cb) final; | 88 const CdmAttachedCB& cdm_attached_cb) final; |
89 void Flush(const base::Closure& flush_cb) final; | 89 void Flush(const base::Closure& flush_cb) final; |
90 void StartPlayingFrom(base::TimeDelta time) final; | 90 void StartPlayingFrom(base::TimeDelta time) final; |
91 void SetPlaybackRate(double playback_rate) final; | 91 void SetPlaybackRate(double playback_rate) final; |
92 void SetVolume(float volume) final; | 92 void SetVolume(float volume) final; |
93 base::TimeDelta GetMediaTime() final; | 93 base::TimeDelta GetMediaTime() final; |
94 | 94 |
(...skipping 67 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 media::RendererClient* client_; | 173 media::RendererClient* client_; |
174 std::unique_ptr<remoting::RemoteDemuxerStreamAdapter> | 174 std::unique_ptr<remoting::RemoteDemuxerStreamAdapter> |
175 audio_demuxer_stream_adapter_; | 175 audio_demuxer_stream_adapter_; |
176 std::unique_ptr<remoting::RemoteDemuxerStreamAdapter> | 176 std::unique_ptr<remoting::RemoteDemuxerStreamAdapter> |
177 video_demuxer_stream_adapter_; | 177 video_demuxer_stream_adapter_; |
178 | 178 |
179 // Component to establish mojo remoting service on browser process. | 179 // Component to establish mojo remoting service on browser process. |
180 const base::WeakPtr<RemotingRendererController> remoting_renderer_controller_; | 180 const base::WeakPtr<RemotingRendererController> remoting_renderer_controller_; |
181 // Broker class to process incoming and outgoing RPC message. | 181 // Broker class to process incoming and outgoing RPC message. |
182 const base::WeakPtr<remoting::RpcBroker> rpc_broker_; | 182 const base::WeakPtr<remoting::RpcBroker> rpc_broker_; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 bool is_waiting_for_buffering_ = true; | 235 bool is_waiting_for_buffering_ = true; |
236 | 236 |
237 base::WeakPtrFactory<RemoteRendererImpl> weak_factory_; | 237 base::WeakPtrFactory<RemoteRendererImpl> weak_factory_; |
238 | 238 |
239 DISALLOW_COPY_AND_ASSIGN(RemoteRendererImpl); | 239 DISALLOW_COPY_AND_ASSIGN(RemoteRendererImpl); |
240 }; | 240 }; |
241 | 241 |
242 } // namespace media | 242 } // namespace media |
243 | 243 |
244 #endif // MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ | 244 #endif // MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ |
OLD | NEW |