Commit graph

44 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
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
4abca6699d Ensure FakeNetwork propages arrival_time
Bug: webrtc:14833
Change-Id: I584524cca81e17ac91d581daab6030705ad68dac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291104
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39148}
2023-01-19 15:27:33 +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
Byoungchan Lee
c065e739e2 Remove RTC_DISALLOW_COPY_AND_ASSIGN more.
Bug: webrtc:13555, webrtc:13082
Change-Id: I9c07708108da0a26f5e228384fd56cef4d1540b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35749}
2022-01-20 11:00:18 +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
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
Niels Möller
29e13fd2ca Delete rtc::PacketTime (was an alias for int64_t)
Followup to https://webrtc-review.googlesource.com/c/91860.

Bug: webrtc:9584
Change-Id: Icadf73d6c275ef32167357fc33b3c08158fa096f
Reviewed-on: https://webrtc-review.googlesource.com/c/114545
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26109}
2019-01-02 09:07:51 +00:00
Niels Möller
2222a80e79 Delete unneeded includes of common_types.h and gn deps on webrtc_common.
Bug: webrtc:5876
Change-Id: Iae14e5f1679067a5a5e0584ca830aee0870c8807
Reviewed-on: https://webrtc-review.googlesource.com/c/111463
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25715}
2018-11-20 16:28:39 +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
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
Artem Titov
3a6b729a8e Cleanup: remove deprecated class shortcuts.
To be landed after 24th September.

Bug: webrtc:9630
Change-Id: Ie61110357bbc6b6fc49ddf2bd5d74921e75a6e67
Reviewed-on: https://webrtc-review.googlesource.com/97041
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24818}
2018-09-25 09:06:47 +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
Artem Titov
c02df81a22 Eliminate SetClockOffset() from DirectTransport.
Eliminate SetClockOffset() from DirectTransport and
SimulatedPacketReceiverInterface.

Bug: webrtc:9630
Change-Id: Ia9b6aafeb1a9e7bf52d8e1ba46848c66a07143c2
Reviewed-on: https://webrtc-review.googlesource.com/94764
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24341}
2018-08-20 08:46:17 +00:00
Artem Titov
46c4e60939 Introduce SimulatedNetworkReceiverInterface.
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}
2018-08-20 07:23:41 +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
e23b8a9899 Do not use FakeNetworkPipe::SetConfig.
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}
2018-08-16 14:23:29 +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
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Patrik Höglund
b6b29e0718 Convert video quality test from a TEST_F to a TEST fixture.
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}
2018-06-21 15:49:43 +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
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
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