This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.
bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
The FixedGainController is used in two places.
One is the AudioMixer. There it's used to limit the audio level after
adding streams. The other is GainController2, where it's placed after
steps that could boost the audio level outside the allowed range.
We log metrics from the FGC. To avoid confusion, this CL makes the two
use cases log to different histograms.
Chromium histogram CL is
https://chromium-review.googlesource.com/c/chromium/src/+/1170833
Bug: webrtc:7494
Change-Id: I1abe60fd8e96556f144d2ee576254b15beca1174
Reviewed-on: https://webrtc-review.googlesource.com/93464
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24284}
We had the following pattern:
if (case_A) metric = METRIC_A;
if (case_B) metric = METRIC_B;
RTC_HISTOGRAM_COUNTS_10000(metric, value);
That's wrong, because once the logging macro runs once, it will use
the same histogram no matter what the first argument is. The macro
expands into roughly
static Histogram* histogram_ptr = nullptr;
if (histogram_ptr == nullptr) {
// Look up the histogram and put in histogram_ptr
}
// Add data through the histogram pointer.
We change the logging to use macros with string literals. We add a
macro for every of the 4 possible invocations. The macros will expand
to one static pointer each.
Bug: webrtc:8925
Change-Id: Ic7e4a6299eff31dd5988047edfcedce7d369e5ce
Reviewed-on: https://webrtc-review.googlesource.com/64724
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22606}
And fix typo in UMA metric.
We have this pattern in the FrameCombiner component of the AudioMixer:
if (number_of_streams <= 1) {
// Copy or fill with zeros.
return;
}
// Mix and limit
LogMixingStats(/* args */);
When there is only one remote stream, info about active streams and
sample rate is not logged. This CL moves the call to log stats before
the 'return'.
Bug: webrtc:8925
Change-Id: I7b54f61f628273631909dafbfafa21e155e18d4a
Reviewed-on: https://webrtc-review.googlesource.com/62860
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22493}
We want to know how the AudioMixer is used and how FixedGainController
behaves.
The WebRTC.Audio.Agc2.FixedDigitalGainCurveRegion.* metrics measures
how often the input level hits different regions of the Fixed Gain
Controller gain curve (when the limiter is enabled). They also measure
how long the metrics stay in different regions. They are related to
WebRTC.Audio.ApmCaptureOutputLevelPeakRms, but the new metrics measure
the level before any processing done in APM.
The AudioMixer mixes incoming audio streams. Their number should be
mostly constant, and often some of them could be muted. The metrics
WebRTC.Audio.AudioMixer.NumIncomingStreams,
WebRTC.Audio.AudioMixer.NumIncomingActiveStreams log the number of
incoming stream and how many are not muted. We currently don't have
any stats related to that.
The metric WebRTC.Audio.AudioMixer.MixingRate logs the rate selected
for mixing. The rate can sometimes be inferred from
WebRTC.Audio.Encoder.CodecType. But that metric measures encoding and
not decoding, and codecs don't always map to rates.
See also accompanying Chromium CL
https://chromium-review.googlesource.com/c/chromium/src/+/939473
Bug: webrtc:8925
Change-Id: Ib1405877fc1b39e5d2f0ceccba04434813f20b0d
Reviewed-on: https://webrtc-review.googlesource.com/57740
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22443}
This CL adds the GainCurveApplier (GCA). It owns a
FixedDigitalLevelEstimator (LE) and an InterpolatedGainCurve
(IGC). The GCA uses the LE to compute the input signal level, looks up
a gain from IGC and applies it on the signal.
The other IGC and LE submodules were added in previous CLs [1] and
[2].
This CL also turns on AGC2 in the APM fuzzer.
[1] https://webrtc-review.googlesource.com/c/src/+/51920
[2] https://webrtc-review.googlesource.com/c/src/+/52381
Bug: webrtc:7949
Change-Id: Idb10cc3ca9d6d2e4ac5824cc3391ed8aa680f6cd
Reviewed-on: https://webrtc-review.googlesource.com/54361
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22103}