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

Unified Diff: android_webview/native/external_video_surface_container_impl.cc

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: android_webview/native/external_video_surface_container_impl.cc
diff --git a/android_webview/native/external_video_surface_container_impl.cc b/android_webview/native/external_video_surface_container_impl.cc
index 286a4b77e08446b6682d0e5430a2f7e23b43ab23..84d5ad462651849de4e0f161217c9771d865f85c 100644
--- a/android_webview/native/external_video_surface_container_impl.cc
+++ b/android_webview/native/external_video_surface_container_impl.cc
@@ -43,6 +43,19 @@ void ExternalVideoSurfaceContainerImpl::RequestExternalVideoSurface(
env, jobject_.obj(), static_cast<jint>(player_id));
}
+int ExternalVideoSurfaceContainerImpl::GetCurrentPlayerId() {
+ JNIEnv* env = AttachCurrentThread();
+
+ int current_player = static_cast<int>(
+ Java_ExternalVideoSurfaceContainer_getCurrentPlayerId(
+ env, jobject_.obj()));
+
+ if (current_player < 0)
+ return kInvalidPlayerId;
+ else
+ return current_player;
+}
+
void ExternalVideoSurfaceContainerImpl::ReleaseExternalVideoSurface(
int player_id) {
JNIEnv* env = AttachCurrentThread();

Powered by Google App Engine
This is Rietveld 408576698