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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 void SetMediaPlayerManager( | 197 void SetMediaPlayerManager( |
198 RendererMediaPlayerManagerInterface* media_player_manager); | 198 RendererMediaPlayerManagerInterface* media_player_manager); |
199 void OnRemotePlaybackEnded(); | 199 void OnRemotePlaybackEnded(); |
200 void OnDisconnectedFromRemoteDevice(double t); | 200 void OnDisconnectedFromRemoteDevice(double t); |
201 void SuspendForRemote(); | 201 void SuspendForRemote(); |
202 void DisplayCastFrameAfterSuspend(const scoped_refptr<VideoFrame>& new_frame, | 202 void DisplayCastFrameAfterSuspend(const scoped_refptr<VideoFrame>& new_frame, |
203 PipelineStatus status); | 203 PipelineStatus status); |
204 gfx::Size GetCanvasSize() const; | 204 gfx::Size GetCanvasSize() const; |
205 void SetDeviceScaleFactor(float scale_factor); | 205 void SetDeviceScaleFactor(float scale_factor); |
206 void setPoster(const blink::WebURL& poster) override; | 206 void setPoster(const blink::WebURL& poster) override; |
| 207 void EnableFallbackMediaPlayer(GURL url); |
207 #endif | 208 #endif |
208 | 209 |
209 // Called from WebMediaPlayerCast. | 210 // Called from WebMediaPlayerCast. |
210 // TODO(hubbe): WMPI_CAST make private. | 211 // TODO(hubbe): WMPI_CAST make private. |
211 void OnPipelineSeeked(bool time_updated); | 212 void OnPipelineSeeked(bool time_updated); |
212 | 213 |
213 // Distinct states that |delegate_| can be in. | 214 // Distinct states that |delegate_| can be in. |
214 // TODO(sandersd): This should move into WebMediaPlayerDelegate. | 215 // TODO(sandersd): This should move into WebMediaPlayerDelegate. |
215 // (Public for testing.) | 216 // (Public for testing.) |
216 enum class DelegateState { | 217 enum class DelegateState { |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 // unimportant. | 519 // unimportant. |
519 bool suppress_destruction_errors_; | 520 bool suppress_destruction_errors_; |
520 | 521 |
521 // State indicating if it's okay to suspend or not. Updated on the first time | 522 // State indicating if it's okay to suspend or not. Updated on the first time |
522 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame | 523 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame |
523 // from the compositor will be queried to see if suspend is supported; the | 524 // from the compositor will be queried to see if suspend is supported; the |
524 // state will be set to YES or NO respectively if a frame is available. | 525 // state will be set to YES or NO respectively if a frame is available. |
525 enum class CanSuspendState { UNKNOWN, YES, NO }; | 526 enum class CanSuspendState { UNKNOWN, YES, NO }; |
526 CanSuspendState can_suspend_state_; | 527 CanSuspendState can_suspend_state_; |
527 | 528 |
| 529 // TODO(tguilber): Can this be 'deduced' from the url index parameter? |
| 530 // URL to be used in Android fallback scenarios (e.g. HLS playback via |
| 531 // the MediaPlayerRenderer) |
| 532 GURL fallback_url_; |
| 533 bool use_fallback_path_; |
| 534 |
528 // Called some-time after OnHidden() if the media was suspended in a playing | 535 // Called some-time after OnHidden() if the media was suspended in a playing |
529 // state as part of the call to OnHidden(). | 536 // state as part of the call to OnHidden(). |
530 base::OneShotTimer background_pause_timer_; | 537 base::OneShotTimer background_pause_timer_; |
531 | 538 |
532 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 539 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
533 }; | 540 }; |
534 | 541 |
535 } // namespace media | 542 } // namespace media |
536 | 543 |
537 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 544 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |