Commit graph

50 commits

Author SHA1 Message Date
Per K
569849e885 Move call/simulated_network to test/network
Old target and call/simulated.h exist but refer to new target in test/network.

Bug: webrtc:14525
Change-Id: Ida04cef17913f2f829d7e925ae454dc40d5e8240
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349264
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42191}
2024-04-29 09:55:06 +00:00
Danil Chapovalov
dcc1534764 Delete rtc::TaskQueue
All usage was updated to use TaskQueueBase interface directly bypassing rtc::TaskQueue wrapper

Bug: webrtc:14169
Change-Id: I1808afd363b50448d4014d8d8402fce41b16a3ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341082
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41834}
2024-02-28 10:22:49 +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
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
3f519e0c89 Add ability to set bitrate of DegradedCall via PeerConnection::SetBitrate
Bug: None
Change-Id: Iac8970c95a01c1322fa65a19ab11ffd8f94412e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279200
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38442}
2022-10-19 14:09:07 +00:00
Jonas Oreland
6c2dae21e9 Move VideoEncoderConfig from api/ into video/config
This cl move VideoEncoderConfig from api/ to video/config.

VideoStreamEncoderInterface and VideoStreamEncoderObserver
are moved as collateral.

brandt@ think that the reason these were in api/ in the
first place had to downstream project.

Functionality wise, this is a NOP, but it makes it easier
to modify the encoder (config).

Bug: webrtc:14451
Change-Id: I2610d815aeb186298498e7102cac773ecac8cd36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277002
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38242}
2022-09-29 09:44:43 +00:00
Byoungchan Lee
c228575baf Make DegradedCall work without DCHECK failure
Ability to emulate degraded networks using DegradedCall has not
been covered by tests and it is crashing due to DCHECKs.
Fix threading issues so this no longer crash.

Bug: None
Change-Id: I9276dfb1f71762faa02146af0bfaab713bebb7f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276060
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#38216}
2022-09-27 08:02:01 +00:00
Artem Titov
c374d11fac Move to_queued_task.h and pending_task_safety_flag.h into public API
Bug: b/235812579
Change-Id: I9fa3dc4a65044df8b44fff4e9bfeac7233fa381c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37248}
2022-06-17 09:20:39 +00:00
Tommi
3176ef79e9 Rename AudioReceiveStream to AudioReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I22eaa7a9e082fc575cf7471d7a2f4f706564d54f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262805
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36965}
2022-05-23 08:44:26 +00:00
Tommi
f6f4543304 Rename VideoReceiveStream to VideoReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I653cfe46486e0396897dd333069a894d67e3c07b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262769
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36958}
2022-05-22 10:54:38 +00:00
Ali Tofigh
641a1b11b6 Adopt absl::string_view in call/
Bug: webrtc:13579
Change-Id: Ib616eb3372da341fafb55c23038182751b9da5a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262780
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36910}
2022-05-17 12:00:45 +00:00
Tommi
1331c1821c Reland: Update local_ssrc without needing to recreate video streams.
This is comparable to this change done previously for for audio streams:
https://webrtc-review.googlesource.com/c/src/+/222042

This is a reland of commit 16a8b25d80
with an additional fix in Patchset 2. Another problem turned out to be
in RTCPReceiver, which is fixed in:
https://webrtc-review.googlesource.com/c/src/+/262663

Bug: webrtc:11993
Change-Id: I63c7cf62a6dd50f88b491fea3ba866697552ef5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262665
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36907}
2022-05-17 10:59:54 +00:00
Tomas Gunnarsson
c92ee5f3c3 Revert "Update local_ssrc without needing to recreate video streams."
This reverts commit 16a8b25d80.

Reason for revert: Checking if this is blocking the Chromium autoroller.

Original change's description:
> Update local_ssrc without needing to recreate video streams.
>
> This is comparable to this change done previously for for audio streams:
> https://webrtc-review.googlesource.com/c/src/+/222042
>
> Bug: webrtc:11993
> Change-Id: Ic953f816a8f7c56d1c3dc9a16d85bef3696a663d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261960
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36876}

Bug: webrtc:11993
Change-Id: I3a8d2f6a7e89b6784754d8e891a4e01479807c2d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262422
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36892}
2022-05-13 22:30:44 +00:00
Tommi
16a8b25d80 Update local_ssrc without needing to recreate video streams.
This is comparable to this change done previously for for audio streams:
https://webrtc-review.googlesource.com/c/src/+/222042

Bug: webrtc:11993
Change-Id: Ic953f816a8f7c56d1c3dc9a16d85bef3696a663d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261960
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36876}
2022-05-13 10:08:54 +00:00
Tommi
cf4ed1516e Add GetRtpExtensionMap to ReceiveStream and remove GetRtpExtensions.
GetRtpExtensions() is still used in one corner case for audio receive
streams, so GetRtpExtensions has migrated to AudioReceiveStream.

Updated FlexfecReceiveStream config management (incl. pass by value) and
now store an RtpHeaderExtensionMap in FlexfecReceiveStreamImpl.

