Index: media/blink/webmediaplayer_impl.h |
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h |
index f1a9f3e250968df92b03fe1bb6845e42d8769c40..a9de87d9d188eb5561822aefd9817d4679ce3c0c 100644 |
--- a/media/blink/webmediaplayer_impl.h |
+++ b/media/blink/webmediaplayer_impl.h |
@@ -21,6 +21,7 @@ |
#include "media/base/cdm_factory.h" |
#include "media/base/pipeline.h" |
#include "media/base/renderer_factory.h" |
+#include "media/base/surface_manager.h" |
#include "media/base/text_track.h" |
#include "media/blink/buffered_data_source.h" |
#include "media/blink/buffered_data_source_host_impl.h" |
@@ -59,7 +60,6 @@ class WebLayerImpl; |
} |
namespace media { |
- |
class AudioHardwareConfig; |
class ChunkDemuxer; |
class GpuVideoAcceleratorFactories; |
@@ -181,6 +181,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
blink::WebContentDecryptionModule* cdm, |
blink::WebContentDecryptionModuleResult result) override; |
+ void enteredFullscreen() override; |
+ void exitedFullscreen() override; |
+ |
void OnPipelineSeeked(bool time_changed, PipelineStatus status); |
void OnPipelineSuspended(PipelineStatus status); |
void OnPipelineEnded(); |
@@ -229,6 +232,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
// Initiate resuming the pipeline. |
void Resume(); |
+ // Ask for the renderer to be restarted (destructed and recreated). |
+ void ScheduleRestart(); |
+ |
// Called after |defer_load_cb_| has decided to allow the load. If |
// |defer_load_cb_| is null this is called immediately. |
void DoLoad(LoadType load_type, |
@@ -241,6 +247,8 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
// Called when the data source is downloading or paused. |
void NotifyDownloading(bool is_downloading); |
+ void OnSurfaceRequested(const SurfaceCreatedCB& surface_created_cb); |
+ |
// Creates a Renderer via the |renderer_factory_|. |
scoped_ptr<Renderer> CreateRenderer(); |
@@ -369,6 +377,13 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
// Set while resuming to detect double-resume. |
bool resuming_; |
+ // Set when doing a restart (a suspend and resume in sequence) of the pipeline |
+ // in order to destruct and reinitialize the decoders. This is separate from |
+ // |pending_resume_| and |pending_suspend_| because they can be elided in |
+ // certain cases, whereas for a restart they must happen. |
+ // TODO(sandersd,watk): Create a simpler interface for a pipeline restart. |
+ bool pending_suspend_resume_cycle_; |
+ |
// TODO(scherkus): Replace with an explicit ended signal to HTMLMediaElement, |
// see http://crbug.com/409280 |
bool ended_; |
@@ -385,6 +400,11 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
// changes. |
bool should_notify_time_changed_; |
+ bool fullscreen_; |
+ |
+ // Whether the current decoder requires a restart on fullscreen transitions. |
+ bool decoder_requires_restart_for_fullscreen_; |
+ |
blink::WebMediaPlayerClient* client_; |
blink::WebMediaPlayerEncryptedMediaClient* encrypted_client_; |
@@ -451,6 +471,10 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
scoped_ptr<RendererFactory> renderer_factory_; |
+ // For requesting surfaces on behalf of the Android H/W decoder in fullscreen. |
+ // This will be null everywhere but Android. |
+ SurfaceManager* surface_manager_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
}; |