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

Issue 2075303002: [DO NOT COMMIT] Initial MediaPlayerRenderer plumbing and basic features (Closed)

Created:
4 years, 6 months ago by tguilbert
Modified:
4 years, 2 months ago
CC:
Aaron Boodman, abarth-chromium, alokp+watch_chromium.org, avayvod+watch_chromium.org, ben+mojo_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-media_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, Anton Obzhirov
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[DO NOT COMMIT] Initial MediaPlayerRenderer plumbing and basic features UPDATE: The relevant code is mostly checked in. Closing this issue. See the bugs tied to https://bugs.chromium.org/p/chromium/issues/detail?id=619729 in order to get the full picture of the code that landed. This CL is a work in progress and not ready for commiting. This change introduces the overall plumbing for the MediaPlayerRenderer. Before this change can be commited, the depcheck violations need to be fixed (MediaPlayerRenderer needs to be moved to a different location). Here are some issues that are on my mind, but that might not be addressed in this CL: - We request the SurfaceView in the Renderer process, which then forwards this request to the Browser process. This should be updated so we request the SurfaceView from the browser directly. - MediaPlayerRenderer currently forwards all requests directly to the MediaPlayerBridge, without really caring for it's state. This causes seek to fail often. - Demuxers are normally responsible for notifying the pipeline of a duration change. The URL demuxer does not have duration information. I have added the OnDurationChanged method to the RendererClient interface. I'd rather not muddy that interface, suggestions are very welcome. - The player only supports fullscreen, but does not immediately transition into fullscreen on playback start. - There are blue frames when transitioning in/out of fullscreen. - The start time is not maintained between entering/exiting fullscreen. - A lot of the classes have many TODOs. I expect to spend a lot of time addressing the ones in MediaPlayerRenderer after this CL, so do not worry too much about the functional part of that class, unless therer is a big red flag somewhere. I am looking for all types of feedback, and all comments are very appreciated. In order to build this, setting 'target_os = "android"', 'is_debug = true' and 'force_mojo_media_player_renderer = true' should be enough, but I have mostly tested code when 'enable_mojo_media = true' was also set. BUG=619729 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Total comments: 16
Unified diffs Side-by-side diffs Delta from patch set Stats (+969 lines, -18 lines) Patch
M content/browser/frame_host/render_frame_host_impl.cc View 3 chunks +16 lines, -0 lines 2 comments Download
M content/renderer/render_frame_impl.cc View 3 chunks +17 lines, -3 lines 2 comments Download
M media/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M media/base/android/BUILD.gn View 1 chunk +13 lines, -0 lines 0 comments Download
M media/base/android/demuxer_stream_player_params.cc View 1 chunk +2 lines, -0 lines 0 comments Download
A media/base/android/media_player_renderer.h View 1 chunk +125 lines, -0 lines 2 comments Download
A media/base/android/media_player_renderer.cc View 1 chunk +235 lines, -0 lines 1 comment Download
A media/base/android/media_player_renderer_factory.h View 1 chunk +52 lines, -0 lines 0 comments Download
A media/base/android/media_player_renderer_factory.cc View 1 chunk +46 lines, -0 lines 0 comments Download
A media/base/android/url_demuxer_stream.h View 1 chunk +40 lines, -0 lines 1 comment Download
A media/base/android/url_demuxer_stream.cc View 1 chunk +55 lines, -0 lines 0 comments Download
A media/base/android/url_demuxer_stream_provider.h View 1 chunk +49 lines, -0 lines 0 comments Download
A media/base/android/url_demuxer_stream_provider.cc View 1 chunk +70 lines, -0 lines 0 comments Download
M media/base/demuxer_stream.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/base/mock_filters.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/base/pipeline_impl.cc View 6 chunks +28 lines, -0 lines 0 comments Download
M media/base/renderer_client.h View 2 chunks +7 lines, -2 lines 1 comment Download
M media/base/stream_parser_buffer.cc View 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 4 chunks +11 lines, -1 line 1 comment Download
M media/filters/chunk_demuxer.cc View 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/decoder_selector.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M media/filters/frame_processor.cc View 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/frame_processor_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/media_source_state.cc View 1 chunk +1 line, -0 lines 0 comments Download
M media/media_options.gni View 1 chunk +5 lines, -0 lines 0 comments Download
M media/mojo/clients/mojo_renderer_factory.h View 3 chunks +5 lines, -1 line 0 comments Download
M media/mojo/clients/mojo_renderer_factory.cc View 3 chunks +14 lines, -4 lines 1 comment Download
M media/mojo/clients/mojo_renderer_impl.h View 4 chunks +17 lines, -0 lines 0 comments Download
M media/mojo/clients/mojo_renderer_impl.cc View 1 6 chunks +50 lines, -2 lines 0 comments Download
M media/mojo/common/media_type_converters.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M media/mojo/interfaces/renderer.mojom View 2 chunks +7 lines, -1 line 4 comments Download
M media/mojo/services/BUILD.gn View 1 chunk +7 lines, -0 lines 0 comments Download
M media/mojo/services/media_mojo_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
A media/mojo/services/mojo_media_player_renderer_helper.h View 1 chunk +23 lines, -0 lines 0 comments Download
A media/mojo/services/mojo_media_player_renderer_helper.cc View 1 chunk +24 lines, -0 lines 0 comments Download
M media/mojo/services/mojo_renderer_service.h View 4 chunks +6 lines, -1 line 0 comments Download
M media/mojo/services/mojo_renderer_service.cc View 3 chunks +21 lines, -0 lines 1 comment Download
M media/renderers/audio_renderer_impl_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M media/renderers/renderer_impl.cc View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
tguilbert
PTAL :) I will gladly answer heftier questions in person or via hangouts. Thanks! Thomas
4 years, 6 months ago (2016-06-17 22:41:33 UTC) #3
DaleCurtis
Haven't looked over it yet. This is fine for getting the gist of the final ...
4 years, 6 months ago (2016-06-17 22:43:26 UTC) #4
xhwang
Sorry for the delay. I'll take a highlevel look at this later today.
4 years, 6 months ago (2016-06-21 17:21:34 UTC) #5
xhwang
Overall this looks pretty good. I didn't review details in the new MediaPlayerRenderer though. Here ...
4 years, 6 months ago (2016-06-22 17:39:03 UTC) #6
xhwang
https://chromiumcodereview.appspot.com/2075303002/diff/40001/media/mojo/interfaces/renderer.mojom File media/mojo/interfaces/renderer.mojom (right): https://chromiumcodereview.appspot.com/2075303002/diff/40001/media/mojo/interfaces/renderer.mojom#newcode18 media/mojo/interfaces/renderer.mojom:18: int64 surface_id) => (bool success); On 2016/06/22 17:39:02, xhwang ...
4 years, 6 months ago (2016-06-22 17:43:09 UTC) #7
sandersd (OOO until July 31)
https://chromiumcodereview.appspot.com/2075303002/diff/40001/media/mojo/interfaces/renderer.mojom File media/mojo/interfaces/renderer.mojom (right): https://chromiumcodereview.appspot.com/2075303002/diff/40001/media/mojo/interfaces/renderer.mojom#newcode18 media/mojo/interfaces/renderer.mojom:18: int64 surface_id) => (bool success); The last time we ...
4 years, 6 months ago (2016-06-23 18:43:35 UTC) #8
liberato (no reviews please)
https://codereview.chromium.org/2075303002/diff/40001/media/base/android/media_player_renderer.cc File media/base/android/media_player_renderer.cc (right): https://codereview.chromium.org/2075303002/diff/40001/media/base/android/media_player_renderer.cc#newcode51 media/base/android/media_player_renderer.cc:51: media_player_->SetVideoSurface(content::GetViewSurface(surface_id_)); i think that using SV initially during development ...
4 years, 6 months ago (2016-06-23 21:31:39 UTC) #9
Julien Isorce Samsung
4 years, 4 months ago (2016-08-08 13:01:58 UTC) #10
https://codereview.chromium.org/2075303002/diff/40001/media/blink/webmediapla...
File media/blink/webmediaplayer_impl.cc (right):

https://codereview.chromium.org/2075303002/diff/40001/media/blink/webmediapla...
media/blink/webmediaplayer_impl.cc:1303: return;
Hi, not sure what CL is the most up to date with
https://codereview.chromium.org/2161083004/diff/1/media/blink/webmediaplayer_...,
just in case I am duplicating the question here:

Hi, sorry for the short introduction, I was thinking of creating a new
MojoPipelineService but then I saw your solution that re-use MojoRenderer + this
pseudo demuxer that just passes the url. You said that creating a proper service
would have required too much unnecessary refactoring "Removing the Demuxer from
the pipeline when using a MediaPlayer would require a non-trivial amount of
refactoring, that might not be worth it." So I was wondering if after all this
work you are still thinking that there is no need for a proper
MojoPipelineService ? Nice solution btw !

Powered by Google App Engine
This is Rietveld 408576698