| 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 MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // |ended_| state by clamping current time to duration upon |ended_|. | 234 // |ended_| state by clamping current time to duration upon |ended_|. |
| 235 void UpdatePausedTime(); | 235 void UpdatePausedTime(); |
| 236 | 236 |
| 237 // Notifies |delegate_| that playback has started or was paused; also starts | 237 // Notifies |delegate_| that playback has started or was paused; also starts |
| 238 // or stops the memory usage reporting timer respectively. | 238 // or stops the memory usage reporting timer respectively. |
| 239 void NotifyPlaybackStarted(); | 239 void NotifyPlaybackStarted(); |
| 240 void NotifyPlaybackPaused(); | 240 void NotifyPlaybackPaused(); |
| 241 | 241 |
| 242 // Called at low frequency to tell external observers how much memory we're | 242 // Called at low frequency to tell external observers how much memory we're |
| 243 // using for video playback. Called by |memory_usage_reporting_timer_|. | 243 // using for video playback. Called by |memory_usage_reporting_timer_|. |
| 244 void ReportMemoryUsage(); | 244 // Memory usage reporting is done in two steps, because |demuxer_| must be |
| 245 // accessed on the media thread. |
| 246 void StartMemoryUsageReport(); |
| 247 void FinishMemoryUsageReport(int64_t demuxer_memory_usage); |
| 245 | 248 |
| 246 blink::WebLocalFrame* frame_; | 249 blink::WebLocalFrame* frame_; |
| 247 | 250 |
| 248 // TODO(hclam): get rid of these members and read from the pipeline directly. | 251 // TODO(hclam): get rid of these members and read from the pipeline directly. |
| 249 blink::WebMediaPlayer::NetworkState network_state_; | 252 blink::WebMediaPlayer::NetworkState network_state_; |
| 250 blink::WebMediaPlayer::ReadyState ready_state_; | 253 blink::WebMediaPlayer::ReadyState ready_state_; |
| 251 | 254 |
| 252 // Preload state for when |data_source_| is created after setPreload(). | 255 // Preload state for when |data_source_| is created after setPreload(). |
| 253 BufferedDataSource::Preload preload_; | 256 BufferedDataSource::Preload preload_; |
| 254 | 257 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 scoped_ptr<blink::WebContentDecryptionModuleResult> set_cdm_result_; | 350 scoped_ptr<blink::WebContentDecryptionModuleResult> set_cdm_result_; |
| 348 | 351 |
| 349 scoped_ptr<RendererFactory> renderer_factory_; | 352 scoped_ptr<RendererFactory> renderer_factory_; |
| 350 | 353 |
| 351 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 354 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 352 }; | 355 }; |
| 353 | 356 |
| 354 } // namespace media | 357 } // namespace media |
| 355 | 358 |
| 356 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 359 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |