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

Issue 2115603002: Use FFmpegVideoDecoder from a UtilityProcess (Closed)

Created:
4 years, 5 months ago by Julien Isorce Samsung
Modified:
3 years, 11 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, feature-media-reviews_chromium.org, creis+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, posciak+watch_chromium.org, nasko+codewatch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, alokp+watch_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use FFmpegVideoDecoder from a UtilityProcess Add UtilityMojoMediaClient. The result is already quite beneficial compared to do decoding in the renderer process. For example killing the utility process almost does not affect the user. Whereas killing the renderer process make the tab unavailable, i.e. the user will see the classic "Aw, Snap! Something went wrong while displaying this web page". At the moment it just does not restart from the position where it has crashed, but it sounds doable to implement the feature. Instead, it pauses on the last frame seen. And clicking play will for now restart playback from the beginning. It also seems beneficial compared to do decoding in the gpu process. Indeed when killing the gpu process, the browser has to restart the whole GL bits (and sometimes just decides to fallback to software rendering so no gpu process). Also it can affects others tabs. BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Patch Set 1 #

Patch Set 2 : Rebase and implement generic MojoSharedBufferVideoFrame::CreateYUV #

Patch Set 3 : Fix hack in video frame pool by implementing WrapMojoSharedBufferVideoFrame #

Patch Set 4 : Removed accidentally pushed CL 2382103002 #

Patch Set 5 : Add VideoFramePoolDelegate iface and MojoVideoFramePoolDelegate impl #

Patch Set 6 : Add utility_mojo_media_client.h/utility_mojo_media_client.cc #

Patch Set 7 : Rebase #

Patch Set 8 : add media/base/video_decoder.h include #

Patch Set 9 : Fix build error on win #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -12 lines) Patch
M content/utility/utility_service_factory.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M media/base/video_frame_pool.h View 1 2 3 4 3 chunks +18 lines, -1 line 2 comments Download
M media/base/video_frame_pool.cc View 1 2 3 4 6 chunks +27 lines, -9 lines 1 comment Download
M media/filters/ffmpeg_video_decoder.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 1 comment Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M media/media_options.gni View 1 2 3 4 5 2 chunks +4 lines, -1 line 2 comments Download
M media/mojo/common/mojo_shared_buffer_video_frame.h View 1 2 3 4 5 3 chunks +25 lines, -0 lines 0 comments Download
M media/mojo/common/mojo_shared_buffer_video_frame.cc View 1 2 3 4 5 6 7 8 1 chunk +110 lines, -0 lines 1 comment Download
M media/mojo/services/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M media/mojo/services/media_service_factory.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M media/mojo/services/media_service_factory.cc View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
A media/mojo/services/utility_mojo_media_client.h View 1 2 3 4 5 6 7 1 chunk +36 lines, -0 lines 0 comments Download
A media/mojo/services/utility_mojo_media_client.cc View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (23 generated)
Julien Isorce Samsung
Hi, This CL is not like in a final state, I am submitting it for ...
4 years ago (2016-12-12 23:03:10 UTC) #24
sandersd (OOO until July 31)
I will leave questions about the right direction for this to xhwang@. Overall code comments ...
4 years ago (2016-12-15 00:38:02 UTC) #25
Julien Isorce Samsung
On 2016/12/15 00:38:02, sandersd wrote: > I will leave questions about the right direction for ...
4 years ago (2016-12-15 16:59:39 UTC) #26
xhwang
I'll be OOO next week so I am afraid I won't have time to do ...
4 years ago (2016-12-15 18:58:10 UTC) #27
Julien Isorce Samsung
3 years, 11 months ago (2017-01-17 17:06:11 UTC) #28
I addressed remarks here https://codereview.chromium.org/2633383003/

On 2016/12/15 18:58:10, xhwang wrote:
> I'll be OOO next week so I am afraid I won't have time to do a thorough
review.
> Here are some super early thoughts.
> 
> 1. A bug and design doc would be really nice for high level discussion than in
> code reviews.

Done bug and doc: http://crbug/681852

> 
> 2. I agree with the benefits you described. But:
> - I assume the crash rate is low :)
> - By moving FFVD to the utility process, it'll be harder to repro/debug
crashes.
> In the utility process, we don't have all the info we have in the render
> process.
> - Running a remote video decoder does come with costs. Performance-wise, IPC
is
> not free. Also, transmitting compressed buffers involves some memory copy.
This
> will also adds latency to the whole media pipeline.
> 
> 3. With (2), I don't feel we should enable this by default on any platform. If
> you think this is something you want in your product, one option is to add a
new
> gn arg which can be enabled by your product, but default to false.

Done, it will only be enable through gn arg, see bug above.

Thx!

Powered by Google App Engine
This is Rietveld 408576698