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

Issue 1313603004: MediaRecorderHandler (video part) and unittests (Closed)

Created:
5 years, 4 months ago by mcasas
Modified:
5 years, 3 months ago
Reviewers:
miu, DaleCurtis
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MediaRecorderHandler (video part) and unittests MediaRecorderHandler is Blink-orchestrated class implementing MediaRecorder API (see below). It plugs together an existing MediaStreamVideoTrack to a new VideoTrackRecorder-WebmMuxer pair. When MSVTrack passes frames, these get encoded, muxed, and the result is sent to Blink. A *note on threading*: As is customary in MediaStream* and derived classes, all configuration happens on Main Render thread while frame manipulation and forwarding happens on Render IO thread [1]. Moreover, all objects can be, and often are, destroyed in asynchronous and unexpected ways from Blink. This forces ref-counting for VideoTrackRecorder::VpxEncoder. This is the also the reason behind the change in WebmMuxer to 2-threaded. See DD @ https://goo.gl/vSjzC5 (*) for the plan. (*) Used to be https://goo.gl/kreaQj [1] https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/media/media_stream_video_track.cc&sq=package:chromium&type=cs&l=155&rcl=1440530828 BUG=262211 Committed: https://crrev.com/1567842287b4097350d33c14e5f795559fa008b5 Cr-Commit-Position: refs/heads/master@{#348037}

Patch Set 1 : Rebase, gyp and MediaRecorderHandlerTest #

Total comments: 27

Patch Set 2 : miu@s comments -- except thread in which ~VpxEncoder() executes. Rebase. Using blink::WebMediaRecor… #

Total comments: 16

Patch Set 3 : second round of miu@s comments #

Total comments: 4

Patch Set 4 : miu@s comments and avoiding compilation in Android platform #

Total comments: 5

Patch Set 5 : LOG() msg correction #

Patch Set 6 : Moved DCHECK_EQ() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+501 lines, -82 lines) Patch
M content/content_renderer.gypi View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
A content/renderer/media/media_recorder_handler.h View 1 1 chunk +82 lines, -0 lines 0 comments Download
A content/renderer/media/media_recorder_handler.cc View 1 2 3 4 1 chunk +131 lines, -0 lines 0 comments Download
A content/renderer/media/media_recorder_handler_unittest.cc View 1 2 1 chunk +155 lines, -0 lines 0 comments Download
M content/renderer/media/video_track_recorder.h View 1 4 chunks +6 lines, -7 lines 0 comments Download
M content/renderer/media/video_track_recorder.cc View 1 2 13 chunks +83 lines, -48 lines 0 comments Download
M content/renderer/media/video_track_recorder_unittest.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M media/capture/webm_muxer.h View 1 3 chunks +5 lines, -5 lines 0 comments Download
M media/capture/webm_muxer.cc View 1 2 3 4 5 3 chunks +15 lines, -10 lines 0 comments Download
M media/capture/webm_muxer_unittest.cc View 1 3 chunks +7 lines, -1 line 0 comments Download
M media/media.gyp View 1 2 3 4 chunks +2 lines, -9 lines 0 comments Download

Messages