Call GetRtpExtensionMap() from call.cc instead of constructing one on
the fly for each rtp packet (for video packets at least).

Bug: webrtc:11993
Change-Id: Id90ec5d43ea368f58edd6f17cb39d8c54aec641f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261800
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36839}
2022-05-10 13:50:31 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Erik Språng
42abc13d17 Run degraded fake network on Call's network thread.
This avoids creating a dedicated task queue that potentially contends
with the network thread.

Bug: webrtc:251043
Change-Id: I2d54486c4235dac44b79f89d4f3d81b4d3de4026
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252282
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36058}
2022-02-23 12:10:21 +00:00
Erik Språng
b5cba85c2f Add support for time-varying constraints in DegradedCall.
The fake network configs are now specified using just two field trials:
WebRTC-FakeNetworkSendConfig and WebRTC-FakeNetworkReceiveConfig.
Both of them have the following parameters from
BuiltInNetworkBehaviorConfig:

* queue_length_packets  // Queue length in number of packets.
* queue_delay_ms  // Delay in addition to capacity induced delay.
* delay_standard_deviation_ms   // Standard deviation of the extra delay.
* link_capacity_kbps  // Link capacity in kbps.
* loss_percent  // Random packet loss.
* allow_reordering  // If packets are allowed to be reordered.
* avg_burst_loss_length  // The average length of a burst of lost packets.
* packet_overhead  // Additional bytes to add to packet size.
* codel_active_queue_management  // Enable CoDel active queue management.

Plus:
* duration  // For how long to use this config before progressing.

Example:
WebRTC-FakeNetworkSendConfig/queue_delay_ms:66|1,loss_percent:1|0,link_capacity_kbps:200|10000,queue_length_packets:10|100,duration:15s|45s/
This creates two configs:
1. For 15s, apply 66ms delay, 1% loss, 200kbps bandwidth, 10 packet queue size
2. For 45s, apply 1ms delay, 0% loss, 10Mbps bandwidth, 100 packets queue size
(then repeat)

Bug: webrtc:13655
Change-Id: I0524f572de480731df4d414724203772182c628b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251043
Reviewed-by: Stefan Holmer <holmer@google.com>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35952}
2022-02-08 14:41:24 +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
Tommi
55107c8507 Update the sync_group id without recreating audio receive streams.
Bug: webrtc:11993
Change-Id: I7aaff6d6f89332e60967fba741252b630fd941cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222043
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34308}
2021-06-16 19:34:18 +00:00
Tommi
08be9baaa3 Don't recreate the audio receive stream when updating the local_ssrc.
Bug: webrtc:11993
Change-Id: Ic5d8a8a8b7c12fb1d906e0b3cbdf657fd9e8eafc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222042
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34299}
2021-06-16 10:03:31 +00:00
Tomas Gunnarsson
e984aa2e58 Add thread accessors to Call.
Classes associated with the Call instance, need access to these threads
and/or awareness, for checking for thread correctness.

Bug: webrtc:11993
Change-Id: I93bcee0657875f211be2ec959b96f818fa9fd8a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215584
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33772}
2021-04-19 15:59:20 +00:00
Erik Språng
ceb44959ca Reland: Wires up WebrtcKeyValueBasedConfig in media engines.
This is a reland of
https://webrtc-review.googlesource.com/c/src/+/174261

Patchset 1 contains the old cl (plus a merge conflict fix).
Later patchets are bufixes: A PeerConnection can be created without a
Call instance (in the case of DataChannel only), so we can't always
use that to fetch the current trials.

Old CL descritpion:

This replaces field_trial:: -based functions from system_wrappers.
Field trials are still used as fallback, but injectable trials are now
possible.

// Since re-land is otherwise unchanged, setting previous reviewers as TBR
TBR=kthelgason@webrtc.org,mbonadei@webrtc.org,stefan@webrtc.org,srte@webrtc.org

Bug: webrtc:11926
Change-Id: I57a9e8c3454f226f77fb93215bcac83da65034b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185003
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32163}
2020-09-22 16:08:22 +00:00
Artem Titov
5956a17ed6 Revert "Wires up WebrtcKeyValueBasedConfig in media engines."
This reverts commit 591b2ab82e.

Reason for revert: Breaks downstream project

Original change's description:
> Wires up WebrtcKeyValueBasedConfig in media engines.
> 
> This replaces field_trial:: -based functions from system_wrappers.
> Field trials are still used as fallback, but injectable trials are now
> possible.
> 
> Bug: webrtc:11926
> Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32129}

TBR=mbonadei@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,perkj@webrtc.org

Change-Id: I3e169149a8b787aa6366bb357abb71794534c63a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184507
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32132}
2020-09-17 20:17:38 +00:00
Erik Språng
591b2ab82e Wires up WebrtcKeyValueBasedConfig in media engines.
This replaces field_trial:: -based functions from system_wrappers.
Field trials are still used as fallback, but injectable trials are now
possible.

