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

Issue 1406113002: Add AudioTrackRecorder for audio component of MediaStream recording. (Closed)

Created:
5 years, 2 months ago by ajose
Modified:
5 years, 1 month ago
CC:
chromium-reviews, tlegrand1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add AudioTrackRecorder for audio component of MediaStream recording. This is the first of ~three CLs for adding the audio component of MediaStreamRecording. These CLs will be: 1) Add AudioTrackRecorder, a MediaStreamAudioSink which will be owned by MediaRecorderHandler 2) Update WebmMuxer to mux Opus output of AudioTrackRecorder 3) Update MediaRecorderHandler to use AudioTrackRecorder BUG=528519 Committed: https://crrev.com/9b6d878b661f617cdbfc027a8c9b9b444aab948c Cr-Commit-Position: refs/heads/master@{#360108}

Patch Set 1 : #

Total comments: 33

Patch Set 2 : address mcasas' comments #

Patch Set 3 : trybots #

Total comments: 44

Patch Set 4 : address comments #

Total comments: 20

Patch Set 5 : mcasas' comments #

Patch Set 6 : forward declaration #

Total comments: 17

Patch Set 7 : address comments, trybots #

Total comments: 12

Patch Set 8 : address comments #

Total comments: 8

Patch Set 9 : miu's comments #

Total comments: 12

Patch Set 10 : comments #

Total comments: 30

Patch Set 11 : minyue@'s comments #

Total comments: 8

Patch Set 12 : minyue@'s comments #

Total comments: 6

Patch Set 13 : comments #

Total comments: 10

Patch Set 14 : comments and format #

Patch Set 15 : rebase #

Patch Set 16 : fix asan #

Total comments: 2

