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

Unified Diff: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java

Issue 714643002: Pause EME player whose external surface is stolen by another player (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
Index: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java
index 59d2c8f6d4d3a473f4fc96c1247a969f7043f71c..31e3b4f35ae48b5c65d4936ad8790b0627d7d55c 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java
@@ -129,6 +129,8 @@ public class ExternalVideoSurfaceContainer implements SurfaceHolder.Callback {
*/
@CalledByNative
protected void requestExternalVideoSurface(int playerId) {
+ assert playerId != INVALID_PLAYER_ID;
+
if (mPlayerId == playerId) return;
setActiveContainer(this);
@@ -140,6 +142,14 @@ public class ExternalVideoSurfaceContainer implements SurfaceHolder.Callback {
}
/**
+ * Returns id of player currently using the external video surface.
+ */
+ @CalledByNative
+ protected int getCurrentPlayerId() {
+ return mPlayerId;
+ }
+
+ /**
* Called when a media player wants to release an external video surface.
* @param playerId The ID of the media player.
*/

Powered by Google App Engine
This is Rietveld 408576698