Bug: webrtc:11926
Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32129}
2020-09-17 16:24:10 +00:00
Henrik Boström
f4a9991cce [Adaptation] Adding adaptation resources from Call.
This CL adds AddAdaptationResource to Call and
AddAdaptationResource/GetAdaptationResources method to relevant
VideoSendStream and VideoStreamEncoder interfaces and implementations.

Unittests are added to ensure that resources can be added to the Call
both before and after the creation of a VideoSendStream and that the
resources always gets added to the streams.

In a follow-up CL, we will continue to plumb the resources all the way
to PeerConnectionInterface, and an integration test will then be added
to ensure that injected resources are capable of triggering adaptation.

Bug: webrtc:11525
Change-Id: I499e9c23c3e359df943414d420b2e0ce2e9b2d56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177002
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31499}
2020-06-11 12:43:21 +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
Tommi
78a7138600 Remove MediaTransport from Call.
There aren't any tests for this and the code isn't currently
active except for the fact that it adds complexity to the Call
class, synchronization into the active code path and makes future
improvements to the class more complex or impossible.

Bug: webrtc:9719
Change-Id: Ia41af0b2186b8a36ca70a07858990b6af7f3a5c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148078
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28807}
2019-08-08 10:58:57 +00:00
Erik Språng
c64881925f DegradedCall: fake network using TaskQueue instead of ProcessThread
Tested: Manually in Chrome webrtc calls.
Bug: webrtc:10851
Change-Id: I6bc6b7625101b39e4dd8b0efa5db213ab57980a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148077
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28776}
2019-08-06 15:05:30 +00:00
Jonas Olsson
0182a0300f Reland "Remove the injectable bitrate allocation strategy API."
This is a reland of 80cb3f6db6

Original change's description:
> Remove the injectable bitrate allocation strategy API.
>
> This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
> plus a ton of now-dead code.
>
> Bug: webrtc:10556
> Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28523}

TBR=kwiberg@webrtc.org

Bug: webrtc:10556
Change-Id: Ic17a7a7cc447292306876ee9582ad62fd2499765
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145900
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28585}
2019-07-17 10:20:45 +00:00
Mirko Bonadei
e95b57cdfc Revert "Remove the injectable bitrate allocation strategy API."
This reverts commit 80cb3f6db6.

Reason for revert: Performance regression on downstream project.

Original change's description:
> Remove the injectable bitrate allocation strategy API.
> 
> This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
> plus a ton of now-dead code.
> 
> Bug: webrtc:10556
> Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28523}

TBR=henrika@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,srte@webrtc.org,alexnarest@webrtc.org,jonasolsson@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10556
Change-Id: Ife905d661e7b1a227662395c729a9336c62fd2d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145338
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28560}
2019-07-12 15:27:19 +00:00
Jonas Olsson
80cb3f6db6 Remove the injectable bitrate allocation strategy API.
This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
plus a ton of now-dead code.

Bug: webrtc:10556
Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28523}
2019-07-10 13:13:25 +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
Piotr (Peter) Slatala
7fbfaa49d2 PeerConnection::SetBitrate now also configures media transport.
(so far SetBitrate did not do anything for media transport)

Bug: webrtc:9719
Change-Id: I48e669341ffe6c9e4697ff9146c314be7796a209
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127980
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27169}
2019-03-18 19:38:21 +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
Piotr (Peter) Slatala
cc8e8bb73f Pass the media transport from JsepTransportController to Call.
Add TargetRateObservers for media transport in the call object.



Bug: webrtc:9719
Change-Id: I5448d05359cf09b8cd2a678b2ac876aa8f8970e7
Reviewed-on: https://webrtc-review.googlesource.com/c/110622
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25662}
2018-11-15 17:36:48 +00:00
Artem Titov
75e3647a76 Switch usages of DefaultNetworkSimulationConfig to BuiltInNetworkBehaviorConfig
Bug: webrtc:9630
Change-Id: Ia0e0b5b4e1e3a8e687d1e7fe3bb600dbdda09efa
Reviewed-on: https://webrtc-review.googlesource.com/c/104561
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25045}
2018-10-08 12:19:31 +00:00
Stefan Holmer
64be7fa7d8 Move FecController to RtpVideoSender.
This also moves the packet feedback tracking to RtpVideoSender.

Bug: webrtc:9517
Change-Id: Ifb1ff85051730108a0b0d1dd30f6f8595ad2af6e
Reviewed-on: https://webrtc-review.googlesource.com/c/95920
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25019}
2018-10-05 14:39:01 +00:00
Artem Titov
3229d65fd0 Switch webrtc users from deprecated ctors.
Stop using of deprecated ctors of FakeNetworkPipe in most part of
webrtc codebase, except DirectTransport, where further refactoring will
be continued in future CLs.

Bug: webrtc:9630
Change-Id: I823404469e461601ddbc026eaeac668eeda8045f
Reviewed-on: https://webrtc-review.googlesource.com/94763
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24327}
2018-08-17 13:54:51 +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
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
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