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

Issue 1655083002: Enable SurfaceView fullscreen video on Android with WebMediaPlayerImpl (Closed)

Created:
4 years, 10 months ago by watk
Modified:
4 years, 10 months ago
CC:
avayvod+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-media_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-blink_chromium.org, nasko+codewatch_chromium.org, philipj_slow, posciak+watch_chromium.org, nessy, vcarbune.chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@avda-sv
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable Android SurfaceView fullscreen video with WMPI This CL enables SurfaceView fullscreen video with the unified media pipeline in cases where we use the AVDA deferred rendering strategy today. * There's a new media interface called SurfaceManager with two methods: CreateFullscreenSurface() and NaturalSizeChanged(). * SurfaceManager is implemented by RendererSurfaceViewManager, which is a RenderFrameObserver, and BrowserSurfaceViewManager, which is created for each RenderFrame by MediaWebContentsObserverAndroid. * BrowserSurfaceViewManager creates a ContentVideoView in response to a CreateFullscreenSurface message, and registers it in a surface map that the decoder can look up in the GPU process. * WMPI interacts with SurfaceManager on behalf of the decoder. It passes GpuVideoDecoder a callback for requesting surfaces which it calls before initializing VDAs. * In response to the callback, if the player is in fullscreen WMPI will pass the request to the SurfaceManager which will return the surface id to GVD. If the player is not in fullscreen WMPI will return a null surface id. * When GVD gets a surface id back it completes its initialization by calling VDA::Initialize with the surface id and the VDA will render to the given surface. * WMPI records that it got a surface request callback so that it knows that future fullscreen transitions will require a restart of the decoder in order to switch surfaces. * A future CL will allow us to switch the surface dynamically without requiring a restart. BUG=533630 Committed: https://crrev.com/dee516f91d460baf825f25503063a898ec3aaf3a Cr-Commit-Position: refs/heads/master@{#376068}

Patch Set 1 #

Total comments: 13

Patch Set 2 : rebase only #

Patch Set 3 : cleaned up #

Total comments: 11

Patch Set 4 : rebase #

Patch Set 5 : Adressed comments; moved blink parts to another CL #

Total comments: 2

Patch Set 6 : clarified SurfaceViewManager behavior #

Patch Set 7 : Renamed ipc messages #

Patch Set 8 : rebase #

Patch Set 9 : Update mojo renderer to take a null RequestSurfaceCB #

Patch Set 10 : Updated chromecast CreateRenderer override #

Patch Set 11 : s/SurfaceCreated/RequestSurface/ in chromecast #

Patch Set 12 : Add an empty destructor to satisfy chromium-style #

