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

Issue 1579693006: MediaRecorder: support sampling rate adaption in AudioTrackRecorder (Closed)

Created:
4 years, 11 months ago by mcasas
Modified:
4 years, 10 months ago
Reviewers:
miu
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, cwilso
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MediaRecorder: support sampling rate adaption in AudioTrackRecorder This CL adds support for audio coming from the MediaStream Tracks with a sampling rate not directly supported by Opus ({48k, 24k, 16k, 12k, 8k}samples/s) by adding a AudioConverter in AudioTrackRecorder::AudioEncoder. BUG=569089 TEST = - unit tests, which are beefed up - content_browsertests - demo [1] - corrected bug's file [2] (correction being: s/opus/webm/ for the mimeType to use for capture.) I used a variety of input wav's, mostly the original sfx5.wav in the bug and the "miscellaneous" entries in [3] [1] https://webrtc.github.io/samples/src/content/getusermedia/record/ [2] https://rawgit.com/Miguelao/demos/master/audiotranscode.html [3] http://download.wavetlan.com/SVV/Media/HTTP/http-wav.htm Committed: https://crrev.com/acc25ac1e26010c501fd98d59738e95e22a7015c Cr-Commit-Position: refs/heads/master@{#372491}

Patch Set 1 #

Total comments: 15

Patch Set 2 : miu@s comments, rebased (bits per second stuff) #

Total comments: 15

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

Total comments: 16

Patch Set 4 : miu@s third round of comments #

Total comments: 2

Patch Set 5 : miu@s nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+259 lines, -228 lines) Patch
M content/renderer/media/audio_track_recorder.h View 1 2 chunks +1 line, -7 lines 0 comments Download
M content/renderer/media/audio_track_recorder.cc View 1 2 3 4 7 chunks +154 lines, -153 lines 0 comments Download
M content/renderer/media/audio_track_recorder_unittest.cc View 1 2 3 8 chunks +77 lines, -43 lines 0 comments Download
M content/renderer/media/media_recorder_handler_unittest.cc View 1 2 3 5 chunks +27 lines, -25 lines 0 comments Download

Messages

Total messages: 29 (17 generated)
mcasas
miu@ PTAL disclaimer: first time doing Audio stuff, expect dragons! :) (I'm particularly uncertain about ...
4 years, 11 months ago (2016-01-19 21:21:31 UTC) #8
miu
https://codereview.chromium.org/1579693006/diff/80001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1579693006/diff/80001/content/renderer/media/audio_track_recorder.cc#newcode47 content/renderer/media/audio_track_recorder.cc:47: static const int kOpusPreferredFramesPerBuffer = 480; Opus will produce ...
4 years, 11 months ago (2016-01-22 00:14:53 UTC) #10
mcasas
miu@ PTAL https://codereview.chromium.org/1579693006/diff/80001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1579693006/diff/80001/content/renderer/media/audio_track_recorder.cc#newcode47 content/renderer/media/audio_track_recorder.cc:47: static const int kOpusPreferredFramesPerBuffer = 480; On ...
4 years, 11 months ago (2016-01-22 22:03:53 UTC) #11
miu
https://codereview.chromium.org/1579693006/diff/120001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1579693006/diff/120001/content/renderer/media/audio_track_recorder.cc#newcode34 content/renderer/media/audio_track_recorder.cc:34: static const int kOpusMaxDataBytes = 4000; Consider making these ...
4 years, 11 months ago (2016-01-27 01:52:59 UTC) #14
mcasas
miu@ PTAL https://codereview.chromium.org/1579693006/diff/120001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1579693006/diff/120001/content/renderer/media/audio_track_recorder.cc#newcode34 content/renderer/media/audio_track_recorder.cc:34: static const int kOpusMaxDataBytes = 4000; On ...
4 years, 11 months ago (2016-01-28 01:28:19 UTC) #16
miu
https://codereview.chromium.org/1579693006/diff/160001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1579693006/diff/160001/content/renderer/media/audio_track_recorder.cc#newcode54 content/renderer/media/audio_track_recorder.cc:54: static const int kOpusPreferredFramesPerBuffer = nit: No need to ...
4 years, 10 months ago (2016-01-29 02:37:15 UTC) #17
mcasas
PTAL https://codereview.chromium.org/1579693006/diff/160001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1579693006/diff/160001/content/renderer/media/audio_track_recorder.cc#newcode54 content/renderer/media/audio_track_recorder.cc:54: static const int kOpusPreferredFramesPerBuffer = On 2016/01/29 02:37:15, ...
4 years, 10 months ago (2016-01-29 20:37:34 UTC) #19
miu
lgtm https://codereview.chromium.org/1579693006/diff/200001/content/renderer/media/audio_track_recorder.cc File content/renderer/media/audio_track_recorder.cc (right): https://codereview.chromium.org/1579693006/diff/200001/content/renderer/media/audio_track_recorder.cc#newcode52 content/renderer/media/audio_track_recorder.cc:52: const size_t kMaxNumberOfFifoBuffers = 2; nit: Now this ...
4 years, 10 months ago (2016-01-29 21:37:21 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1579693006/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1579693006/220001
4 years, 10 months ago (2016-01-29 23:08:17 UTC) #24
commit-bot: I haz the power
Committed patchset #5 (id:220001)
4 years, 10 months ago (2016-01-30 00:29:52 UTC) #26
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/acc25ac1e26010c501fd98d59738e95e22a7015c Cr-Commit-Position: refs/heads/master@{#372491}
4 years, 10 months ago (2016-01-30 00:30:40 UTC) #28
mcasas
4 years, 10 months ago (2016-02-02 18:44:33 UTC) #29
Message was sent while issue was closed.
publishing old comments

https://codereview.chromium.org/1579693006/diff/200001/content/renderer/media...
File content/renderer/media/audio_track_recorder.cc (right):

https://codereview.chromium.org/1579693006/diff/200001/content/renderer/media...
content/renderer/media/audio_track_recorder.cc:52: const size_t
kMaxNumberOfFifoBuffers = 2;
On 2016/01/29 21:37:20, miu wrote:
> nit: Now this can be an enum.

Done.

Powered by Google App Engine
This is Rietveld 408576698