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

Issue 178223013: Calculate the signal level on the media stream local audio track (Closed)

Created:
6 years, 10 months ago by no longer working on chromium
Modified:
6 years, 9 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Calculate the signal level on the media stream local audio track. And the signal level will be pass to libjingle after the new libjingle interface is implemented by chrome. BUG=264611 TEST=content_unittests, nothing breaks. R=tommi@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254759

Patch Set 1 #

Patch Set 2 : added the new class #

Patch Set 3 : ready for review. #

Total comments: 16

Patch Set 4 : #

Total comments: 3

Patch Set 5 : fixed the thread check and max amplitude #

Total comments: 6

Patch Set 6 : #

Total comments: 4

Patch Set 7 : fixed the comments. #

Patch Set 8 : rebased and all the try jobs passed #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -0 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A content/renderer/media/media_stream_audio_level_calculator.h View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
A content/renderer/media/media_stream_audio_level_calculator.cc View 1 2 3 4 5 6 1 chunk +82 lines, -0 lines 2 comments Download
M content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_local_audio_track.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_local_audio_track.cc View 3 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
no longer working on chromium
Hi Tommi, Please review this CL. FYI, the MediaStreamAudioLevelCalculator has to keep using the int16* ...
6 years, 10 months ago (2014-02-26 15:12:07 UTC) #1
tommi (sloooow) - chröme
https://codereview.chromium.org/178223013/diff/70001/content/renderer/media/media_stream_audio_level_calculator.cc File content/renderer/media/media_stream_audio_level_calculator.cc (right): https://codereview.chromium.org/178223013/diff/70001/content/renderer/media/media_stream_audio_level_calculator.cc#newcode14 content/renderer/media/media_stream_audio_level_calculator.cc:14: static const int kPermutation[33] = Add documentation. Also document ...
6 years, 10 months ago (2014-02-27 08:39:43 UTC) #2
no longer working on chromium
https://codereview.chromium.org/178223013/diff/70001/content/renderer/media/media_stream_audio_level_calculator.cc File content/renderer/media/media_stream_audio_level_calculator.cc (right): https://codereview.chromium.org/178223013/diff/70001/content/renderer/media/media_stream_audio_level_calculator.cc#newcode14 content/renderer/media/media_stream_audio_level_calculator.cc:14: static const int kPermutation[33] = On 2014/02/27 08:39:43, tommi ...
6 years, 9 months ago (2014-02-28 08:16:25 UTC) #3
no longer working on chromium
PTAL, thanks. SX https://codereview.chromium.org/178223013/diff/70001/content/renderer/media/media_stream_audio_level_calculator.cc File content/renderer/media/media_stream_audio_level_calculator.cc (right): https://codereview.chromium.org/178223013/diff/70001/content/renderer/media/media_stream_audio_level_calculator.cc#newcode17 content/renderer/media/media_stream_audio_level_calculator.cc:17: static const int k16BitsMaxValue = 32767; ...
6 years, 9 months ago (2014-03-01 11:34:28 UTC) #4
tommi (sloooow) - chröme
https://codereview.chromium.org/178223013/diff/90001/content/renderer/media/media_stream_audio_level_calculator.h File content/renderer/media/media_stream_audio_level_calculator.h (right): https://codereview.chromium.org/178223013/diff/90001/content/renderer/media/media_stream_audio_level_calculator.h#newcode17 content/renderer/media/media_stream_audio_level_calculator.h:17: class MediaStreamAudioLevelCalculator : public base::NonThreadSafe { On 2014/03/01 11:34:28, ...
6 years, 9 months ago (2014-03-01 11:49:33 UTC) #5
no longer working on chromium
https://codereview.chromium.org/178223013/diff/90001/content/renderer/media/media_stream_audio_level_calculator.h File content/renderer/media/media_stream_audio_level_calculator.h (right): https://codereview.chromium.org/178223013/diff/90001/content/renderer/media/media_stream_audio_level_calculator.h#newcode17 content/renderer/media/media_stream_audio_level_calculator.h:17: class MediaStreamAudioLevelCalculator : public base::NonThreadSafe { On 2014/03/01 11:49:33, ...
6 years, 9 months ago (2014-03-01 12:37:00 UTC) #6
tommi (sloooow) - chröme
https://codereview.chromium.org/178223013/diff/100001/content/renderer/media/media_stream_audio_level_calculator.cc File content/renderer/media/media_stream_audio_level_calculator.cc (right): https://codereview.chromium.org/178223013/diff/100001/content/renderer/media/media_stream_audio_level_calculator.cc#newcode23 content/renderer/media/media_stream_audio_level_calculator.cc:23: DCHECK(max <= std::abd(std::numeric_limits<int16>::min())); On 2014/03/01 12:37:00, xians1 wrote: > ...
6 years, 9 months ago (2014-03-02 10:19:53 UTC) #7
no longer working on chromium
https://codereview.chromium.org/178223013/diff/100001/content/renderer/media/media_stream_audio_level_calculator.cc File content/renderer/media/media_stream_audio_level_calculator.cc (right): https://codereview.chromium.org/178223013/diff/100001/content/renderer/media/media_stream_audio_level_calculator.cc#newcode23 content/renderer/media/media_stream_audio_level_calculator.cc:23: DCHECK(max <= std::abd(std::numeric_limits<int16>::min())); On 2014/03/02 10:19:53, tommi wrote: > ...
6 years, 9 months ago (2014-03-03 13:07:12 UTC) #8
tommi (sloooow) - chröme
lgtm
6 years, 9 months ago (2014-03-04 11:04:52 UTC) #9
no longer working on chromium
The CQ bit was checked by xians@chromium.org
6 years, 9 months ago (2014-03-04 11:22:30 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/178223013/140001
6 years, 9 months ago (2014-03-04 11:23:13 UTC) #11
no longer working on chromium
Committed patchset #8 manually as r254759 (presubmit successful).
6 years, 9 months ago (2014-03-04 14:39:26 UTC) #12
ajm
Drive-by. I know you're cloning the behavior of voice engine here, but this has always ...
6 years, 9 months ago (2014-03-04 22:20:04 UTC) #13
DaleCurtis
Drive by: Could you instead use media/audio/audio_power_monitor.h?
6 years, 9 months ago (2014-03-04 22:23:45 UTC) #14
tommi (sloooow) - chröme
On 2014/03/04 22:20:04, ajm wrote: > Drive-by. > > I know you're cloning the behavior ...
6 years, 9 months ago (2014-03-04 22:33:43 UTC) #15
ajm
6 years, 9 months ago (2014-03-04 23:41:06 UTC) #16
Message was sent while issue was closed.
On 2014/03/04 22:33:43, tommi wrote:
> On 2014/03/04 22:20:04, ajm wrote:
> > Drive-by.
> > 
> > I know you're cloning the behavior of voice engine here, but this has always
> > been a very ad-hoc calculation. Much better would be to return some kind of
> more
> > standardized energy value, and let the app massage that into a level meter
as
> it
> > desires.
> > 
> > Are we constraining ourselves with this, or are we free to change the
> > calculation later?
> 
> The reason for keeping compatibility with voice engine is because these values
> are fed back to PC for getStats.
> Once we start making these properties available directly from audio track
> objects in javascript, I think we should change the algorithm.  As is, we
don't
> want to change the behavior or the peerconnection stats reporting.

Got it, thanks.

Powered by Google App Engine
This is Rietveld 408576698