Unified diffs Side-by-side diffs Delta from patch set Stats (+566 lines, -39 lines) Patch
M chromecast/renderer/media/chromecast_media_renderer_factory.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M chromecast/renderer/media/chromecast_media_renderer_factory.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
A content/browser/media/android/browser_surface_view_manager.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +53 lines, -0 lines 0 comments Download
A content/browser/media/android/browser_surface_view_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +86 lines, -0 lines 0 comments Download
M content/browser/media/android/media_web_contents_observer_android.h View 1 2 3 4 5 6 7 5 chunks +15 lines, -4 lines 0 comments Download
M content/browser/media/android/media_web_contents_observer_android.cc View 1 2 3 4 5 6 7 6 chunks +35 lines, -0 lines 0 comments Download
M content/common/content_message_generator.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
A content/common/media/surface_view_manager_messages_android.h View 1 2 3 4 5 6 1 chunk +26 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A content/renderer/media/android/renderer_surface_view_manager.h View 1 2 3 4 1 chunk +46 lines, -0 lines 0 comments Download
A content/renderer/media/android/renderer_surface_view_manager.cc View 1 2 3 4 5 6 1 chunk +50 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 4 chunks +7 lines, -1 line 0 comments Download
M ipc/ipc_message_start.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/base/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/base/renderer_factory.h View 2 chunks +3 lines, -1 line 0 comments Download
A media/base/surface_manager.h View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 chunks +25 lines, -1 line 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 7 chunks +69 lines, -4 lines 0 comments Download
M media/blink/webmediaplayer_params.h View 3 4 4 chunks +6 lines, -1 line 0 comments Download
M media/blink/webmediaplayer_params.cc View 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M media/filters/gpu_video_decoder.h View 1 2 3 4 4 chunks +8 lines, -1 line 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 3 4 5 chunks +51 lines, -14 lines 0 comments Download
M media/mojo/services/mojo_renderer_factory.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M media/mojo/services/mojo_renderer_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M media/mojo/services/service_factory_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M media/renderers/default_renderer_factory.h View 1 chunk +2 lines, -1 line 0 comments Download
M media/renderers/default_renderer_factory.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M media/video/video_decode_accelerator.h View 1 2 3 chunks +6 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 53 (21 generated)
watk
Dale, could you please take a high level look at this? I'm hoping to get ...
4 years, 10 months ago (2016-02-02 00:13:11 UTC) #2
DaleCurtis
Before I take a look can you add a description which describes what the flow ...
4 years, 10 months ago (2016-02-02 00:22:10 UTC) #3
watk
On 2016/02/02 00:22:10, DaleCurtis wrote: > Before I take a look can you add a ...
4 years, 10 months ago (2016-02-02 00:44:28 UTC) #5
DaleCurtis
https://codereview.chromium.org/1655083002/diff/1/content/browser/media/android/browser_surface_view_manager.cc File content/browser/media/android/browser_surface_view_manager.cc (right): https://codereview.chromium.org/1655083002/diff/1/content/browser/media/android/browser_surface_view_manager.cc#newcode49 content/browser/media/android/browser_surface_view_manager.cc:49: // XXX: plumb through the size change event. Do ...
4 years, 10 months ago (2016-02-02 01:01:33 UTC) #6
watk
Thanks Dale, I'll work on moving it to the Delegate and adding the video size ...
4 years, 10 months ago (2016-02-02 20:38:14 UTC) #7
watk
Actually +liberato. Please take a look at my previous comment Frank.
4 years, 10 months ago (2016-02-02 20:39:22 UTC) #9
liberato (no reviews please)
this is quite exciting! still tracing through details. i was looking over the design doc ...
4 years, 10 months ago (2016-02-02 22:46:57 UTC) #10
watk
Thanks for the comments! I've cleaned things up, commented it, and fixed a few bugs. ...
4 years, 10 months ago (2016-02-05 03:42:30 UTC) #12
liberato (no reviews please)
lgtm % nits. i almost commented that it should be checked in without the flag ...
4 years, 10 months ago (2016-02-05 22:09:47 UTC) #13
DaleCurtis
https://codereview.chromium.org/1655083002/diff/60001/content/browser/media/android/browser_surface_view_manager.h File content/browser/media/android/browser_surface_view_manager.h (right): https://codereview.chromium.org/1655083002/diff/60001/content/browser/media/android/browser_surface_view_manager.h#newcode32 content/browser/media/android/browser_surface_view_manager.h:32: void OnCreateFullscreenSurface(gfx::Size video_size); Should we pass these by const& ...
4 years, 10 months ago (2016-02-06 00:17:39 UTC) #14
watk
PTAL. GVD changed a bit to rebase on xhwang's change. The 4->5 diff is hard ...
4 years, 10 months ago (2016-02-11 23:03:25 UTC) #20
DaleCurtis
lgtm
4 years, 10 months ago (2016-02-12 00:42:58 UTC) #21
watk
sievers@chromium.org: Please review changes in content/renderer kenrb@chromium.org: Please review changes in content/common and ipc/
4 years, 10 months ago (2016-02-12 02:14:48 UTC) #23
no sievers
https://codereview.chromium.org/1655083002/diff/180001/content/renderer/media/android/renderer_surface_view_manager.cc File content/renderer/media/android/renderer_surface_view_manager.cc (right): https://codereview.chromium.org/1655083002/diff/180001/content/renderer/media/android/renderer_surface_view_manager.cc#newcode32 content/renderer/media/android/renderer_surface_view_manager.cc:32: DCHECK(!surface_created_cb.is_null()); You mean DCHECK(surface_created_cb.is_null())? How is it avoided that ...
4 years, 10 months ago (2016-02-16 19:03:47 UTC) #24
watk
https://codereview.chromium.org/1655083002/diff/180001/content/renderer/media/android/renderer_surface_view_manager.cc File content/renderer/media/android/renderer_surface_view_manager.cc (right): https://codereview.chromium.org/1655083002/diff/180001/content/renderer/media/android/renderer_surface_view_manager.cc#newcode32 content/renderer/media/android/renderer_surface_view_manager.cc:32: DCHECK(!surface_created_cb.is_null()); On 2016/02/16 19:03:47, sievers wrote: > You mean ...
4 years, 10 months ago (2016-02-16 20:04:00 UTC) #25
no sievers
content/renderer lgtm
4 years, 10 months ago (2016-02-16 20:07:54 UTC) #26
kenrb
The names RendererSurfaceViewManager and BrowserSurfaceViewManager seem to go against convention, where they would normally be ...
4 years, 10 months ago (2016-02-16 21:18:44 UTC) #27
watk
On 2016/02/16 21:18:44, kenrb wrote: > The names RendererSurfaceViewManager and BrowserSurfaceViewManager seem to go > ...
4 years, 10 months ago (2016-02-16 21:36:02 UTC) #28
kenrb
On 2016/02/16 21:36:02, watk wrote: > On 2016/02/16 21:18:44, kenrb wrote: > > The names ...
4 years, 10 months ago (2016-02-17 18:43:02 UTC) #29
watk
On 2016/02/17 18:43:02, kenrb wrote: > On 2016/02/16 21:36:02, watk wrote: > > On 2016/02/16 ...
4 years, 10 months ago (2016-02-17 21:06:08 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1655083002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1655083002/220001
4 years, 10 months ago (2016-02-17 21:08:49 UTC) #32
kenrb
ipc lgtm
4 years, 10 months ago (2016-02-17 21:11:47 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/23099) android_chromium_gn_compile_dbg on ...
4 years, 10 months ago (2016-02-17 21:15:55 UTC) #36
watk
dalecurtis@ PTAL at the changes in media/mojo
4 years, 10 months ago (2016-02-17 22:26:18 UTC) #37
watk
halliwell@chromium.org: Please review changes in chromecast/
4 years, 10 months ago (2016-02-17 23:04:02 UTC) #39
halliwell
On 2016/02/17 23:04:02, watk wrote: > mailto:halliwell@chromium.org: Please review changes in chromecast/ chromecast/ lgtm
4 years, 10 months ago (2016-02-17 23:11:54 UTC) #40
DaleCurtis
lgtm
4 years, 10 months ago (2016-02-17 23:27:16 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1655083002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1655083002/300001
4 years, 10 months ago (2016-02-17 23:53:47 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/23343)
4 years, 10 months ago (2016-02-18 00:17:15 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1655083002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1655083002/320001
4 years, 10 months ago (2016-02-18 00:29:35 UTC) #49
commit-bot: I haz the power
Committed patchset #12 (id:320001)
4 years, 10 months ago (2016-02-18 02:22:29 UTC) #51
commit-bot: I haz the power
4 years, 10 months ago (2016-02-18 02:23:28 UTC) #53
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/dee516f91d460baf825f25503063a898ec3aaf3a
Cr-Commit-Position: refs/heads/master@{#376068}

Powered by Google App Engine
This is Rietveld 408576698