This reverts commit 897ea04db5.
Reason for revert: Speculative revert as it could be the reason why perf tests started failing: https://ci.chromium.org/p/webrtc/g/perf/console?limit=200
Original change's description:
> Delete PacketReceiver::DeliverPacket from all implementations
>
> And fix tests that still depend on extensions to be known by the receiver.
>
> Change-Id: I62227829af81af07769189e547f1cdb8ed4d06b3
>
> Bug: webrtc:7135,webrtc:14795
> Change-Id: I62227829af81af07769189e547f1cdb8ed4d06b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290996
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39184}
Bug: webrtc:7135,webrtc:14795,b/266658815
Change-Id: I9d03f4952938d176ffee110a707acadc1846457c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291400
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39189}
And fix tests that still depend on extensions to be known by the receiver.
Change-Id: I62227829af81af07769189e547f1cdb8ed4d06b3
Bug: webrtc:7135,webrtc:14795
Change-Id: I62227829af81af07769189e547f1cdb8ed4d06b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290996
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39184}
and in DegradedCall. In DegradedCall - ThreadPacketReceiver is no longer needed.
Implementation of DeliverRtpPacket is done in preparation of https://webrtc-review.googlesource.com/c/src/+/290540, where the parsed packet will be propagated to Call without extra parsing.
Bug: webrtc:7135, webrtc:14795
Change-Id: Ic068105d6d1f337afc6b4539b0e7184e736e7ee0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290704
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39048}
DeliverRtpPacket use a parsed RTP packet as argument where the RTP extensions are supposed to be known.
This method is implemented in webrt::Call and temporary used by the exising method Call::DeliverRtp, but the idea is to instead avoid extra packet parsing by forwarding a RtpPacketReceived from RtpTransport::DemuxRtpPacket via WebrtcVideoChannel::OnPacketReceived and WebrtcVoiceChannel.
DeliverRtcpPacket is also implemented in Call and is directly used in PeerConnection::InitializeRtcpCallback.
Bug: webrtc:14795, webrtc:7135
Change-Id: Ib6ffe8e1229ac07fa459ee2fc9a0af8455a23bac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290401
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39015}
Previously this functionality only worked correctly with a single
Transport instance, meaning a single video track.
This CL moves the transport pointer from being a member in
FakeNetworkPipe to being set on each packet, so that e.g. audio packets
point to the audio transport and video packet to the video transport.
This means we need a separate adapter per stream in DegradedCall.
Additionally, since Transport instances can potentially be destroyed
before it's time to forward the message to it, we need to keep track
of which instance that are live and ignore packets we can't forward.
Bug: None
Change-Id: I314d431c04ff81c3859cf661e2722c99342f785e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148586
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28831}
Currently there's an implicit requirement that users of
SimulatedNetwork should call it repeatedly, even if the return value
of NextDeliveryTimeUs is unset.
With this change, it will indicate that there might be a delivery in
5 ms at any time there are packets in queue. Which results in unchanged
behavior compared to current usage but allows new users to expect
robust behavior.
Bug: webrtc:9510
Change-Id: I45b8b5f1f0d3d13a8ec9b163d4011c5f01a53069
Reviewed-on: https://webrtc-review.googlesource.com/c/120402
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26617}
Fake_network_pipe currently only counts losses due to buffer overflow.
Fix by counting all packets marked as lost.
Bug: webrtc:9904
Change-Id: I070538b289d925c650d8abca1644ba015227c2a7
Reviewed-on: https://webrtc-review.googlesource.com/c/107646
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25362}
Introduce SimulatedNetworkReceiverInterface and switch DirectTransport
on this interface. Also switch part of related users on
DefaultNetworkSimulationConfig.
This two changes united into single CL to prevent work duplication.
Most changes were done because of stop including fake_network_pipe.h
into direct_transport.h, so splitting this into 2 CLs will require
first fix all imports of fake_network_pipe.h and then replace them
on new API imports again.
Bug: webrtc:9630
Change-Id: I87d4a6ff1bab72d04a9871a40441f4fbe028f4e6
Reviewed-on: https://webrtc-review.googlesource.com/94762
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24336}
This is a followup to
https://webrtc-review.googlesource.com/c/src/+/91840, which needed
transitional methods while updating downstream code. This cl completes
the deletion, and can be landed after downstream code is updated.
Bug: webtrc:9584
Change-Id: I4d3654748973a4757a8d79bb93f524c630a0eca3
Reviewed-on: https://webrtc-review.googlesource.com/93285
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24329}
Add replacements for all FakeNetworkPipe constructos, that will accept
instance of NetworkSimulationInterface instead of config to be able to
use any implmentation of network simulation.
Bug: webrtc:9630
Change-Id: Ifceb2f0d028faf255648891ce695b3742f866044
Reviewed-on: https://webrtc-review.googlesource.com/94541
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24320}
Switch from using FakeNetworkPipe::SetConfig on holding direct reference
on instances of NetworkSimulationInterface if you are required to
reconfigure it in the runtime.
Also add fake_network_unittests to built test targets.
Bug: webrtc:9630
Change-Id: I5fd6b33904367aa6dc00ca2e2f5f780f433acf35
Reviewed-on: https://webrtc-review.googlesource.com/94510
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24314}
Add FakeNetworkPipe ctor from NetworkSimulationInterface to be able to
inject different implementations of simulated networks.
If user requires to do something with injected simulation he can keep
raw reference, or introduce some proxy, that will hide shared ownership
from FakeNetworkPipe. Also FakeNetworkPipe guarantee to keep simulation
object alive while it is alive itself.
Bug: webrtc:9630
Change-Id: Ie00ea1d47bf7658b0c6433cf2efbf364f885c8a0
Reviewed-on: https://webrtc-review.googlesource.com/94153
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24312}
Switch on using NetworkSimulatedInterface in FakeNetwork pipe to be able
to inject different implementations in future.
Also temporary add SetConfig(...) method to NetworkSimulationInterface
to make it possible to use it in FakeNetworkPipe. This method will be
removed by futher refactoring.
Bug: webrtc:9630
Change-Id: I2ce2219f523b4121e46643699ab87b37da09d95b
Reviewed-on: https://webrtc-review.googlesource.com/94145
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24289}
Replaced by a int64_t representing time in us.
Bug: webtrc:9584
Change-Id: I0505c020ef741ad940203ec300e8adb103856dda
Reviewed-on: https://webrtc-review.googlesource.com/91840
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24204}
This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.
Bug: webrtc:9251, webrtc:163
Change-Id: Ia58a3b4f3becf9e620d3991da8451d81f32f8ad0
Reviewed-on: https://webrtc-review.googlesource.com/90406
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24118}
The purpose is to make the fixture reusable in downstream
projects. The CL adds the following things to API:
- api/test/video_quality_test_fixture.h
- api/test/create_video_quality_test_fixture.h
The following things are moved to API:
- call/bitrate_constraints.h (api/bitrate_constraints.h)
- call/simulated_network.h (api/test/simulated_network.h)
- call/media_type.h (api/mediatypes.h)
These are required by the params struct passed to the
fixture. I didn't attempt to split the params struct into
an internal-only and public version in this CL, and as
a result we need to pull in the above things. They are
quite harmless though, so I think it's worth it in order
to avoid splitting up the test config struct.
This CL doesn't solve all the problems we need to
implement downstream tests; we probably need to upstream
tracing variants of FakeNetworkPipe for instance, but
that will come later. This puts in place the basic
structure for now.
Bug: None
Change-Id: I35e26ed126fad27bc7b2a465400291084f6ac911
Reviewed-on: https://webrtc-review.googlesource.com/69601
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23714}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameters 'audio call video':
#!/bin/bash
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I02c5db956846a88a268a300ba086703a02d62e36
Reviewed-on: https://webrtc-review.googlesource.com/83722
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23628}
This CL extracts the part of FakeNetworkPipe responsible for simulating
network behavior into the SimulatedNetwork class, which implements the
new FakeNetworkInterface.
This prepares for an upcoming CL where the network simulation can
be injected in FakeNetworkPipe, allowing custom simulation models to be
used.
Bug: None
Change-Id: I9b5fa0dd9ff1fd8ccd5a7ce2d9ea3a5b11c5215e
Reviewed-on: https://webrtc-review.googlesource.com/64405
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23146}
This CL changes the usages of milliseconds as a unit in FakeNetworkPipe
to microseconds. This matches the time unit of the PacketTime struct and
increases the precision of the simulation. The time resolution in
FakeNetworkPipe::Config is kept unchanged to keep the values more human
readable.
This CL prepares refactoring in upcoming CLs.
Bug: webrtc:9054
Change-Id: I103f7a0afa41381f676ea07fcc8c083532e61f1d
Reviewed-on: https://webrtc-review.googlesource.com/64140
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23018}
This CL moves the responsibility for demuxing from FakeNetworkPipe
to DirectTransport. This makes the interface for FakeNetworkPipe more
consistent. It exposes fewer different interfaces for different usages.
It also means that any time degradations applied to the packets due in
FakeNetworkPipe in tests will now be propagated to Call in a more
realistic manner. Previously the time was set to uninitialized which
meant that Call filled in values based on the system clock.
Bug: webrtc:9054
Change-Id: Ie534062f5ae9ad992c06b19e43804138a35702f0
Reviewed-on: https://webrtc-review.googlesource.com/64260
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23017}
Added functionality on the FakeNetworkPipe to introduce arbitrary
clock offsets. This offset is added to the reported receive time of
all packets. This prepares for a later CL using this to test correction
of receive time stamps.
Bug: webrtc:9054
Change-Id: I811b3aa8359bc917f59443088d8a418368242db9
Reviewed-on: https://webrtc-review.googlesource.com/64726
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22763}
Give internal test tools access to FakeNetworkPipe data members
by adding a set of access methods.
Also deleted copy assignment operator for NetworkPacket.
Bug: None
Change-Id: I451a21e0cc6ec82ea830cf197c7a4cef0789623c
Reviewed-on: https://webrtc-review.googlesource.com/63301
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22515}
This is especially useful in Chrome, allowing use to emulate network
conditions in incoming or outgoing media without the need for platform
specific tools or hacks. It also doesn't interfere with the rest of the
network traffic.
Also includes some refactorings.
TBR=stefan@webrtc.org, philipel@webrtc.org
Originally reviewed on: https://webrtc-review.googlesource.com/33013
Bug: webrtc:8910
Change-Id: I162dde5fa20a260b41e5187fcf30b49f5e6fb0e0
Reviewed-on: https://webrtc-review.googlesource.com/61782
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22430}
This reverts commit 31a12c557d.
Reason for revert: Breaks downstream project.
Original change's description:
> Add ability to emulate degraded network in Call via field trial
>
> This is especially useful in Chrome, allowing use to emulate network
> conditions in incoming or outgoing media without the need for platform
> specific tools or hacks. It also doesn't interfere with the rest of the
> network traffic.
>
> Also includes some refactorings.
>
> Bug: webrtc:8910
> Change-Id: I2656a2d4218acbe7f8ffd669de19a02275735438
> Reviewed-on: https://webrtc-review.googlesource.com/33013
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22418}
TBR=sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org
Change-Id: I22bda6da01c2ff5abd6f408c5ee9e4fba21294f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8910
Reviewed-on: https://webrtc-review.googlesource.com/61700
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22419}
This is especially useful in Chrome, allowing use to emulate network
conditions in incoming or outgoing media without the need for platform
specific tools or hacks. It also doesn't interfere with the rest of the
network traffic.
Also includes some refactorings.
Bug: webrtc:8910
Change-Id: I2656a2d4218acbe7f8ffd669de19a02275735438
Reviewed-on: https://webrtc-review.googlesource.com/33013
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22418}