Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 1567123002: Support CAST+WMPI on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fixes + comments addressed Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/blink/webmediaplayer_cast_android.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.h
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index f9c868d6bccce7922a5e6b18d55f6709f4c07305..ba03528cde0586e5ed147673922c16c0f41b3545 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -17,6 +17,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
+#include "build/build_config.h"
#include "media/base/cdm_factory.h"
#include "media/base/pipeline.h"
#include "media/base/renderer_factory.h"
@@ -36,6 +37,11 @@
#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
#include "url/gurl.h"
+#if defined(OS_ANDROID) // WMPI_CAST
+// Delete this file when WMPI_CAST is no longer needed.
+#include "media/blink/webmediaplayer_cast_android.h"
+#endif
+
namespace blink {
class WebGraphicsContext3D;
class WebLocalFrame;
@@ -189,10 +195,34 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
void OnHidden() override;
void OnShown() override;
+#if defined(OS_ANDROID) // WMPI_CAST
+ bool isRemote() const override;
+ void requestRemotePlayback() override;
+ void requestRemotePlaybackControl() override;
+
+ void SetMediaPlayerManager(
+ RendererMediaPlayerManagerInterface* media_player_manager);
+ void OnRemotePlaybackEnded();
+ void OnDisconnectedFromRemoteDevice(double t);
+ void SuspendForRemote();
+ void DisplayCastFrameAfterSuspend(const scoped_refptr<VideoFrame>& new_frame,
+ PipelineStatus status);
+ gfx::Size GetCanvasSize() const;
+ void SetDeviceScaleFactor(float scale_factor);
+#endif
+
private:
+ // Ask for the pipeline to be suspended, will call Suspend() when ready.
+ // (Possibly immediately.)
+ void ScheduleSuspend();
+
// Initiate suspending the pipeline.
void Suspend();
+ // Ask for the pipeline to be resumed, will call Resume() when ready.
+ // (Possibly immediately.)
+ void ScheduleResume();
+
// Initiate resuming the pipeline.
void Resume();
@@ -400,6 +430,10 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// Whether a CDM has been successfully attached.
bool is_cdm_attached_;
+#if defined(OS_ANDROID) // WMPI_CAST
+ WebMediaPlayerCast cast_impl_;
+#endif
+
scoped_ptr<RendererFactory> renderer_factory_;
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
« no previous file with comments | « media/blink/webmediaplayer_cast_android.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698