diff options
author | emircan <emircan@chromium.org> | 2016-03-08 14:13:50 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-08 22:15:06 +0000 |
commit | ec1e7ff3b75787d3290ba5a899db8ef4ca79d302 (patch) | |
tree | e7aa9389e05cb94f8f2240291fc3a68bfd4aa811 /content/renderer/media/media_stream_video_track.cc | |
parent | bddee54521cae58e45f7ff92a2bf5819d7fe49de (diff) | |
download | chromium_src-ec1e7ff3b75787d3290ba5a899db8ef4ca79d302.zip chromium_src-ec1e7ff3b75787d3290ba5a899db8ef4ca79d302.tar.gz chromium_src-ec1e7ff3b75787d3290ba5a899db8ef4ca79d302.tar.bz2 |
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
Review URL: https://codereview.chromium.org/1737253002
Cr-Commit-Position: refs/heads/master@{#379932}
Diffstat (limited to 'content/renderer/media/media_stream_video_track.cc')
-rw-r--r-- | content/renderer/media/media_stream_video_track.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/renderer/media/media_stream_video_track.cc b/content/renderer/media/media_stream_video_track.cc index 6ff4688..e9cc8e0 100644 --- a/content/renderer/media/media_stream_video_track.cc +++ b/content/renderer/media/media_stream_video_track.cc @@ -175,9 +175,9 @@ MediaStreamVideoTrack::FrameDeliverer::GetBlackFrame( // Wrap |black_frame_| so we get a fresh timestamp we can modify. Frames // returned from this function may still be in use. scoped_refptr<media::VideoFrame> wrapped_black_frame = - media::VideoFrame::WrapVideoFrame( - black_frame_, black_frame_->visible_rect(), - black_frame_->natural_size()); + media::VideoFrame::WrapVideoFrame(black_frame_, black_frame_->format(), + black_frame_->visible_rect(), + black_frame_->natural_size()); if (!wrapped_black_frame) return nullptr; wrapped_black_frame->AddDestructionObserver( |