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 requestRemotePlaybackControl() override; | 197 void requestRemotePlaybackControl() override; |
198 | 198 |
199 void SetMediaPlayerManager( | 199 void SetMediaPlayerManager( |
200 RendererMediaPlayerManagerInterface* media_player_manager); | 200 RendererMediaPlayerManagerInterface* media_player_manager); |
201 void OnRemotePlaybackEnded(); | 201 void OnRemotePlaybackEnded(); |
202 void OnDisconnectedFromRemoteDevice(double t); | 202 void OnDisconnectedFromRemoteDevice(double t); |
203 void SuspendForRemote(); | 203 void SuspendForRemote(); |
204 void DisplayCastFrameAfterSuspend(const scoped_refptr<VideoFrame>& new_frame, | 204 void DisplayCastFrameAfterSuspend(const scoped_refptr<VideoFrame>& new_frame, |
205 PipelineStatus status); | 205 PipelineStatus status); |
206 gfx::Size GetCanvasSize() const; | 206 gfx::Size GetCanvasSize() const; |
| 207 |
207 void SetDeviceScaleFactor(float scale_factor); | 208 void SetDeviceScaleFactor(float scale_factor); |
| 209 void SetInVr(bool in_vr); |
208 void setPoster(const blink::WebURL& poster) override; | 210 void setPoster(const blink::WebURL& poster) override; |
209 void SetUseFallbackPath(bool use_fallback_path); | 211 void SetUseFallbackPath(bool use_fallback_path); |
210 #endif | 212 #endif |
211 | 213 |
212 // Called from WebMediaPlayerCast. | 214 // Called from WebMediaPlayerCast. |
213 // TODO(hubbe): WMPI_CAST make private. | 215 // TODO(hubbe): WMPI_CAST make private. |
214 void OnPipelineSeeked(bool time_updated); | 216 void OnPipelineSeeked(bool time_updated); |
215 | 217 |
216 // Restart the player/pipeline as soon as possible. This will destroy the | 218 // Restart the player/pipeline as soon as possible. This will destroy the |
217 // current renderer, if any, and create a new one via the RendererFactory; and | 219 // current renderer, if any, and create a new one via the RendererFactory; and |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 // is saved and satisfied once the surface is available. | 529 // is saved and satisfied once the surface is available. |
528 SurfaceCreatedCB pending_surface_request_cb_; | 530 SurfaceCreatedCB pending_surface_request_cb_; |
529 | 531 |
530 // Force to use SurfaceView instead of SurfaceTexture on Android. | 532 // Force to use SurfaceView instead of SurfaceTexture on Android. |
531 bool force_video_overlays_; | 533 bool force_video_overlays_; |
532 | 534 |
533 // Prevent use of SurfaceView on Android. (Ignored when | 535 // Prevent use of SurfaceView on Android. (Ignored when |
534 // |force_video_overlays_| is true.) | 536 // |force_video_overlays_| is true.) |
535 bool disable_fullscreen_video_overlays_; | 537 bool disable_fullscreen_video_overlays_; |
536 | 538 |
| 539 // Prevent use of SurfaceView on Android. (Overrides |
| 540 // |force_video_overlays_|.) |
| 541 bool in_vr_; |
| 542 |
537 // Suppresses calls to OnPipelineError() after destruction / shutdown has been | 543 // Suppresses calls to OnPipelineError() after destruction / shutdown has been |
538 // started; prevents us from spuriously logging errors that are transient or | 544 // started; prevents us from spuriously logging errors that are transient or |
539 // unimportant. | 545 // unimportant. |
540 bool suppress_destruction_errors_; | 546 bool suppress_destruction_errors_; |
541 | 547 |
542 // State indicating if it's okay to suspend or not. Updated on the first time | 548 // State indicating if it's okay to suspend or not. Updated on the first time |
543 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame | 549 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame |
544 // from the compositor will be queried to see if suspend is supported; the | 550 // from the compositor will be queried to see if suspend is supported; the |
545 // state will be set to YES or NO respectively if a frame is available. | 551 // state will be set to YES or NO respectively if a frame is available. |
546 enum class CanSuspendState { UNKNOWN, YES, NO }; | 552 enum class CanSuspendState { UNKNOWN, YES, NO }; |
(...skipping 18 matching lines...) Expand all Loading... |
565 | 571 |
566 // Monitors the player events. | 572 // Monitors the player events. |
567 base::WeakPtr<MediaObserver> observer_; | 573 base::WeakPtr<MediaObserver> observer_; |
568 | 574 |
569 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 575 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
570 }; | 576 }; |
571 | 577 |
572 } // namespace media | 578 } // namespace media |
573 | 579 |
574 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 580 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |