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

Issue 2640153004: Add mailbox-based Mojo VideoFrame variant. (Closed)

Created:
3 years, 11 months ago by sandersd (OOO until July 31)
Modified:
3 years, 9 months ago
Reviewers:
xhwang, nasko
CC:
chromium-reviews, qsr+mojo_chromium.org, Aaron Boodman, posciak+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, feature-media-reviews_chromium.org, alokp+watch_chromium.org, xjz+watch_chromium.org, darin (slow to review), miu+watch_chromium.org, dcheng
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add mailbox-based Mojo VideoFrame variant. This CL creates a foundation for plumbing mailbox-based Mojo VideoFrames, but does not fully implement all of the callbacks. The expected implementation (in MojoVideoDecoderService) is: - Once a decoder running in the GPU process has decoded a frame, MojoVideoDecoderService can attach a |release_token| to the OnVideoFrameDecoded() IPC along with the frame. In practice, the impl will generate one whenever the video frame is texture-backed, and it will store refs to all such outstanding video frames (keyed by this generated |release_token|). - The renderer handles the video frame as usual, flowing through the regular pipeline and compositing steps. Once compositing is done, the compositor sets the |release_sync_token| based on its own command buffer. The frame is then destructed (as usual). - MojoVideoDecoder receives the destruction callback. At this point the |release_sync_token| has been verified as part of hopping to the media thread and command buffer. It now forwards the sync point to the GPU process via the OnReleaseMailbox() Mojo IPC. - MojoVideoDecoderService (on the GPU side) will check that the sync point is valid, terminating the Mojo connection if it is not. It then looks up, updates, and removes the video frame from its map. If there is an attached destruction observer, it will receive the |release_sync_point|, and the decoder will know that the textures can be re-used after waiting for that. Note that if the media command buffer and compositor command buffer are ever merged (again), the validation step won't happen as part of the hopping anymore, and validation on the GPU side could fail (timing dependent). We would need to switch to sending the OnReleaseMailbox() IPC via the GPU channel instead of Mojo in that case (or take the performance hit of validating the sync point from the Renderer explicitly). BUG=522298 Review-Url: https://codereview.chromium.org/2640153004 Cr-Commit-Position: refs/heads/master@{#454427} Committed: https://chromium.googlesource.com/chromium/src/+/ef768ffc5dbe5364af1db5c04da524109b4b5f08

Patch Set 1 #

Total comments: 14

Patch Set 2 : Rebase. #

Patch Set 3 : Switch to an interface method. #

Total comments: 11

Patch Set 4 #

Patch Set 5 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -22 lines) Patch
M media/base/video_frame.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M media/base/video_frame.cc View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M media/mojo/clients/mojo_video_decoder.h View 1 2 4 chunks +10 lines, -1 line 0 comments Download
M media/mojo/clients/mojo_video_decoder.cc View 1 2 3 4 4 chunks +24 lines, -3 lines 0 comments Download
M media/mojo/common/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M media/mojo/common/media_type_converters.cc View 1 2 3 2 chunks +26 lines, -14 lines 0 comments Download
M media/mojo/interfaces/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M media/mojo/interfaces/media_types.mojom View 3 chunks +19 lines, -1 line 0 comments Download
M media/mojo/interfaces/video_decoder.mojom View 1 2 2 chunks +12 lines, -2 lines 0 comments Download
M media/mojo/services/mojo_video_decoder_service.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M media/mojo/services/mojo_video_decoder_service.cc View 1 2 3 2 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 30 (13 generated)
sandersd (OOO until July 31)
This outlines the last piece of MojoVideoDecoder, and I'm sending it now for early feedback ...
3 years, 11 months ago (2017-01-19 19:40:48 UTC) #2
xhwang
sorry for the delay. I'll take a look and provide feedback at the latest by ...
3 years, 11 months ago (2017-01-23 22:05:41 UTC) #3
xhwang
Sorry again for the delay. Overall it looks very reasonable. I just have a few ...
3 years, 11 months ago (2017-01-25 18:25:09 UTC) #4
sandersd (OOO until July 31)
https://codereview.chromium.org/2640153004/diff/1/media/base/video_frame.cc File media/base/video_frame.cc (right): https://codereview.chromium.org/2640153004/diff/1/media/base/video_frame.cc#newcode775 media/base/video_frame.cc:775: mailbox_holders_release_cb_ = std::move(release_mailbox_cb); On 2017/01/25 18:25:09, xhwang_slow wrote: > ...
3 years, 11 months ago (2017-01-26 23:49:05 UTC) #5
sandersd (OOO until July 31)
dcheng@: Please security review changes to .mojom files and the type converters. Since I'm once ...
3 years, 11 months ago (2017-01-27 00:13:26 UTC) #8
sandersd (OOO until July 31)
On 2017/01/27 00:13:26, sandersd wrote: > dcheng@: Please security review changes to .mojom files and ...
3 years, 10 months ago (2017-02-07 19:08:44 UTC) #9
xhwang
sorry I missed this one lgtm
3 years, 10 months ago (2017-02-08 06:30:47 UTC) #10
sandersd (OOO until July 31)
Over to nasko@ for security review. (See original message to dcheng@ for background on how ...
3 years, 10 months ago (2017-02-13 22:25:52 UTC) #13
nasko
On 2017/02/07 19:08:44, sandersd wrote: > On 2017/01/27 00:13:26, sandersd wrote: > > dcheng@: Please ...
3 years, 10 months ago (2017-02-16 21:19:05 UTC) #14
nasko
I will be out next week, so please use tsepez@ or dcheng@ for further follow ...
3 years, 10 months ago (2017-02-16 21:37:29 UTC) #15
sandersd (OOO until July 31)
> Since you mention this interface is not live yet, it should really be converted ...
3 years, 10 months ago (2017-02-25 01:19:38 UTC) #17
nasko
Overall LGTM, but please share the bug which tracks converting the code to using StructTrait ...
3 years, 9 months ago (2017-03-01 19:48:47 UTC) #18
sandersd (OOO until July 31)
On 2017/03/01 19:48:47, nasko (slow) wrote: > Overall LGTM, but please share the bug which ...
3 years, 9 months ago (2017-03-01 20:08:11 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2640153004/80001
3 years, 9 months ago (2017-03-02 02:07:50 UTC) #22
commit-bot: I haz the power
Failed to apply patch for media/mojo/services/mojo_video_decoder_service.h: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-03-02 05:57:47 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2640153004/100001
3 years, 9 months ago (2017-03-02 21:37:46 UTC) #27
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 23:22:31 UTC) #30
Message was sent while issue was closed.
Committed patchset #5 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/ef768ffc5dbe5364af1db5c04da5...

Powered by Google App Engine
This is Rietveld 408576698