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

Issue 1736643005: Decouple Media Service (Closed)

Created:
4 years, 10 months ago by Fady Samuel
Modified:
4 years, 9 months ago
Reviewers:
dcheng, piman
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Decouple Media Service This CL moves media object creation IPCs into a separate MediaChannel object that lives above GpuChannel. content/gpu (or mus in the future) becomes the layer that lives above both gpu and media and glues the two together. This may not reflect what a hypothetical future mojo interface might look like. If we want to preserve the ordering guarantees we have now, media interfaces should be associated interfaces that branch off a gpu channel and its gpu interfaces. This seems to suggest that gpu should know about media or else there should exist a factory interface that glues both media and gpu as we have here. I don't want to block this CL on long term mojo interface discussions as any direction we choose is just a refactor away. Until then, in the interest of making forward progress, I'd like to assume there exists a layer above both media and gpu. Thoughts? BUG=586384 Committed: https://crrev.com/028d76aa627788a7252fd6de39304f67e00837ab Cr-Commit-Position: refs/heads/master@{#379211} Committed: https://crrev.com/2ddf3b764c008dfe984af88c247a46815243ce16 Cr-Commit-Position: refs/heads/master@{#379411}

Patch Set 1 #

Patch Set 2 : Magic #

Patch Set 3 : Remove media code in GpuCommandBufferStub #

Patch Set 4 : Cleanup #

Patch Set 5 : Addressed piman@'s comments #

Patch Set 6 : Moved Jpeg to MediaChannel #

Patch Set 7 : Removed some JpegDecoder dependencies in GpuChannel #

Patch Set 8 : Removed GpuCommandBufferStubDelegate #

Patch Set 9 : Moved media_messages.h to content/common/gpu/media #

Patch Set 10 : More cleanup #

Patch Set 11 : Rebased #

Patch Set 12 : Added missing handler macro #

Patch Set 13 : Removed invalid DCHECK #

Patch Set 14 : Try to make VC2013 happy about SFINAE #

Patch Set 15 : Another try #

Patch Set 16 : Another try to fix Windows #

Total comments: 2

Patch Set 17 : Remove base changes #

Total comments: 7

Patch Set 18 : Added missing includes #

Patch Set 19 : Addressed Daniel's comments #

Total comments: 8

Patch Set 20 : Addressed dcheng's comments #

Patch Set 21 : Replaced DCHECK with if guards #

Patch Set 22 : Removed a bad DCHECK #

Patch Set 23 : Addressed Antoine's comment #

Total comments: 1

