OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 scoped_ptr<media::Renderer> CreateRenderer(); | 192 scoped_ptr<media::Renderer> CreateRenderer(); |
193 | 193 |
194 // Finishes starting the pipeline due to a call to load(). | 194 // Finishes starting the pipeline due to a call to load(). |
195 void StartPipeline(); | 195 void StartPipeline(); |
196 | 196 |
197 // Helpers that set the network/ready state and notifies the client if | 197 // Helpers that set the network/ready state and notifies the client if |
198 // they've changed. | 198 // they've changed. |
199 void SetNetworkState(blink::WebMediaPlayer::NetworkState state); | 199 void SetNetworkState(blink::WebMediaPlayer::NetworkState state); |
200 void SetReadyState(blink::WebMediaPlayer::ReadyState state); | 200 void SetReadyState(blink::WebMediaPlayer::ReadyState state); |
201 | 201 |
202 // Lets V8 know that player uses extra resources not managed by V8. | |
203 void IncrementExternallyAllocatedMemory(); | |
204 | |
205 // Gets the duration value reported by the pipeline. | 202 // Gets the duration value reported by the pipeline. |
206 double GetPipelineDuration() const; | 203 double GetPipelineDuration() const; |
207 | 204 |
208 // Callbacks from |pipeline_| that are forwarded to |client_|. | 205 // Callbacks from |pipeline_| that are forwarded to |client_|. |
209 void OnDurationChanged(); | 206 void OnDurationChanged(); |
210 void OnNaturalSizeChanged(gfx::Size size); | 207 void OnNaturalSizeChanged(gfx::Size size); |
211 void OnOpacityChanged(bool opaque); | 208 void OnOpacityChanged(bool opaque); |
212 | 209 |
213 // Called by VideoRendererImpl on its internal thread with the new frame to be | 210 // Called by VideoRendererImpl on its internal thread with the new frame to be |
214 // painted. | 211 // painted. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // Tracks whether to issue time changed notifications during buffering state | 272 // Tracks whether to issue time changed notifications during buffering state |
276 // changes. | 273 // changes. |
277 bool should_notify_time_changed_; | 274 bool should_notify_time_changed_; |
278 | 275 |
279 blink::WebMediaPlayerClient* client_; | 276 blink::WebMediaPlayerClient* client_; |
280 | 277 |
281 base::WeakPtr<WebMediaPlayerDelegate> delegate_; | 278 base::WeakPtr<WebMediaPlayerDelegate> delegate_; |
282 | 279 |
283 base::Callback<void(const base::Closure&)> defer_load_cb_; | 280 base::Callback<void(const base::Closure&)> defer_load_cb_; |
284 | 281 |
285 bool incremented_externally_allocated_memory_; | |
286 | |
287 // Factories for supporting video accelerators. May be null. | 282 // Factories for supporting video accelerators. May be null. |
288 scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_; | 283 scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_; |
289 | 284 |
290 // Routes audio playback to either AudioRendererSink or WebAudio. | 285 // Routes audio playback to either AudioRendererSink or WebAudio. |
291 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; | 286 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; |
292 | 287 |
293 bool supports_save_; | 288 bool supports_save_; |
294 | 289 |
295 // These two are mutually exclusive: | 290 // These two are mutually exclusive: |
296 // |data_source_| is used for regular resource loads. | 291 // |data_source_| is used for regular resource loads. |
(...skipping 20 matching lines...) Expand all Loading... |
317 int text_track_index_; | 312 int text_track_index_; |
318 | 313 |
319 scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support_; | 314 scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support_; |
320 | 315 |
321 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 316 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
322 }; | 317 }; |
323 | 318 |
324 } // namespace content | 319 } // namespace content |
325 | 320 |
326 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 321 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |