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

Issue 570183002: Make the pause of video playback and video capture consistent (Closed)

Created:
6 years, 3 months ago by michaelbai
Modified:
6 years, 2 months ago
CC:
chromium-reviews, android-webview-reviews_chromium.org, Michael van Ouwerkerk
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

This fix the issue that video frame is still sent to peer when activity is in background in WebView. Previously, we couldn't trigger renderer's WasHidden/WasShown event in WebView because the compositer can't stop there, so the dedicated pause video IPC message was added as a work around. Now we override the blink's page visibility, so renderer's onHide/onShow methods could be called, and compositer is still running. This patch - Call ContentViewCore.onHide()/onShow() in AwContents - Video playback is changed to hook into WasHidden() in RenderMediaPlayerManager to pause video, and remove a bunch of video pause code in browser side. So, The pause of video capture and playback are both handled in renderer side now. There is no dedicated pause video IPC message. BUG=414506 Committed: https://crrev.com/54193f591d4c60750fb5c7f98761b3b72a3f0577 Cr-Commit-Position: refs/heads/master@{#296792}

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : also make video playback consistent #

Total comments: 4

Patch Set 5 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -50 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 3 chunks +2 lines, -2 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M android_webview/renderer/aw_content_renderer_client.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M android_webview/renderer/aw_content_renderer_client.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.cc View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/media/media_web_contents_observer.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/media/media_web_contents_observer.cc View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M content/browser/web_contents/web_contents_android.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_android.cc View 1 2 3 4 2 chunks +0 lines, -8 lines 0 comments Download
M content/common/media/media_player_messages_android.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M content/public/browser/android/content_view_core.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/media/android/renderer_media_player_manager.h View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M content/renderer/media/android/renderer_media_player_manager.cc View 1 2 3 4 4 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 49 (7 generated)
boliu
https://codereview.chromium.org/570183002/diff/1/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/570183002/diff/1/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode1399 android_webview/java/src/org/chromium/android_webview/AwContents.java:1399: mContentViewCore.onHide(); Can't do this!! To the content layer, webview ...
6 years, 3 months ago (2014-09-15 23:26:48 UTC) #2
michaelbai
PTAL
6 years, 3 months ago (2014-09-16 00:31:03 UTC) #3
boliu
lgtm Can you also clean up the video case in a follow up, essentially revert ...
6 years, 3 months ago (2014-09-16 00:35:49 UTC) #4
michaelbai
https://codereview.chromium.org/570183002/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/570183002/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode775 android_webview/java/src/org/chromium/android_webview/AwContents.java:775: // The only call to onShow. onHide should never ...
6 years, 3 months ago (2014-09-16 04:02:27 UTC) #5
michaelbai
Will have follow up patch
6 years, 3 months ago (2014-09-16 04:03:07 UTC) #6
michaelbai
6 years, 3 months ago (2014-09-16 04:22:13 UTC) #8
michaelbai
PTAL
6 years, 3 months ago (2014-09-19 21:37:00 UTC) #10
boliu
Is there anything broken in PS3 that's fixed in PS4? If not, we can submit ...
6 years, 3 months ago (2014-09-19 21:39:45 UTC) #11
michaelbai
On 2014/09/19 21:39:45, boliu wrote: > Is there anything broken in PS3 that's fixed in ...
6 years, 3 months ago (2014-09-19 21:49:25 UTC) #12
qinmin
On 2014/09/19 21:37:00, michaelbai wrote: > PTAL Please check this issue as it is why ...
6 years, 3 months ago (2014-09-19 21:55:46 UTC) #13
boliu
On 2014/09/19 21:49:25, michaelbai wrote: > On 2014/09/19 21:39:45, boliu wrote: > > Is there ...
6 years, 3 months ago (2014-09-19 21:55:54 UTC) #14
boliu
On 2014/09/19 21:55:46, qinmin wrote: > On 2014/09/19 21:37:00, michaelbai wrote: > > PTAL > ...
6 years, 3 months ago (2014-09-19 21:57:37 UTC) #15
michaelbai
On 2014/09/19 21:55:46, qinmin wrote: > On 2014/09/19 21:37:00, michaelbai wrote: > > PTAL > ...
6 years, 3 months ago (2014-09-19 22:19:05 UTC) #16
michaelbai
On 2014/09/19 21:55:46, qinmin wrote: > On 2014/09/19 21:37:00, michaelbai wrote: > > PTAL > ...
6 years, 3 months ago (2014-09-19 22:19:09 UTC) #17
michaelbai
On 2014/09/19 21:55:54, boliu wrote: > On 2014/09/19 21:49:25, michaelbai wrote: > > On 2014/09/19 ...
6 years, 3 months ago (2014-09-19 22:24:15 UTC) #18
qinmin
lgtm
6 years, 3 months ago (2014-09-19 22:45:45 UTC) #19
boliu
lgtm https://codereview.chromium.org/570183002/diff/60001/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (right): https://codereview.chromium.org/570183002/diff/60001/android_webview/native/aw_contents.cc#newcode871 android_webview/native/aw_contents.cc:871: cvc->PauseOrResumeGeolocation(paused); do you know how chrome handles pausing ...
6 years, 3 months ago (2014-09-20 01:05:21 UTC) #20
michaelbai
https://codereview.chromium.org/570183002/diff/60001/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (right): https://codereview.chromium.org/570183002/diff/60001/android_webview/native/aw_contents.cc#newcode871 android_webview/native/aw_contents.cc:871: cvc->PauseOrResumeGeolocation(paused); On 2014/09/20 01:05:21, boliu wrote: > do you ...
6 years, 3 months ago (2014-09-22 05:48:11 UTC) #21
boliu
On 2014/09/22 05:48:11, michaelbai wrote: > https://codereview.chromium.org/570183002/diff/60001/android_webview/native/aw_contents.cc > File android_webview/native/aw_contents.cc (right): > > https://codereview.chromium.org/570183002/diff/60001/android_webview/native/aw_contents.cc#newcode871 > ...
6 years, 3 months ago (2014-09-22 15:50:55 UTC) #22
michaelbai
On 2014/09/22 15:50:55, boliu wrote: > On 2014/09/22 05:48:11, michaelbai wrote: > > > https://codereview.chromium.org/570183002/diff/60001/android_webview/native/aw_contents.cc ...
6 years, 3 months ago (2014-09-22 18:06:12 UTC) #23
boliu
On 2014/09/22 18:06:12, michaelbai wrote: > On 2014/09/22 15:50:55, boliu wrote: > > On 2014/09/22 ...
6 years, 3 months ago (2014-09-22 18:09:36 UTC) #24
michaelbai
On 2014/09/22 18:09:36, boliu wrote: > On 2014/09/22 18:06:12, michaelbai wrote: > > On 2014/09/22 ...
6 years, 3 months ago (2014-09-22 18:11:56 UTC) #25
benm (inactive)
On 2014/09/22 18:11:56, michaelbai wrote: > On 2014/09/22 18:09:36, boliu wrote: > > On 2014/09/22 ...
6 years, 3 months ago (2014-09-23 10:57:39 UTC) #26
benm (inactive)
+mvanouwerkerk for geolocation question in #26
6 years, 3 months ago (2014-09-23 10:58:18 UTC) #27
michaelbai
On 2014/09/23 10:58:18, benm wrote: > +mvanouwerkerk for geolocation question in #26 I didn't check ...
6 years, 3 months ago (2014-09-23 16:05:41 UTC) #28
benm (inactive)
On 23 September 2014 17:05, <michaelbai@chromium.org> wrote: > On 2014/09/23 10:58:18, benm wrote: > >> ...
6 years, 3 months ago (2014-09-23 17:09:29 UTC) #29
michaelbai
On 2014/09/23 17:09:29, benm wrote: > On 23 September 2014 17:05, <mailto:michaelbai@chromium.org> wrote: > > ...
6 years, 3 months ago (2014-09-23 20:38:40 UTC) #30
michaelbai
@benm, any concern about this?
6 years, 3 months ago (2014-09-24 20:18:15 UTC) #31
benm (inactive)
lgtm
6 years, 3 months ago (2014-09-24 20:28:44 UTC) #32
michaelbai
Avi@ for content/public/ xhwang@ for content/browser/media wfh@ for content/common/media
6 years, 3 months ago (2014-09-24 20:55:21 UTC) #34
michaelbai
Ted for content/browser/android and content/browser/web_contents/*android*
6 years, 3 months ago (2014-09-24 20:57:05 UTC) #35
Will Harris
content/common/media/media_player_messages_android.h lgtm
6 years, 3 months ago (2014-09-24 21:08:33 UTC) #36
Ted C
lgtm
6 years, 3 months ago (2014-09-24 22:17:56 UTC) #37
xhwang
https://codereview.chromium.org/570183002/diff/60001/content/renderer/media/android/renderer_media_player_manager.cc File content/renderer/media/android/renderer_media_player_manager.cc (right): https://codereview.chromium.org/570183002/diff/60001/content/renderer/media/android/renderer_media_player_manager.cc#newcode64 content/renderer/media/android/renderer_media_player_manager.cc:64: ReleaseVideoResources(); I like the idea of this CL. But ...
6 years, 3 months ago (2014-09-24 22:52:40 UTC) #38
michaelbai
@xhwang, PTAL, I also add more information in description. https://codereview.chromium.org/570183002/diff/60001/content/renderer/media/android/renderer_media_player_manager.cc File content/renderer/media/android/renderer_media_player_manager.cc (right): https://codereview.chromium.org/570183002/diff/60001/content/renderer/media/android/renderer_media_player_manager.cc#newcode64 content/renderer/media/android/renderer_media_player_manager.cc:64: ...
6 years, 3 months ago (2014-09-24 23:24:09 UTC) #39
xhwang
On 2014/09/24 23:24:09, michaelbai wrote: > @xhwang, PTAL, I also add more information in description. ...
6 years, 3 months ago (2014-09-24 23:34:07 UTC) #40
Avi (use Gerrit)
content/public lgtm
6 years, 3 months ago (2014-09-25 04:19:04 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/570183002/80001
6 years, 2 months ago (2014-09-25 17:53:30 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/7241)
6 years, 2 months ago (2014-09-25 18:41:28 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/570183002/80001
6 years, 2 months ago (2014-09-25 20:49:48 UTC) #47
commit-bot: I haz the power
Committed patchset #5 (id:80001) as 3af61e50556cec1e87dc59304b9af4526b1b954f
6 years, 2 months ago (2014-09-25 21:15:05 UTC) #48
commit-bot: I haz the power
6 years, 2 months ago (2014-09-25 21:15:53 UTC) #49
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/54193f591d4c60750fb5c7f98761b3b72a3f0577
Cr-Commit-Position: refs/heads/master@{#296792}

Powered by Google App Engine
This is Rietveld 408576698