Patch Set 24 : Addressed nit + fixed compile issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+412 lines, -469 lines) Patch
M content/common/content_message_generator.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M content/common/gpu/client/gpu_video_decode_accelerator_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M content/common/gpu/client/gpu_video_encode_accelerator_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +9 lines, -4 lines 0 comments Download
M content/common/gpu/gpu_channel.h View 1 2 3 4 5 6 7 8 9 10 7 chunks +8 lines, -7 lines 0 comments Download
M content/common/gpu/gpu_channel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +12 lines, -31 lines 0 comments Download
M content/common/gpu/gpu_channel_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -3 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 3 4 2 chunks +2 lines, -12 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +2 lines, -43 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -7 lines 0 comments Download
A content/common/gpu/media/create_video_encoder_params.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +26 lines, -0 lines 0 comments Download
A content/common/gpu/media/create_video_encoder_params.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +19 lines, -0 lines 0 comments Download
M content/common/gpu/media/gpu_jpeg_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/media/gpu_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/media/gpu_video_encode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A content/common/gpu/media/media_channel.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +51 lines, -0 lines 0 comments Download
A content/common/gpu/media/media_channel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +144 lines, -0 lines 0 comments Download
A + content/common/gpu/media/media_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +29 lines, -17 lines 0 comments Download
A + content/common/gpu/media/media_messages.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A content/common/gpu/media/media_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +39 lines, -0 lines 0 comments Download
A content/common/gpu/media/media_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +40 lines, -0 lines 0 comments Download
D content/common/gpu/media_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -273 lines 0 comments Download
D content/common/gpu/media_messages.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -61 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +8 lines, -2 lines 0 comments Download
M content/gpu/gpu_child_thread.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 89 (39 generated)
Fady Samuel
Hi Antoine, This patch is not done yet but I wanted to get some early ...
4 years, 10 months ago (2016-02-26 02:49:53 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/20001
4 years, 10 months ago (2016-02-26 02:56:40 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/40001
4 years, 10 months ago (2016-02-26 03:03:25 UTC) #6
piman
On Thu, Feb 25, 2016 at 6:49 PM, <fsamuel@chromium.org> wrote: > Reviewers: piman > CL: ...
4 years, 10 months ago (2016-02-26 03:38:53 UTC) #7
Fady Samuel
PTAL Antoine! What do you think of this approach? GpuChildThread has a MediaService object that ...
4 years, 9 months ago (2016-02-29 21:26:14 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/80001
4 years, 9 months ago (2016-02-29 21:47:59 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/220001
4 years, 9 months ago (2016-03-02 21:43:20 UTC) #12
Fady Samuel
PTAL Antoine, I think this patch is now ready for your review.
4 years, 9 months ago (2016-03-02 21:52:10 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/124567)
4 years, 9 months ago (2016-03-02 22:18:09 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/240001
4 years, 9 months ago (2016-03-02 23:06:29 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/154234)
4 years, 9 months ago (2016-03-02 23:48:27 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/260001
4 years, 9 months ago (2016-03-03 01:40:57 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/112210)
4 years, 9 months ago (2016-03-03 02:20:40 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/260001
4 years, 9 months ago (2016-03-03 02:22:02 UTC) #29
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/154367)
4 years, 9 months ago (2016-03-03 02:50:38 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/280001
4 years, 9 months ago (2016-03-03 17:40:08 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/112476)
4 years, 9 months ago (2016-03-03 18:50:16 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/300001
4 years, 9 months ago (2016-03-03 18:58:59 UTC) #37
piman
LGTM, this is great.
4 years, 9 months ago (2016-03-03 20:09:59 UTC) #38
Fady Samuel
+danakj@ for base/tuple.h +jam@ for ipc/ipc_message_templates.h IPC_BEGIN_MESSAGE_MAP_WITH_PARAM didn't play nice with IPC_MESSAGE_HANDLER_DELAY_REPLY. Unfortunately, as far ...
4 years, 9 months ago (2016-03-03 20:29:46 UTC) #39
Fady Samuel
+jam@, +danakj@ for real.
4 years, 9 months ago (2016-03-03 20:30:14 UTC) #41
danakj
https://codereview.chromium.org/1736643005/diff/300001/base/tuple.h File base/tuple.h (right): https://codereview.chromium.org/1736643005/diff/300001/base/tuple.h#newcode252 base/tuple.h:252: typename std::enable_if<!std::is_void<P>::value>::type* = nullptr> I know you're working around ...
4 years, 9 months ago (2016-03-03 21:00:28 UTC) #42
danakj
https://codereview.chromium.org/1736643005/diff/300001/ipc/ipc_message_templates.h File ipc/ipc_message_templates.h (right): https://codereview.chromium.org/1736643005/diff/300001/ipc/ipc_message_templates.h#newcode45 ipc/ipc_message_templates.h:45: DispatchToMethod(ObjT* obj, Or use this?
4 years, 9 months ago (2016-03-03 21:01:40 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-03 21:37:46 UTC) #45
Fady Samuel
-jam@, -danakj@, +dcheng@ for _message* files: just moving some messages around.
4 years, 9 months ago (2016-03-03 23:23:20 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/320001
4 years, 9 months ago (2016-03-03 23:26:06 UTC) #49
dcheng
https://codereview.chromium.org/1736643005/diff/320001/content/common/gpu/media/media_channel.cc File content/common/gpu/media/media_channel.cc (right): https://codereview.chromium.org/1736643005/diff/320001/content/common/gpu/media/media_channel.cc#newcode44 content/common/gpu/media/media_channel.cc:44: IPC_MESSAGE_HANDLER_GENERIC(GpuCommandBufferMsg_CreateVideoDecoder, Why IPC_MESSAGE_HANDLER_GENERIC? Why not use the macros that ...
4 years, 9 months ago (2016-03-03 23:46:43 UTC) #50
Fady Samuel
PTAL Daniel! I switched to control messages! https://codereview.chromium.org/1736643005/diff/320001/content/common/gpu/media/media_channel.cc File content/common/gpu/media/media_channel.cc (right): https://codereview.chromium.org/1736643005/diff/320001/content/common/gpu/media/media_channel.cc#newcode44 content/common/gpu/media/media_channel.cc:44: IPC_MESSAGE_HANDLER_GENERIC(GpuCommandBufferMsg_CreateVideoDecoder, On ...
4 years, 9 months ago (2016-03-04 01:46:32 UTC) #52
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/360001
4 years, 9 months ago (2016-03-04 01:46:44 UTC) #53
dcheng
https://codereview.chromium.org/1736643005/diff/360001/content/common/gpu/media/create_video_encoder_params.h File content/common/gpu/media/create_video_encoder_params.h (right): https://codereview.chromium.org/1736643005/diff/360001/content/common/gpu/media/create_video_encoder_params.h#newcode15 content/common/gpu/media/create_video_encoder_params.h:15: CreateVideoEncoderParams(); Formatting. https://codereview.chromium.org/1736643005/diff/360001/content/common/gpu/media/create_video_encoder_params.h#newcode25 content/common/gpu/media/create_video_encoder_params.h:25: } // namespace content Nit: ...
4 years, 9 months ago (2016-03-04 02:00:11 UTC) #54
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/168633)
4 years, 9 months ago (2016-03-04 02:09:05 UTC) #56
Fady Samuel
PTAL Daniel! https://codereview.chromium.org/1736643005/diff/360001/content/common/gpu/media/create_video_encoder_params.h File content/common/gpu/media/create_video_encoder_params.h (right): https://codereview.chromium.org/1736643005/diff/360001/content/common/gpu/media/create_video_encoder_params.h#newcode15 content/common/gpu/media/create_video_encoder_params.h:15: CreateVideoEncoderParams(); On 2016/03/04 02:00:11, dcheng wrote: > ...
4 years, 9 months ago (2016-03-04 02:30:00 UTC) #58
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/380001
4 years, 9 months ago (2016-03-04 02:30:36 UTC) #59
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/400001
4 years, 9 months ago (2016-03-04 02:52:25 UTC) #61
dcheng
lgtm
4 years, 9 months ago (2016-03-04 02:58:11 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/420001
4 years, 9 months ago (2016-03-04 03:11:12 UTC) #65
commit-bot: I haz the power
Committed patchset #22 (id:420001)
4 years, 9 months ago (2016-03-04 04:33:19 UTC) #67
commit-bot: I haz the power
Patchset 22 (id:??) landed as https://crrev.com/028d76aa627788a7252fd6de39304f67e00837ab Cr-Commit-Position: refs/heads/master@{#379211}
4 years, 9 months ago (2016-03-04 04:34:34 UTC) #69
Jamie Madill
On 2016/03/04 04:34:34, commit-bot: I haz the power wrote: > Patchset 22 (id:??) landed as ...
4 years, 9 months ago (2016-03-04 16:13:26 UTC) #70
Jamie Madill
A revert of this CL (patchset #22 id:420001) has been created in https://codereview.chromium.org/1767673002/ by jmadill@chromium.org. ...
4 years, 9 months ago (2016-03-04 16:22:10 UTC) #71
piman
https://codereview.chromium.org/1736643005/diff/320001/content/common/gpu/media/media_channel.cc File content/common/gpu/media/media_channel.cc (right): https://codereview.chromium.org/1736643005/diff/320001/content/common/gpu/media/media_channel.cc#newcode44 content/common/gpu/media/media_channel.cc:44: IPC_MESSAGE_HANDLER_GENERIC(GpuCommandBufferMsg_CreateVideoDecoder, On 2016/03/04 01:46:32, Fady Samuel wrote: > On ...
4 years, 9 months ago (2016-03-04 20:13:28 UTC) #72
Fady Samuel
PTAL Antoine and Daniel! I've taken the approach we discussed online! Thanks for your help!
4 years, 9 months ago (2016-03-04 22:53:59 UTC) #74
Fady Samuel
PTAL Antoine and Daniel! I've taken the approach we discussed offline! Thanks for your help!
4 years, 9 months ago (2016-03-04 22:54:04 UTC) #75
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/440001
4 years, 9 months ago (2016-03-04 22:55:21 UTC) #77
piman
lgtm
4 years, 9 months ago (2016-03-04 23:02:04 UTC) #78
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/103033) chromeos_x86-generic_chromium_compile_only_ng on ...
4 years, 9 months ago (2016-03-04 23:07:39 UTC) #80
dcheng
lgtm with nits, thanks https://codereview.chromium.org/1736643005/diff/440001/content/common/gpu/media/media_channel.cc File content/common/gpu/media/media_channel.cc (right): https://codereview.chromium.org/1736643005/diff/440001/content/common/gpu/media/media_channel.cc#newcode120 content/common/gpu/media/media_channel.cc:120: void MediaChannel::OnCreateVideoEncoder(int command_buffer_route_id, Nit: int32_t
4 years, 9 months ago (2016-03-04 23:07:39 UTC) #81
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736643005/450001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736643005/450001
4 years, 9 months ago (2016-03-04 23:19:23 UTC) #84
commit-bot: I haz the power
Failed to apply patch for content/common/gpu/media/media_messages.cc: While running git apply --index -3 -p1; error: content/common/gpu/media_messages.cc: ...
4 years, 9 months ago (2016-03-05 00:32:23 UTC) #86
commit-bot: I haz the power
4 years, 9 months ago (2016-03-05 00:32:46 UTC) #89
Message was sent while issue was closed.
Patchset 24 (id:??) landed as
https://crrev.com/2ddf3b764c008dfe984af88c247a46815243ce16
Cr-Commit-Position: refs/heads/master@{#379411}

Powered by Google App Engine
This is Rietveld 408576698