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

Issue 1737253002: Handle Alpha channel in Canvas capture (Closed)

Created:
4 years, 10 months ago by emircan
Modified:
4 years, 9 months ago
CC:
avayvod+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, imcheng+watch_chromium.org, isheriff+watch_chromium.org, jam, jasonroberts+watch_google.com, mcasas+watch_chromium.org, miu+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, philipj_slow, posciak+watch_chromium.org, xjz+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle Alpha channel in Canvas capture This CL changes the output frame format in canvas capture from I420 to YV12A so that alpha channel is preserved. The change discussion is here [0]. As a result, each MediaStreamSink would be responsible for handling YV12A frames. For that purpose VideoUtil::WrapAsI420VideoFrame() is added to each appropriate sink. [0] https://github.com/w3c/mediacapture-fromelement/issues/30 [1] https://code.google.com/p/chromium/codesearch#chromium/src/content/public/renderer/media_stream_sink.h&l=18&ct=xref_jump_to_def&cl=GROK&gsn=MediaStreamSink BUG=524218 TEST= https://cdn.rawgit.com/uysalere/js-demos/master/canvascapture3.html TBR=bbudge@chromium.org Committed: https://crrev.com/ec1e7ff3b75787d3290ba5a899db8ef4ca79d302 Cr-Commit-Position: refs/heads/master@{#379932}

Patch Set 1 #

Total comments: 15

Patch Set 2 : #

Total comments: 20

Patch Set 3 : mcasas@ comments. #

Total comments: 2

Patch Set 4 : mcasas@ nits. #

Patch Set 5 : Rebase #

Total comments: 5

