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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2204673004: WIP - WebMediaPlayer switch media renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add switching of CdmFactory. Created 4 years, 4 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
Index: media/blink/webmediaplayer_impl.h
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index edee39b72ecd923944efcf8947280af47f12a26e..2b993dedc8c13cad9466b46ec7c406a2a940cc4c 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -229,6 +229,11 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
bool is_suspended;
};
+ // Notify that video entered/exited full screen playing back. We may switch
+ // the media renderer in these calls.
+ void videoEnteredFullscreen() override;
+ void videoExitedFullscreen() override;
liberato (no reviews please) 2016/08/29 16:49:12 these names are a little confusing with respect to
xjz 2016/09/09 23:13:06 Changed the names to ancestorEntered/exitedFullscr
+
private:
friend class WebMediaPlayerImplTest;
@@ -349,6 +354,15 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// paused state after some idle timeout.
void ScheduleIdlePauseTimer();
+ // Remoter IPC messages handler to indicate mirroring session starts/ends.
+ void OnSinkAvailable();
liberato (no reviews please) 2016/08/29 16:49:12 does anybody call these?
xjz 2016/09/09 23:13:06 This is called by Remoter, which is not implemente
+ void OnSinkGone();
+
+ // Switch between the media renderer for local playing back and the remoting
+ // media renderer. |is_media_remoting_| should be set accordingly before
+ // calling this method.
+ void SwitchMediaRenderer();
+
blink::WebLocalFrame* frame_;
// The playback state last reported to |delegate_|, to avoid setting duplicate
@@ -535,6 +549,21 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// state as part of the call to OnHidden().
base::OneShotTimer background_pause_timer_;
+ // Indicates whether is in media remoting.
+ // TODO(erickung): Use this as an indicator for the RendererType when creating
+ // media renderer.
+ bool is_media_remoting_;
+
+ // Indicates whether is in mirroring or remoting. This is set through the
+ // Remoter IPC messages.
+ bool is_remote_sink_available_;
+
+ // Set this true when demuxer encounters encrypted stream.
+ bool is_encrypted_content_;
+
+ // Callback used to check whether the remoting CdmFactory is used.
+ WebMediaPlayerParams::IsRemoteCdmCB is_remote_cdm_cb_;
+
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698