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

Issue 187493002: Cast: Resample input audio to the configured sample rate (Closed)

Created:
6 years, 9 months ago by Alpha Left Google
Modified:
6 years, 9 months ago
Reviewers:
miu, DaleCurtis
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Cast: Resample input audio to the configured sample rate We configure opus to encode at 48khz. But on some platforms like Linux the incoming data is at 44.1khz. We need to resample the data before giving it to the cast library. Fixing this allows us to have proper audio with a receiver. BUG=349295 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255893

Patch Set 1 #

Total comments: 4

Patch Set 2 : nits #

Total comments: 2

Patch Set 3 : resample correctly #

Total comments: 11

Patch Set 4 : preroll #

Total comments: 1

Patch Set 5 : fixed perf #

Total comments: 3

Patch Set 6 : no Pass() #

Patch Set 7 : upload again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -13 lines) Patch
M chrome/renderer/media/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.cc View 1 2 3 4 5 8 chunks +100 lines, -13 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
Alpha Left Google
6 years, 9 months ago (2014-03-05 05:18:10 UTC) #1
miu
I think there are files missing from this review, like cast_rtp_stream.h?
6 years, 9 months ago (2014-03-05 20:52:41 UTC) #2
miu
lgtm Never mind my last message. I see now the class is fully-contained in the ...
6 years, 9 months ago (2014-03-05 20:59:00 UTC) #3
Alpha Left Google
https://codereview.chromium.org/187493002/diff/1/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/187493002/diff/1/chrome/renderer/media/cast_rtp_stream.cc#newcode214 chrome/renderer/media/cast_rtp_stream.cc:214: resampler_->Resample(output_bus->frames(), output_bus.get()); On 2014/03/05 20:59:00, miu wrote: > nit: ...
6 years, 9 months ago (2014-03-06 00:14:56 UTC) #4
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 9 months ago (2014-03-06 00:15:05 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/187493002/20001
6 years, 9 months ago (2014-03-06 00:26:39 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 00:49:32 UTC) #7
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=53768
6 years, 9 months ago (2014-03-06 00:49:33 UTC) #8
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 9 months ago (2014-03-06 20:40:33 UTC) #9
Alpha Left Google
The CQ bit was unchecked by hclam@chromium.org
6 years, 9 months ago (2014-03-06 20:40:48 UTC) #10
Alpha Left Google
+dalecurtis to add dependency on media/audio.
6 years, 9 months ago (2014-03-06 20:41:23 UTC) #11
DaleCurtis
https://codereview.chromium.org/187493002/diff/20001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/187493002/diff/20001/chrome/renderer/media/cast_rtp_stream.cc#newcode217 chrome/renderer/media/cast_rtp_stream.cc:217: resampler_->Resample(output_bus->frames(), output_bus.get()); While this guarantees all input data is ...
6 years, 9 months ago (2014-03-06 20:57:16 UTC) #12
Alpha Left Google
Per our discussion I have updated the code to perform resampling correctly using a FIFO ...
6 years, 9 months ago (2014-03-07 00:51:04 UTC) #13
DaleCurtis
https://codereview.chromium.org/187493002/diff/40001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/187493002/diff/40001/chrome/renderer/media/cast_rtp_stream.cc#newcode212 chrome/renderer/media/cast_rtp_stream.cc:212: scoped_ptr<media::AudioBus> input_bus = Don't create this every time, it ...
6 years, 9 months ago (2014-03-07 01:14:03 UTC) #14
Alpha Left Google
https://codereview.chromium.org/187493002/diff/40001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/187493002/diff/40001/chrome/renderer/media/cast_rtp_stream.cc#newcode212 chrome/renderer/media/cast_rtp_stream.cc:212: scoped_ptr<media::AudioBus> input_bus = On 2014/03/07 01:14:03, DaleCurtis wrote: > ...
6 years, 9 months ago (2014-03-07 01:34:01 UTC) #15
DaleCurtis
https://codereview.chromium.org/187493002/diff/40001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/187493002/diff/40001/chrome/renderer/media/cast_rtp_stream.cc#newcode212 chrome/renderer/media/cast_rtp_stream.cc:212: scoped_ptr<media::AudioBus> input_bus = On 2014/03/07 01:34:01, Alpha wrote: > ...
6 years, 9 months ago (2014-03-07 01:48:59 UTC) #16
Alpha Left Google
> How about reflowing this block so that ResampleData() takes |audio_data| instead > of an ...
6 years, 9 months ago (2014-03-07 02:21:30 UTC) #17
DaleCurtis
lgtm % nits. https://codereview.chromium.org/187493002/diff/80001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/187493002/diff/80001/chrome/renderer/media/cast_rtp_stream.cc#newcode221 chrome/renderer/media/cast_rtp_stream.cc:221: number_of_channels, number_of_frames).Pass(); No .Pass necessary. https://codereview.chromium.org/187493002/diff/80001/chrome/renderer/media/cast_rtp_stream.cc#newcode271 ...
6 years, 9 months ago (2014-03-07 19:16:42 UTC) #18
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 9 months ago (2014-03-07 21:19:08 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/187493002/60002
6 years, 9 months ago (2014-03-07 21:20:05 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/187493002/60002
6 years, 9 months ago (2014-03-08 10:58:34 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-08 14:03:06 UTC) #22
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) telemetry_perf_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=234363
6 years, 9 months ago (2014-03-08 14:03:07 UTC) #23
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 9 months ago (2014-03-10 06:39:50 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/187493002/60002
6 years, 9 months ago (2014-03-10 06:40:16 UTC) #25
commit-bot: I haz the power
6 years, 9 months ago (2014-03-10 07:08:37 UTC) #26
Message was sent while issue was closed.
Change committed as 255893

Powered by Google App Engine
This is Rietveld 408576698