Commit graph

43 commits

Author SHA1 Message Date
Danil Chapovalov
0250b69fd4 Delete unused constructor of FakeNetworkPipe
Bug: None
Change-Id: I960f9d3988e10fa22f3379d071818ad44e36d456
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316861
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40569}
2023-08-18 13:07:10 +00:00
Harald Alvestrand
d43af9172b Remove internal overrides using old SendRtp and SendRtcp interfaces.
This CL takes away all usages except for Android code.

Low-Coverage-Reason: Refactoring old code
Bug: webrtc:15410
Change-Id: I66bed6a4a2787b4177a82e599b48623ca67cd235
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315940
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40554}
2023-08-15 13:20:21 +00:00
Harald Alvestrand
34d82df2ba Use ArrayView versions of SendRtp and SendRtcp
This CL adds [[deprecated]] to the old signatures, and uses the new
signatures throughout.

Bug: webrtc:14870
Change-Id: Ic9a8198ac0a2f954e1b2e7d05a55dbe04342f958
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314962
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40517}
2023-08-07 08:28:48 +00:00
Per K
664cf14f9f Reland "Delete PacketReceiver::DeliverPacket from all implementations"
This reverts commit f2a083f262.

Reason for revert: Test problem fixed in https://webrtc-review.googlesource.com/c/src/+/291333.

Original change's description:
> Revert "Delete PacketReceiver::DeliverPacket from all implementations"
>
> 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}