Total messages: 36 (19 generated)
mcasas
miu@ PTAL Please read the notes on the CL description on threading to understand why ...
5 years, 3 months ago (2015-08-26 20:29:24 UTC) #7
miu
Sorry for the long delay. On the whole, the MediaRecorderHandler looks good. However, I don't ...
5 years, 3 months ago (2015-09-02 21:28:13 UTC) #9
mcasas
miu@ PTAL Please read my comments and question on threading. https://codereview.chromium.org/1313603004/diff/120001/content/renderer/media/media_recorder_handler.cc File content/renderer/media/media_recorder_handler.cc (right): https://codereview.chromium.org/1313603004/diff/120001/content/renderer/media/media_recorder_handler.cc#newcode64 ...
5 years, 3 months ago (2015-09-04 02:16:30 UTC) #16
miu
Okay, I think we're getting close now: https://codereview.chromium.org/1313603004/diff/120001/content/renderer/media/media_recorder_handler.cc File content/renderer/media/media_recorder_handler.cc (right): https://codereview.chromium.org/1313603004/diff/120001/content/renderer/media/media_recorder_handler.cc#newcode70 content/renderer/media/media_recorder_handler.cc:70: &media::WebmMuxer::OnEncodedVideo, base::Unretained(webm_muxer_.get())); ...
5 years, 3 months ago (2015-09-04 21:48:52 UTC) #17
mcasas
miu@ PTAL. I like the new VpxEncoder destructor. https://codereview.chromium.org/1313603004/diff/120001/content/renderer/media/media_recorder_handler.cc File content/renderer/media/media_recorder_handler.cc (right): https://codereview.chromium.org/1313603004/diff/120001/content/renderer/media/media_recorder_handler.cc#newcode70 content/renderer/media/media_recorder_handler.cc:70: &media::WebmMuxer::OnEncodedVideo, ...
5 years, 3 months ago (2015-09-05 02:43:02 UTC) #18
miu
lgtm % one logic flaw to fix: https://codereview.chromium.org/1313603004/diff/260001/content/renderer/media/media_recorder_handler.cc File content/renderer/media/media_recorder_handler.cc (right): https://codereview.chromium.org/1313603004/diff/260001/content/renderer/media/media_recorder_handler.cc#newcode71 content/renderer/media/media_recorder_handler.cc:71: // TODO(mcasas): ...
5 years, 3 months ago (2015-09-08 20:24:40 UTC) #19
mcasas
dalecurtis@ Owners RS for media/capture or PTAL :) https://codereview.chromium.org/1313603004/diff/260001/content/renderer/media/media_recorder_handler.cc File content/renderer/media/media_recorder_handler.cc (right): https://codereview.chromium.org/1313603004/diff/260001/content/renderer/media/media_recorder_handler.cc#newcode71 content/renderer/media/media_recorder_handler.cc:71: // ...
5 years, 3 months ago (2015-09-08 23:36:15 UTC) #22
DaleCurtis
https://codereview.chromium.org/1313603004/diff/300001/media/capture/webm_muxer.cc File media/capture/webm_muxer.cc (right): https://codereview.chromium.org/1313603004/diff/300001/media/capture/webm_muxer.cc#newcode65 media/capture/webm_muxer.cc:65: DCHECK segment isn't already initialized? Or is repeat initialization ...
5 years, 3 months ago (2015-09-09 00:04:26 UTC) #23
miu
lgtm % something I missed: https://codereview.chromium.org/1313603004/diff/300001/content/renderer/media/media_recorder_handler.cc File content/renderer/media/media_recorder_handler.cc (right): https://codereview.chromium.org/1313603004/diff/300001/content/renderer/media/media_recorder_handler.cc#newcode74 content/renderer/media/media_recorder_handler.cc:74: LOG(WARNING) << "Recording audio ...
5 years, 3 months ago (2015-09-09 00:07:11 UTC) #24
mcasas
https://codereview.chromium.org/1313603004/diff/300001/content/renderer/media/media_recorder_handler.cc File content/renderer/media/media_recorder_handler.cc (right): https://codereview.chromium.org/1313603004/diff/300001/content/renderer/media/media_recorder_handler.cc#newcode74 content/renderer/media/media_recorder_handler.cc:74: LOG(WARNING) << "Recording audio tracks is not implemented"; On ...
5 years, 3 months ago (2015-09-09 00:22:15 UTC) #25
DaleCurtis
lgtm % moving the dcheck https://codereview.chromium.org/1313603004/diff/300001/media/capture/webm_muxer.cc File media/capture/webm_muxer.cc (right): https://codereview.chromium.org/1313603004/diff/300001/media/capture/webm_muxer.cc#newcode65 media/capture/webm_muxer.cc:65: On 2015/09/09 00:22:15, mcasas ...
5 years, 3 months ago (2015-09-09 20:05:27 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1313603004/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313603004/340001
5 years, 3 months ago (2015-09-09 20:58:48 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/110694)
5 years, 3 months ago (2015-09-09 22:25:51 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1313603004/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313603004/340001
5 years, 3 months ago (2015-09-09 22:27:08 UTC) #33
commit-bot: I haz the power
Committed patchset #6 (id:340001)
5 years, 3 months ago (2015-09-09 23:32:14 UTC) #34
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/1567842287b4097350d33c14e5f795559fa008b5 Cr-Commit-Position: refs/heads/master@{#348037}
5 years, 3 months ago (2015-09-09 23:33:00 UTC) #35
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:04:47 UTC) #36
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/1567842287b4097350d33c14e5f795559fa008b5
Cr-Commit-Position: refs/heads/master@{#348037}

Powered by Google App Engine
This is Rietveld 408576698