Patch Set 6 : bbudge@ nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -62 lines) Patch
M chrome/renderer/media/cast_rtp_stream.cc View 1 2 3 4 2 chunks +13 lines, -1 line 0 comments Download
M content/renderer/media/canvas_capture_handler.cc View 1 2 4 chunks +24 lines, -10 lines 0 comments Download
M content/renderer/media/canvas_capture_handler_unittest.cc View 1 2 3 4 8 chunks +36 lines, -17 lines 0 comments Download
M content/renderer/media/media_stream_video_renderer_sink_unittest.cc View 1 2 3 chunks +41 lines, -4 lines 0 comments Download
M content/renderer/media/media_stream_video_track.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M content/renderer/media/video_track_adapter.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/media/video_track_recorder.cc View 1 2 3 4 2 chunks +13 lines, -1 line 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc View 1 2 3 chunks +12 lines, -4 lines 0 comments Download
M content/renderer/pepper/pepper_media_stream_video_track_host.cc View 1 2 3 4 5 2 chunks +7 lines, -2 lines 0 comments Download
M content/renderer/pepper/pepper_video_source_host.cc View 1 2 2 chunks +13 lines, -1 line 0 comments Download
M media/base/mac/video_frame_mac_unittests.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/base/video_frame.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/base/video_frame.cc View 1 2 3 4 2 chunks +30 lines, -11 lines 0 comments Download
M media/base/video_frame_pool.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M media/base/video_frame_unittest.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M media/base/video_util.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M media/base/video_util.cc View 1 2 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (21 generated)
emircan
PTAL.
4 years, 10 months ago (2016-02-25 20:01:20 UTC) #3
mcasas
https://codereview.chromium.org/1737253002/diff/1/content/renderer/media/canvas_capture_handler.cc File content/renderer/media/canvas_capture_handler.cc (right): https://codereview.chromium.org/1737253002/diff/1/content/renderer/media/canvas_capture_handler.cc#newcode201 content/renderer/media/canvas_capture_handler.cc:201: video_frame->data(media::VideoFrame::kAPlane)[p] = temp_data_[p * 4 + 3]; Hmm it ...
4 years, 10 months ago (2016-02-25 22:06:26 UTC) #4
Pawel Osciak
https://codereview.chromium.org/1737253002/diff/1/media/base/video_frame.h File media/base/video_frame.h (right): https://codereview.chromium.org/1737253002/diff/1/media/base/video_frame.h#newcode382 media/base/video_frame.h:382: // Converts a frame with YV12A format into I420 ...
4 years, 10 months ago (2016-02-26 00:32:51 UTC) #6
emircan
https://codereview.chromium.org/1737253002/diff/1/content/renderer/media/canvas_capture_handler.cc File content/renderer/media/canvas_capture_handler.cc (right): https://codereview.chromium.org/1737253002/diff/1/content/renderer/media/canvas_capture_handler.cc#newcode201 content/renderer/media/canvas_capture_handler.cc:201: video_frame->data(media::VideoFrame::kAPlane)[p] = temp_data_[p * 4 + 3]; On 2016/02/25 ...
4 years, 10 months ago (2016-02-26 01:33:08 UTC) #7
Pawel Osciak
https://codereview.chromium.org/1737253002/diff/1/media/base/video_frame.h File media/base/video_frame.h (right): https://codereview.chromium.org/1737253002/diff/1/media/base/video_frame.h#newcode382 media/base/video_frame.h:382: // Converts a frame with YV12A format into I420 ...
4 years, 10 months ago (2016-02-26 01:51:25 UTC) #8
emircan
On 2016/02/26 01:51:25, Pawel Osciak wrote: > https://codereview.chromium.org/1737253002/diff/1/media/base/video_frame.h > File media/base/video_frame.h (right): > > https://codereview.chromium.org/1737253002/diff/1/media/base/video_frame.h#newcode382 ...
4 years, 9 months ago (2016-02-29 20:57:39 UTC) #11
mcasas
https://codereview.chromium.org/1737253002/diff/60001/content/renderer/media/canvas_capture_handler.cc File content/renderer/media/canvas_capture_handler.cc (right): https://codereview.chromium.org/1737253002/diff/60001/content/renderer/media/canvas_capture_handler.cc#newcode185 content/renderer/media/canvas_capture_handler.cc:185: const bool isOpaque = image->isOpaque(); Move to l.190. https://codereview.chromium.org/1737253002/diff/60001/content/renderer/media/media_stream_video_renderer_sink_unittest.cc ...
4 years, 9 months ago (2016-02-29 23:48:01 UTC) #12
emircan
https://codereview.chromium.org/1737253002/diff/60001/content/renderer/media/canvas_capture_handler.cc File content/renderer/media/canvas_capture_handler.cc (right): https://codereview.chromium.org/1737253002/diff/60001/content/renderer/media/canvas_capture_handler.cc#newcode185 content/renderer/media/canvas_capture_handler.cc:185: const bool isOpaque = image->isOpaque(); On 2016/02/29 23:48:00, mcasas ...
4 years, 9 months ago (2016-03-01 20:07:55 UTC) #13
emircan
Friendly ping. Can you PTAL?
4 years, 9 months ago (2016-03-02 21:53:28 UTC) #14
mcasas
LGTM % comments. https://codereview.chromium.org/1737253002/diff/60001/media/base/video_frame.cc File media/base/video_frame.cc (right): https://codereview.chromium.org/1737253002/diff/60001/media/base/video_frame.cc#newcode219 media/base/video_frame.cc:219: } On 2016/03/01 20:07:55, emircan wrote: ...
4 years, 9 months ago (2016-03-02 22:01:10 UTC) #15
emircan
https://codereview.chromium.org/1737253002/diff/60001/media/base/video_frame.cc File media/base/video_frame.cc (right): https://codereview.chromium.org/1737253002/diff/60001/media/base/video_frame.cc#newcode219 media/base/video_frame.cc:219: } On 2016/03/02 22:01:10, mcasas wrote: > On 2016/03/01 ...
4 years, 9 months ago (2016-03-03 22:05:58 UTC) #17
emircan
I am adding OWNERS for review. dalecurtis@, can you review media/*? content/renderer/pepper/pepper_video_source_host.cc
4 years, 9 months ago (2016-03-03 22:10:49 UTC) #20
DaleCurtis
lgtm
4 years, 9 months ago (2016-03-07 20:43:13 UTC) #22
emircan
Thanks. esprehn@, can you review content/renderer/pepper/* as OWNERS?
4 years, 9 months ago (2016-03-07 20:48:25 UTC) #24
esprehn
On 2016/03/07 at 20:48:25, emircan wrote: > Thanks. > > esprehn@, can you review content/renderer/pepper/* ...
4 years, 9 months ago (2016-03-07 21:37:23 UTC) #25
emircan
Thanks. raymes@, can you review content/renderer/pepper/* as OWNERS?
4 years, 9 months ago (2016-03-07 21:59:20 UTC) #27
raymes
I'm not so familiar with this pepper code. +bbudge or penghuang Or if Dale has ...
4 years, 9 months ago (2016-03-07 23:00:01 UTC) #29
Peng
On 2016/03/07 23:00:01, raymes wrote: > I'm not so familiar with this pepper code. +bbudge ...
4 years, 9 months ago (2016-03-07 23:49:10 UTC) #30
emircan
Thanks. bbudge@ seems is marked as OOO until 3-18 so I will add him to ...
4 years, 9 months ago (2016-03-08 02:46:23 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737253002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737253002/140001
4 years, 9 months ago (2016-03-08 02:51:58 UTC) #36
raymes
On 2016/03/08 02:46:23, emircan wrote: > Thanks. > > bbudge@ seems is marked as OOO ...
4 years, 9 months ago (2016-03-08 03:48:35 UTC) #38
bbudge
https://codereview.chromium.org/1737253002/diff/140001/content/renderer/pepper/pepper_media_stream_video_track_host.cc File content/renderer/pepper/pepper_media_stream_video_track_host.cc (right): https://codereview.chromium.org/1737253002/diff/140001/content/renderer/pepper/pepper_media_stream_video_track_host.cc#newcode383 content/renderer/pepper/pepper_media_stream_video_track_host.cc:383: nit: why add whitespace here? https://codereview.chromium.org/1737253002/diff/140001/content/renderer/pepper/pepper_video_source_host.cc File content/renderer/pepper/pepper_video_source_host.cc (right): ...
4 years, 9 months ago (2016-03-08 13:17:33 UTC) #39
emircan
https://codereview.chromium.org/1737253002/diff/140001/content/renderer/pepper/pepper_media_stream_video_track_host.cc File content/renderer/pepper/pepper_media_stream_video_track_host.cc (right): https://codereview.chromium.org/1737253002/diff/140001/content/renderer/pepper/pepper_media_stream_video_track_host.cc#newcode383 content/renderer/pepper/pepper_media_stream_video_track_host.cc:383: On 2016/03/08 13:17:33, bbudge (OOO until 3-18) wrote: > ...
4 years, 9 months ago (2016-03-08 19:01:46 UTC) #40
bbudge
This API is private and only used by Hangouts special effects (adds mustache, hats, etc. ...
4 years, 9 months ago (2016-03-08 20:13:34 UTC) #41
emircan
Thanks. I tested hangouts with effects and verified as well.
4 years, 9 months ago (2016-03-08 21:43:42 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1737253002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1737253002/160001
4 years, 9 months ago (2016-03-08 21:44:43 UTC) #45
commit-bot: I haz the power
Committed patchset #6 (id:160001)
4 years, 9 months ago (2016-03-08 22:14:01 UTC) #47
commit-bot: I haz the power
4 years, 9 months ago (2016-03-08 22:15:19 UTC) #49
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/ec1e7ff3b75787d3290ba5a899db8ef4ca79d302
Cr-Commit-Position: refs/heads/master@{#379932}

Powered by Google App Engine
This is Rietveld 408576698