Patch Set 17 : miu's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+658 lines, -0 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/media/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
A content/renderer/media/audio_track_recorder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +85 lines, -0 lines 0 comments Download
A content/renderer/media/audio_track_recorder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +312 lines, -0 lines 0 comments Download
A content/renderer/media/audio_track_recorder_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +253 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 74 (32 generated)
ajose
PTAL at just the AudioTrackRecorder files, will remove others from this CL ASAP.
5 years, 2 months ago (2015-10-16 02:23:40 UTC) #2
mcasas
Looks pretty good % opus things, that I don't know about. Couple of comments. Turn ...
5 years, 2 months ago (2015-10-19 20:02:09 UTC) #7
ajose
Thanks for the comments! I'll make sure to convert TODOs to bugs after a few ...
5 years, 2 months ago (2015-10-20 03:21:12 UTC) #9
mcasas
A few more comments. https://chromiumcodereview.appspot.com/1406113002/diff/140001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://chromiumcodereview.appspot.com/1406113002/diff/140001/content/renderer/media/audio_track_recorder.cc#newcode35 content/renderer/media/audio_track_recorder.cc:35: : on_encoded_audio_cb_(on_encoded_audio_cb), Don't inline complex ...
5 years, 2 months ago (2015-10-21 19:19:52 UTC) #13
miu
Structural issues: https://codereview.chromium.org/1406113002/diff/140001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/140001/content/renderer/media/audio_track_recorder.cc#newcode17 content/renderer/media/audio_track_recorder.cc:17: const int kDefaultFramesPerSecond = 100; Consider using ...
5 years, 2 months ago (2015-10-21 20:35:38 UTC) #14
ajose
Thanks for the comments! Hopefully the threading is sane, let me know what you think. ...
5 years, 2 months ago (2015-10-23 22:46:34 UTC) #16
mcasas
Haven't looked into ownerships and destruction sequences in detail, but here's some comments. (I'm sure ...
5 years, 1 month ago (2015-10-26 18:56:25 UTC) #18
ajose
Thanks for the comments :0) Saving some of the more substantial changes for another CL. ...
5 years, 1 month ago (2015-10-26 20:26:47 UTC) #20
miu
https://codereview.chromium.org/1406113002/diff/260001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/260001/content/renderer/media/audio_track_recorder.cc#newcode73 content/renderer/media/audio_track_recorder.cc:73: bool IsInitialized() { return initialized_; } You don't need ...
5 years, 1 month ago (2015-10-26 22:41:04 UTC) #21
ajose
Thanks for the comments! Still wondering about framerate - it's currently a constant, but that ...
5 years, 1 month ago (2015-10-27 18:41:28 UTC) #24
mcasas
Almost there. https://codereview.chromium.org/1406113002/diff/380001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/380001/content/renderer/media/audio_track_recorder.cc#newcode168 content/renderer/media/audio_track_recorder.cc:168: DCHECK(IsInitialized()); Actually, since there's no way for ...
5 years, 1 month ago (2015-10-28 20:03:00 UTC) #28
ajose
Thanks for the comments :) Will add more crbugs ASAP if they're not resolved soon. ...
5 years, 1 month ago (2015-10-28 21:54:06 UTC) #29
miu
Ah, I see the issue around the DEFAULT_FRAMES_PER_SECOND. Addressed this in my comments: https://codereview.chromium.org/1406113002/diff/400001/content/renderer/media/audio_track_recorder.cc File ...
5 years, 1 month ago (2015-10-29 01:26:05 UTC) #30
ajose
Thanks for the comments, miu. I ended up adding a function to find a valid ...
5 years, 1 month ago (2015-10-29 21:11:23 UTC) #31
mcasas
LGTM with minor nits. Good job. https://codereview.chromium.org/1406113002/diff/440001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/440001/content/renderer/media/audio_track_recorder.cc#newcode206 content/renderer/media/audio_track_recorder.cc:206: // called from ...
5 years, 1 month ago (2015-10-29 22:58:21 UTC) #33
miu
https://codereview.chromium.org/1406113002/diff/440001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/440001/content/renderer/media/audio_track_recorder.cc#newcode28 content/renderer/media/audio_track_recorder.cc:28: static bool GetOpusFrameDuration(int sample_rate, int* frame_duration) { nit: You ...
5 years, 1 month ago (2015-10-29 23:16:42 UTC) #34
ajose
Thanks for the comments! sergeyu@: PTAL for third_party/opus use, when you get a chance. https://codereview.chromium.org/1406113002/diff/440001/content/renderer/media/audio_track_recorder.cc ...
5 years, 1 month ago (2015-11-02 20:12:52 UTC) #36
miu
lgtm
5 years, 1 month ago (2015-11-02 21:04:13 UTC) #37
ajose
henrika@, sergeyu@: would appreciate owner's RS for content/renderer/media/DEPS change to include third_party/opus.
5 years, 1 month ago (2015-11-06 17:12:28 UTC) #39
henrika (OOO until Aug 14)
LGTM (cc: tlegrand for Opus just in case).
5 years, 1 month ago (2015-11-09 08:21:54 UTC) #41
ajose
Adding minyue@ on tlegrand@'s advice. minyue@: Mind taking a look at Opus usage in AudioTrackRecorder::AudioEncoder ...
5 years, 1 month ago (2015-11-10 19:24:09 UTC) #43
minyue
On 2015/11/10 19:24:09, ajose wrote: > Adding minyue@ on tlegrand@'s advice. > > minyue@: Mind ...
5 years, 1 month ago (2015-11-11 13:07:37 UTC) #44
minyue
https://codereview.chromium.org/1406113002/diff/460001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/460001/content/renderer/media/audio_track_recorder.cc#newcode7 content/renderer/media/audio_track_recorder.cc:7: #include "content/renderer/media/audio_track_recorder.h" I know this should go before all ...
5 years, 1 month ago (2015-11-11 13:40:11 UTC) #45
ajose
Thanks for the comments, minyue! > Is there a chance to merge ATR and cast::AudioEncoder? ...
5 years, 1 month ago (2015-11-12 00:10:41 UTC) #46
minyue
Thanks for the changes! It is quite good now, just a couple of small issues. ...
5 years, 1 month ago (2015-11-12 16:52:31 UTC) #49
ajose
avi@: mind RS LGTM content/test/BUILD.gn? Thanks for the comments, minyue! > add decoding test I ...
5 years, 1 month ago (2015-11-13 00:22:44 UTC) #51
mcasas
Still LGTM with a nit. https://codereview.chromium.org/1406113002/diff/540001/content/renderer/media/audio_track_recorder_unittest.cc File content/renderer/media/audio_track_recorder_unittest.cc (right): https://codereview.chromium.org/1406113002/diff/540001/content/renderer/media/audio_track_recorder_unittest.cc#newcode56 content/renderer/media/audio_track_recorder_unittest.cc:56: 48000, /* sample rate ...
5 years, 1 month ago (2015-11-13 00:25:47 UTC) #52
minyue
I don't think the duration calculation is right. Correct me if I am mistaken. About ...
5 years, 1 month ago (2015-11-13 09:27:31 UTC) #53
Avi (use Gerrit)
content/test/BUILD.gn lgtm fwiw
5 years, 1 month ago (2015-11-13 15:48:47 UTC) #54
miu
https://codereview.chromium.org/1406113002/diff/540001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/540001/content/renderer/media/audio_track_recorder.cc#newcode200 content/renderer/media/audio_track_recorder.cc:200: capture_time); This is the wrong |capture_time|. The first sample ...
5 years, 1 month ago (2015-11-13 21:54:33 UTC) #55
miu
https://codereview.chromium.org/1406113002/diff/540001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/540001/content/renderer/media/audio_track_recorder.cc#newcode47 content/renderer/media/audio_track_recorder.cc:47: sample_rate % (sample_rate * possible_duration / 1000) == 0) ...
5 years, 1 month ago (2015-11-13 22:08:42 UTC) #56
ajose
Thanks all for the comments. minyue: I added decoding to the unittest, and can verify ...
5 years, 1 month ago (2015-11-14 04:36:53 UTC) #57
minyue
Hi, It is quite there. Just a couple of issues on the changes to the ...
5 years, 1 month ago (2015-11-16 11:57:33 UTC) #58
ajose
Thanks for the comments, PTAL https://codereview.chromium.org/1406113002/diff/560001/content/renderer/media/audio_track_recorder.h File content/renderer/media/audio_track_recorder.h (right): https://codereview.chromium.org/1406113002/diff/560001/content/renderer/media/audio_track_recorder.h#newcode48 content/renderer/media/audio_track_recorder.h:48: int BufferDurationForTesting(int sample_rate); On ...
5 years, 1 month ago (2015-11-16 22:29:47 UTC) #59
minyue
lgtm
5 years, 1 month ago (2015-11-16 22:48:42 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1406113002/620001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1406113002/620001
5 years, 1 month ago (2015-11-17 02:39:00 UTC) #64
miu
https://codereview.chromium.org/1406113002/diff/660001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1406113002/diff/660001/content/renderer/media/audio_track_recorder.cc#newcode90 content/renderer/media/audio_track_recorder.cc:90: base::TimeTicks buffer_capture_time_; This shouldn't be a class member since ...
5 years, 1 month ago (2015-11-17 04:18:01 UTC) #67
ajose
Sorry miu, I'll wait for LGTM before trying to commit again. https://codereview.chromium.org/1406113002/diff/660001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): ...
5 years, 1 month ago (2015-11-17 04:23:46 UTC) #68
miu
lgtm
5 years, 1 month ago (2015-11-17 05:11:04 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1406113002/680001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1406113002/680001
5 years, 1 month ago (2015-11-17 16:48:39 UTC) #72
commit-bot: I haz the power
Committed patchset #17 (id:680001)
5 years, 1 month ago (2015-11-17 18:03:36 UTC) #73
commit-bot: I haz the power
5 years, 1 month ago (2015-11-17 18:04:20 UTC) #74
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/9b6d878b661f617cdbfc027a8c9b9b444aab948c
Cr-Commit-Position: refs/heads/master@{#360108}

Powered by Google App Engine
This is Rietveld 408576698