| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 273   void DataSourceInitialized(bool success); | 273   void DataSourceInitialized(bool success); | 
| 274 | 274 | 
| 275   // Called when the data source is downloading or paused. | 275   // Called when the data source is downloading or paused. | 
| 276   void NotifyDownloading(bool is_downloading); | 276   void NotifyDownloading(bool is_downloading); | 
| 277 | 277 | 
| 278   // Called by SurfaceManager when a surface is created. | 278   // Called by SurfaceManager when a surface is created. | 
| 279   void OnSurfaceCreated(int surface_id); | 279   void OnSurfaceCreated(int surface_id); | 
| 280 | 280 | 
| 281   // Called by GpuVideoDecoder on Android to request a surface to render to (if | 281   // Called by GpuVideoDecoder on Android to request a surface to render to (if | 
| 282   // necessary). | 282   // necessary). | 
| 283   void OnSurfaceRequested(const SurfaceCreatedCB& surface_created_cb); | 283   void OnSurfaceRequested(bool decoder_requires_restart_for_overlay, | 
|  | 284                           const SurfaceCreatedCB& surface_created_cb); | 
| 284 | 285 | 
| 285   // Creates a Renderer via the |renderer_factory_|. | 286   // Creates a Renderer via the |renderer_factory_|. | 
| 286   std::unique_ptr<Renderer> CreateRenderer(); | 287   std::unique_ptr<Renderer> CreateRenderer(); | 
| 287 | 288 | 
| 288   // Finishes starting the pipeline due to a call to load(). | 289   // Finishes starting the pipeline due to a call to load(). | 
| 289   void StartPipeline(); | 290   void StartPipeline(); | 
| 290 | 291 | 
| 291   // Helpers that set the network/ready state and notifies the client if | 292   // Helpers that set the network/ready state and notifies the client if | 
| 292   // they've changed. | 293   // they've changed. | 
| 293   void SetNetworkState(blink::WebMediaPlayer::NetworkState state); | 294   void SetNetworkState(blink::WebMediaPlayer::NetworkState state); | 
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 519   SurfaceManager* surface_manager_; | 520   SurfaceManager* surface_manager_; | 
| 520 | 521 | 
| 521   // For canceling ongoing surface creation requests when exiting fullscreen. | 522   // For canceling ongoing surface creation requests when exiting fullscreen. | 
| 522   base::CancelableCallback<void(int)> surface_created_cb_; | 523   base::CancelableCallback<void(int)> surface_created_cb_; | 
| 523 | 524 | 
| 524   // The current overlay surface id. Populated while in fullscreen once the | 525   // The current overlay surface id. Populated while in fullscreen once the | 
| 525   // surface is created. | 526   // surface is created. | 
| 526   int overlay_surface_id_; | 527   int overlay_surface_id_; | 
| 527 | 528 | 
| 528   // If a surface is requested before it's finished being created, the request | 529   // If a surface is requested before it's finished being created, the request | 
| 529   // is saved and satisfied once the surface is available. | 530   // is saved and satisfied once the surface is available. If the decoder does | 
| 530   SurfaceCreatedCB pending_surface_request_cb_; | 531   // not require restart to change surfaces, this is callback is kept until | 
|  | 532   // cleared by the decoder. | 
|  | 533   SurfaceCreatedCB set_surface_cb_; | 
| 531 | 534 | 
| 532   // Force to use SurfaceView instead of SurfaceTexture on Android. | 535   // Force to use SurfaceView instead of SurfaceTexture on Android. | 
| 533   bool force_video_overlays_; | 536   bool force_video_overlays_; | 
| 534 | 537 | 
| 535   // Prevent use of SurfaceView on Android. (Ignored when | 538   // Prevent use of SurfaceView on Android. (Ignored when | 
| 536   // |force_video_overlays_| is true.) | 539   // |force_video_overlays_| is true.) | 
| 537   bool disable_fullscreen_video_overlays_; | 540   bool disable_fullscreen_video_overlays_; | 
| 538 | 541 | 
| 539   // Suppresses calls to OnPipelineError() after destruction / shutdown has been | 542   // Suppresses calls to OnPipelineError() after destruction / shutdown has been | 
| 540   // started; prevents us from spuriously logging errors that are transient or | 543   // started; prevents us from spuriously logging errors that are transient or | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 575 | 578 | 
| 576   // Whether the player is currently in autoplay muted state. | 579   // Whether the player is currently in autoplay muted state. | 
| 577   bool autoplay_muted_ = false; | 580   bool autoplay_muted_ = false; | 
| 578 | 581 | 
| 579   DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 582   DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 
| 580 }; | 583 }; | 
| 581 | 584 | 
| 582 }  // namespace media | 585 }  // namespace media | 
| 583 | 586 | 
| 584 #endif  // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 587 #endif  // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 
| OLD | NEW | 
|---|