We use Optional in our public API, so its header should be in
webrtc/api/.
BUG=webrtc:8205
Review-Url: https://codereview.webrtc.org/3011943002
Cr-Commit-Position: refs/heads/master@{#19693}
We use ArrayView in our public API, so its header should be in
webrtc/api/.
BUG=none
Review-Url: https://codereview.webrtc.org/3007763002
Cr-Commit-Position: refs/heads/master@{#19658}
The extension ID for transport sequence number is added to the list of
known RTP header extensions. Also, the minimum and maximum waiting
time for packets is now aggregated as minimum and maximum,
respectively, not as averages.
BUG=none
Review-Url: https://codereview.webrtc.org/3004783003
Cr-Commit-Position: refs/heads/master@{#19593}
This CL fixes a small bug, causing the matlab plot script to contain
empty vectors. Also, the script file name is fixed, to avoid two
periods (.) in the file name; matlab did not like that.
BUG=none
Review-Url: https://codereview.webrtc.org/3004813002
Cr-Commit-Position: refs/heads/master@{#19586}
Adds two new stats to RTCMediaStreamTrackStats:
* totalSamplesReceived is the total number of samples received on
the audio channel and includes real and synthetic samples.
* concealedSamples is the total number of synthetic samples
received on the audio channel used to conceal packet loss.
Bug: webrtc:8076
Change-Id: I36e9828525ec341490cf3310a972b56a8b443667
Reviewed-on: https://chromium-review.googlesource.com/615902
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19506}
NetEq network statistics contains discard rate but has not been used and even not been implemented until recently.
According to w3c.github.io/webrtc-stats/#dom-rtcreceivedrtpstreamstats-packetsdiscarded,
this statistics needs to be replaced with an accumulative stats. Such work will be carried out separately.
Meanwhile, we need to add a rate to reflect rate of discarded redundant packets. See webrtc:8025.
In this CL, we replace the existing discard rate with secondary discarded rate, so as to
1. fulfill the requests on webrtc:8025
2. get ready to implement an accumulative statistics for discarded packets.
BUG: webrtc:7903,webrtc:8025
Change-Id: Idbf143a105db76ca15f0af54848e1448f2a810ec
Reviewed-on: https://chromium-review.googlesource.com/582863
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19495}
I want to publish an API for iSAC in webrtc/api/, and I want to use
the class names Audio{De,En}coderIsac{Fix,Float}.
BUG=webrtc:7835, webrtc:7841
Review-Url: https://codereview.webrtc.org/2996593002
Cr-Commit-Position: refs/heads/master@{#19381}
Chromium has adopted Opus 1.2.1 which allows 120ms frame encoding. It
is time to turn on the switch for building WebRTC with this feature.
Bug: webrtc:8042
TBR: kjellander@webrtc.org
Change-Id: I644b47cfb56f835695ef1263741cda6e3ee3d862
Reviewed-on: https://chromium-review.googlesource.com/586725
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Felicia Lim <flim@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19173}
These tests will be reenabled and updated after Opus has been updated in
Chromium and rolled into WebRTC.
BUG=737323, webrtc:8024
Review-Url: https://codereview.webrtc.org/2963673002
Cr-Commit-Position: refs/heads/master@{#19118}
Prior to https://codereview.webrtc.org/2750783004/ Reset() intentionally
did not zero out the buffer. After that change, callers calling Reset()
and then mutable_data() were performing a wasteful zeroing.
This change adds ResetWithoutMuting() to match the old behavior and
switches the sole non-test caller of Reset() to use ResetWithoutMuting()
instead.
Prior to this change (optimized, Linux):
$ out/Default/webrtc_perf_tests --gtest_filter=NetEqPerformanceTest.Run* \
--gtest_repeat=10 | grep neteq_performance
*RESULT neteq_performance: 10_pl_10_drift= 4051 ms
*RESULT neteq_performance: 0_pl_0_drift= 1768 ms
*RESULT neteq_performance: 10_pl_10_drift= 3666 ms
*RESULT neteq_performance: 0_pl_0_drift= 1690 ms
*RESULT neteq_performance: 10_pl_10_drift= 3685 ms
*RESULT neteq_performance: 0_pl_0_drift= 1693 ms
*RESULT neteq_performance: 10_pl_10_drift= 3720 ms
*RESULT neteq_performance: 0_pl_0_drift= 1690 ms
*RESULT neteq_performance: 10_pl_10_drift= 3780 ms
*RESULT neteq_performance: 0_pl_0_drift= 1728 ms
*RESULT neteq_performance: 10_pl_10_drift= 3733 ms
*RESULT neteq_performance: 0_pl_0_drift= 1737 ms
*RESULT neteq_performance: 10_pl_10_drift= 3781 ms
*RESULT neteq_performance: 0_pl_0_drift= 1744 ms
*RESULT neteq_performance: 10_pl_10_drift= 3712 ms
*RESULT neteq_performance: 0_pl_0_drift= 1731 ms
*RESULT neteq_performance: 10_pl_10_drift= 3681 ms
*RESULT neteq_performance: 0_pl_0_drift= 1691 ms
*RESULT neteq_performance: 10_pl_10_drift= 3681 ms
*RESULT neteq_performance: 0_pl_0_drift= 1690 ms
With this change:
$ out/Default/webrtc_perf_tests --gtest_filter=NetEqPerformanceTest.Run* \
--gtest_repeat=10 | grep neteq_performance
*RESULT neteq_performance: 10_pl_10_drift= 3824 ms
*RESULT neteq_performance: 0_pl_0_drift= 1632 ms
*RESULT neteq_performance: 10_pl_10_drift= 3502 ms
*RESULT neteq_performance: 0_pl_0_drift= 1521 ms
*RESULT neteq_performance: 10_pl_10_drift= 3520 ms
*RESULT neteq_performance: 0_pl_0_drift= 1534 ms
*RESULT neteq_performance: 10_pl_10_drift= 3517 ms
*RESULT neteq_performance: 0_pl_0_drift= 1530 ms
*RESULT neteq_performance: 10_pl_10_drift= 3521 ms
*RESULT neteq_performance: 0_pl_0_drift= 1527 ms
*RESULT neteq_performance: 10_pl_10_drift= 3511 ms
*RESULT neteq_performance: 0_pl_0_drift= 1533 ms
*RESULT neteq_performance: 10_pl_10_drift= 3518 ms
*RESULT neteq_performance: 0_pl_0_drift= 1523 ms
*RESULT neteq_performance: 10_pl_10_drift= 3503 ms
*RESULT neteq_performance: 0_pl_0_drift= 1524 ms
*RESULT neteq_performance: 10_pl_10_drift= 3514 ms
*RESULT neteq_performance: 0_pl_0_drift= 1534 ms
*RESULT neteq_performance: 10_pl_10_drift= 3501 ms
*RESULT neteq_performance: 0_pl_0_drift= 1530 ms
BUG=webrtc:7343,chromium:738852,chromium:738839
Change-Id: Idcbb276ca0ed27fff95164a73f1c1fa310175ee5
Reviewed-on: https://chromium-review.googlesource.com/563021
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18939}
In practice, this change will make AudioFrame::muted_ replicate the
explicit muted variable, passed as a pointer to NetEq::GetAudio.
BUG=webrtc:7944
Review-Url: https://codereview.webrtc.org/2965203002
Cr-Commit-Position: refs/heads/master@{#18914}
The implementation of this method did not follow the description in
the method comment. It was supposed to delete all packets in a range
[A, B], but if at least one packet in the buffer had a timestamp lower
than A, then no packets at all were discarded. This is now fixed.
BUG=webrtc:7937
Review-Url: https://codereview.webrtc.org/2969123003
Cr-Commit-Position: refs/heads/master@{#18903}
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`
The only manual edit is to add an include of webrtc/rtc_base/checks.h in
webrtc/modules/audio_device/android/opensles_common.h, which likely
was needed due to changed include paths due to 'git cl format'.
BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2969653002
Cr-Commit-Position: refs/heads/master@{#18871}
(This got reverted because of a problem with the Opus encoder parts.
Re-landing without changes.)
BUG=webrtc:7837
Review-Url: https://codereview.webrtc.org/2950453002
Cr-Commit-Position: refs/heads/master@{#18855}
This was previously reverted, because external projects were using the
internal webrtc::AudioEncoderOpus class and broke when it was renamed.
This re-land avoids renaming it immediately, to give those projects
time to adapt. It also has to revert some of the changes I had made to the
Config struct, since that was also used by the same external projects.
BUG=webrtc:7831
Review-Url: https://codereview.webrtc.org/2948483002
Cr-Commit-Position: refs/heads/master@{#18852}
Some .proto files have newline at the end. This CL levels all our .proto
files. A presubmit check will follow.
NOTRY=True
TBR=minyue@webrtc.org
Bug: None
Change-Id: I988fe94c31abf91c85a45b564c488329d677b958
Reviewed-on: https://chromium-review.googlesource.com/552137
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18823}
The network stats used to be polled from the NetEq object once at the
very end of the simulation. With this change, the stats are polled
once every second, and then aggregated at the end of the run. This
leads to more meaningful numbers.
Bug: webrtc:2692
Change-Id: I9e0f4ddada2f9e42fb9234970deb1af235fffc8c
Reviewed-on: https://chromium-review.googlesource.com/541218
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18682}
This change adds an option to have neteq_rtpplay generate a Matlab
script. When executed in Matlab, the script will generate graphs with
the timing information from the test run.
The script is generated when the flag --matlabplot is passed to
neteq_rtpplay.
The CL also adds better checking and reporting about packets discarded
in the process of finding out the initial sampling rate.
Bug: webrtc:2692, webrtc:7467
Change-Id: I805e7c83b82533142b6e74bf065506e3d60a8170
Reviewed-on: https://chromium-review.googlesource.com/541276
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18680}
Reason for revert:
Breaking google3 projects
Original issue's description:
> Opus implementation of the AudioEncoderFactoryTemplate API
>
> Now the templated AudioEncoderFactory can create Opus encoders!
>
> BUG=webrtc:7831
>
> Review-Url: https://codereview.webrtc.org/2930243003
> Cr-Commit-Position: refs/heads/master@{#18645}
> Committed: fe1aa82c63TBR=ossu@webrtc.org,solenberg@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7831
Review-Url: https://codereview.webrtc.org/2947563002
Cr-Commit-Position: refs/heads/master@{#18649}
Reason for revert:
breaking downstream projects
Original issue's description:
> Opus implementation of the AudioDecoderFactoryTemplate API
>
> BUG=webrtc:7837
>
> Review-Url: https://codereview.webrtc.org/2942733003
> Cr-Commit-Position: refs/heads/master@{#18646}
> Committed: d053fe4ab3TBR=ossu@webrtc.org,solenberg@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7837
Review-Url: https://codereview.webrtc.org/2944763002
Cr-Commit-Position: refs/heads/master@{#18648}
Now the templated AudioEncoderFactory can create Opus encoders!
BUG=webrtc:7831
Review-Url: https://codereview.webrtc.org/2930243003
Cr-Commit-Position: refs/heads/master@{#18645}
Now the templated AudioEncoderFactory can create G722 encoders!
BUG=webrtc:7833
Review-Url: https://codereview.webrtc.org/2934833002
Cr-Commit-Position: refs/heads/master@{#18644}
Now the templated AudioDecoderFactory can create G722 decoders!
BUG=webrtc:7839
Review-Url: https://codereview.webrtc.org/2940833002
Cr-Commit-Position: refs/heads/master@{#18643}
Imprecisions in floating point representation caused noise in the
graphs. The integer division is in fact exact.
BUG= webrtc:7467
Review-Url: https://codereview.webrtc.org/2933053002
Cr-Commit-Position: refs/heads/master@{#18592}
This CL adds the capability to analyze and plot how NetEq behaves in
response to a network trace.
BUG=webrtc:7467
Review-Url: https://codereview.webrtc.org/2876423002
Cr-Commit-Position: refs/heads/master@{#18590}
LastDecoderError was only used in tests. LastError was only used in
conjunction with RemovePayloadType, and always to distinguish between
"decoder not found" and "other error". In AcmReceiver, "decoder not
found" was not treated as an error.
With this change, calling NetEq::RemovePayloadType with a payload type
that is not registered is no longer considered to be an error. This
allows to rewrite the code in AcmReceiver, such that it no longer has
to call LastError.
The internal member variables NetEqImpl::error_code_ and
NetEqImpl::decoder_error_code_ are removed, since they were no longer
read.
Bug: none
Change-Id: Ibfe97265954a2870c3caea4a34aac958351d7ff1
Reviewed-on: https://chromium-review.googlesource.com/535533
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18588}
const int16_t* data() const;
int16_t* mutable_data();
- data() returns a zeroed static buffer on muted frames (to avoid unnecessary zeroing of the member buffer) and directly returns AudioFrame::data_ on unmuted frames.
- mutable_data(), lazily zeroes AudioFrame::data_ if the frame is currently muted, sets muted=false, and returns AudioFrame::data_.
These accessors serve to "force" callers to be aware of the mute state field, i.e. lazy zeroing is not the primary motivation.
This change only optimizes handling of muted frames where it is somewhat trivial to do so. Other improvements requiring more significant structural changes will come later.
BUG=webrtc:7343
TBR=henrika
Review-Url: https://codereview.webrtc.org/2750783004
Cr-Commit-Position: refs/heads/master@{#18543}
A recent change (https://codereview.webrtc.org/2855143002/) introduced
a bug in RtcEventLogSource::NextPacket(). The rtp_packet_index_ must
be incremented when a valid packet is found and delivered. Otherwise,
the same packet will be delivered over and over again.
The recent change also altered the way that audio packets are sifted out. Now, the RTP header is always parsed before discarding any non-audio packets. This means that RtpHeaderParser::Parse is always called, also with video packets, which sometimes contain padding. When header-only dumps (such as RtcEventLogs) are created, the payload is stripped, and the payload length is equal to
the RTP header length. However, if the original packet was padded, the
RTP header will carry information about this padding length, and the
parser will check that the pyaload length is at least the header +
padding. This is not the case for header-only dumps, and the parser will return an error. In this CL, we ignore that error when a header-only packet has padding length larger than 0.
BUG=webrtc:7538
Review-Url: https://codereview.webrtc.org/2912323003
Cr-Commit-Position: refs/heads/master@{#18385}
Biggest change is to Remove MediaType as argument to RtcEventLog::LogRtpHeader and RtcEventLog::LogRtcpHeader.
Since the type is used by tools, these tools are rewritten to figure out the media type from the configurations instead.
BUG=webrtc:7538
TBR=solenberg@webrtc.org // For call.cc and voiceengine.cc
Review-Url: https://codereview.webrtc.org/2855143002
Cr-Commit-Position: refs/heads/master@{#18324}
Negating an int can result in a value that cannot be represented as an int. This is fixed here by using a 64 bit variable.
BUG=chromium:663611
Review-Url: https://codereview.webrtc.org/2879863002
Cr-Commit-Position: refs/heads/master@{#18167}
RTP packets can be padded with extra data at the end of the payload. The usable
payload length of the packet should then be reduced with the padding length,
since the padding must be discarded. This was not the case; instead, the entire
payload, including padding data, was forwarded to the audio channel and in the
end to the decoder.
A special case of padding is packets which are empty except for the padding.
That is, they carry no usable payload. These packets are sometimes used for
probing the network and were discarded in
RTPReceiverAudio::ParseAudioCodecSpecific. The result is that NetEq never sees
those empty packets, just the holes in the sequence number series; this can
throw off the target buffer calculations.
With this change, the empty (after removing the padding) packets are let through,
all the way down to NetEq, to a new method called NetEq::InsertEmptyPacket. This
method notifies the DelayManager that an empty packet was received.
BUG=webrtc:7610, webrtc:7625
Review-Url: https://codereview.webrtc.org/2870043003
Cr-Commit-Position: refs/heads/master@{#18083}
After a Merge operation, the statistics for number of samples
generated using Expand must be corrected, and the correction can in
fact be negative. However, a bug was introduced in
https://codereview.webrtc.org/1230503003 which uses a size_t to
represent the correction, which leads to wrap-around of the negative
value. This is not a problem in itself, since this value is added to
another size_t, with the effect that the desired subtraction happens
anyway.
The actual problem arises if the statistics are polled/reset before a
subtraction happens -- that is, between an Expand and a Merge
operation. This will lead to an actual wrap-around of the stats value,
and large expand_rate (16384) is reported.
BUG=webrtc:7554
Review-Url: https://codereview.webrtc.org/2859483005
Cr-Commit-Position: refs/heads/master@{#18029}
This change allows more callbacks to be registered to the test object.
The callbacks are used to give the user of the test object the ability
to instrument the test object. This CL specifically adds
instrumentation points just after a packet is inserted into NetEq, and
just after audio is pulled out of NetEq.
BUG=webrtc:7467
Review-Url: https://codereview.webrtc.org/2851383004
Cr-Commit-Position: refs/heads/master@{#18014}
Plumbed AudioEncoderFactory up into CreatePeerConnectionFactory.
BUG=webrtc:5806
Review-Url: https://codereview.webrtc.org/2799033006
Cr-Commit-Position: refs/heads/master@{#17977}
This new method prints information about the packet.
BUG=webrtc:7467
Review-Url: https://codereview.webrtc.org/2844283002
Cr-Commit-Position: refs/heads/master@{#17922}
In this CL, the neteq_unittest_tools target is split in two separate
targets. One still called neteq_tools which does not set
testonly=true and that includes code related to audio input,
replacement audio and fake decoding. The other target called
neteq_test_tools contains the remaining files, and is
still under testonly=true.
Other renames:
neteq_test_tools -> neteq_test_tools_deprecated
neteq_test_minimal -> neteq_tools_minimal
Cyclic dependencies were also cleaned up.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_rel_ng,linux_chromium_compile_dbg_ng
BUG=webrtc:7467,webrtc:6828
Review-Url: https://codereview.webrtc.org/2845013003
Cr-Commit-Position: refs/heads/master@{#17921}
This is to be used in tests where the audio output is not interesting.
BUG=webrtc:7467
Review-Url: https://codereview.webrtc.org/2842033003
Cr-Commit-Position: refs/heads/master@{#17893}