Bug: webrtc:7135,webrtc:14795,b/266658815
Change-Id: Ia640f4342a1f42012ba5295003e17aef7613ad80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291440
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39199}
2023-01-25 18:18:29 +00:00
Andrey Logvin
f2a083f262 Revert "Delete PacketReceiver::DeliverPacket from all implementations"
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}
2023-01-25 09:25:05 +00:00
Per K
897ea04db5 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}
2023-01-24 17:03:17 +00:00
Per K
bc319027ae Implement PacketReceiver::DeliverRtpPacket in FakeNetworkPipe
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}
2023-01-09 20:47:19 +00:00
Per K
cf439a04e5 Introduce PacketReceiver::DeliverRtpPacket and PacketReceier::DeliverRtcpPacket
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}
2023-01-05 13:54:02 +00:00
Niels Möller
7336422fe3 Delete some unneeded references to ProcessThread.
Bug: None
Change-Id: I77528df2a8bd2d461440cf59ada8229e732a1e00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242370
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35613}
2022-01-03 15:36:02 +00:00
Artem Titov
ea24027e83 Use backticks not vertical bars to denote variables in comments for /call
Bug: webrtc:12338
Change-Id: I8f92127b61352bd4b98a0690e9a0435bb6c6f870
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226943
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34569}
2021-07-27 18:29:33 +00:00
Markus Handell
8fe932a5a3 Migrate call/ to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: Iab7142c77bc0c1a026cf5121b756094e05bccefe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176742
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31636}
2020-07-06 15:48:30 +00:00
Erik Språng
eea605deeb Make fake network degradation work also for sent audio
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}
2019-08-12 15:20:18 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Sebastian Jansson
836fee1e1a Calculate next process time in simulated network.
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}
2019-02-08 19:33:17 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00
Sebastian Jansson
71822866c6 Allow FakeNetworkPipe to wake up its processing thread
Bug: webrtc:9630
Change-Id: I2b09593f175e3f3e1fe0d990515aa70c2481161b
Reviewed-on: https://webrtc-review.googlesource.com/c/95144
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25451}
2018-10-31 15:20:57 +00:00
Christoffer Rodbro
1803bb2470 Fix for clock read race in FakeNetworkPipe.
Bug: none
Change-Id: Id708c532bfc0c9cd696a974d455ff79f25c222fe
Reviewed-on: https://webrtc-review.googlesource.com/c/107880
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25363}
2018-10-25 12:34:01 +00:00
Christoffer Rodbro
3284b61a6c Fix for packet loss tracking in network emulation.
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}
2018-10-25 12:32:05 +00:00
Artem Titov
8ea1e9def1 Switch webrtc from deprecated usages of NetworkSimulationInterface
Bug: webrtc:9630
Change-Id: I42222261676b0c260c1aab81523a23988d3cd1c1
Reviewed-on: https://webrtc-review.googlesource.com/c/103780
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25011}
2018-10-05 11:01:42 +00:00
Niels Möller
433eafe1f5 Delete unused includes of assert.h
Bug: None
Change-Id: Iadc531710dca0ba34a00ac363bfe0784355bb6f9
Reviewed-on: https://webrtc-review.googlesource.com/c/103501
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24995}
2018-10-04 14:01:44 +00:00
Artem Titov
c7ea852189 Remove deprecated ctors of DirectTransport and its subclasses and FakeNetworkPipe
Bug: webrtc:9630
Change-Id: I109fbcf247ff486579d79f74c33ffdd1af9acc00
Reviewed-on: https://webrtc-review.googlesource.com/95425
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24482}
2018-08-29 11:05:19 +00:00
Artem Titov
631cafafcc Eliminate methods SetConfig() from DirectTransport and FakeNetworkPipe
Bug: webrtc:9630
Change-Id: If67d7dc79436614beb17b97c0f69814093e4fbb8
Reviewed-on: https://webrtc-review.googlesource.com/95140
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@{#24386}
2018-08-22 11:12:40 +00:00
Niels Möller
f189c48c86 Delete webrtc::PacketTime and backwards compatibility.
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}
2018-08-17 15:14:03 +00:00
Artem Titov
b005087a8c Add replacements for all FakeNetworkPipe ctors.
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}
2018-08-16 16:23:24 +00:00
Artem Titov
537b7fed9a Add FakeNetworkPipe ctor from NetworkSimulationInterface.
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}
2018-08-16 11:37:38 +00:00
Artem Titov
847a9c70c2 Use NetworkSimulationInterface instead of SimulatedNetwork.
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}
2018-08-15 10:21:10 +00:00
Sebastian Jansson
f96b1ca609 Move SimulatedNetwork class to separate file.
Bug: webrtc:9467
Change-Id: Iaf91f27ea7ad9e9e59991bbeb0ef3868578e6a8f
Reviewed-on: https://webrtc-review.googlesource.com/92884
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24221}
2018-08-08 09:29:53 +00:00
Sebastian Jansson
9129565879 Adds functionality to add delay spikes in SimulatedNetwork.
Bug: webrtc:9467
Change-Id: Ifddafa65a9e18a3131fc0415764599740fab2db4
Reviewed-on: https://webrtc-review.googlesource.com/92089
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24213}
2018-08-07 16:45:19 +00:00
Niels Möller
7008287219 Delete struct webrtc::PacketTime.
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}
2018-08-07 10:07:15 +00:00
Mirko Bonadei
ed1dcf9f23 Enable clang::find_bad_constructs for call/ (part 1).
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}
2018-07-26 15:33:12 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Danil Chapovalov
b9b146c9fe Replace rtc::Optional with absl::optional in audio, call and video
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}
2018-06-15 12:09:49 +00:00
Sebastian Jansson
e6c0964572 Ensures that arrival is past send time in SimulatedNetwork.
Bug: webrtc:8415
Change-Id: I2797c7dfb3e7b9622a12c2d1e35462e0c686fa8e
Reviewed-on: https://webrtc-review.googlesource.com/76101
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23228}
2018-05-15 07:18:00 +00:00
Sebastian Jansson
7ee2e25afb Extracting the simulation part of FakeNetworkPipe
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}
2018-05-07 13:59:28 +00:00
Sebastian Jansson
512bdce714 Using microseconds in FakeNetworkPipe.
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}
2018-04-25 10:32:23 +00:00
Sebastian Jansson
09408115cd Moving demux from FakeNetworkPipe to DirectTransport.
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}
2018-04-25 10:13:03 +00:00
Sebastian Jansson
a44ab181bf Adds queue time when using demuxer with FakeNetworkPipe.
This ensures that packet time effects are simulated properly when using
a demuxer with FakeNetworkPipe. Previously this was only done using a
receiver.

This prepares for a CL with a test depending on this behavior.

Bug: webrtc:9054
Change-Id: I031acc9e18adc2891d3e396352dcd2614211909c
Reviewed-on: https://webrtc-review.googlesource.com/67342
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22918}
2018-04-18 09:27:04 +00:00
Sebastian Jansson
7e85d67031 Added SetClockOffset on FakeNetworkPipe.
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}
2018-04-06 09:02:12 +00:00
Christoffer Rodbro
8ef59a431f Added data member access methods to FakeNetworkPipe.
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}
2018-03-20 15:58:21 +00:00
Erik Språng
097085140e Reland: 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.

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}
2018-03-14 17:03:25 +00:00
Ilya Nikolaevskiy
16cba5c18d Revert "Add ability to emulate degraded network in Call via field trial"
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}
2018-03-14 10:52:01 +00:00
Erik Språng
31a12c557d 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}
2018-03-14 10:22:50 +00:00