Commit graph

53 commits

Author SHA1 Message Date
Sam Zackrisson
da6291e85d WebRTC voice engine: Remove duplicate and confusing logs
The line "No audio processing module present [...]" has mislead people several times (see linked bug for one example) and does not add any information that cannot already relatively easily be inferred from platform configuration.

Other removed lines are duplicate (already logged via AudioOptions::ToString()) or never runs (ApplyOptions always returns true + empty #elif).

Bug: b/238780321#comment34
Change-Id: Ie0fbd6675ec963c1180a7f614ec74bba5e850777
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270483
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37697}
2022-08-05 10:10:47 +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
1def899931 Remove legacy (unused) config param: jitter_buffer_enable_rtx_handling
Bug: none
Change-Id: I14164546950cc63c37e54544cdc80bfd4eddf211
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262962
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36955}
2022-05-21 23:06:21 +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
Philipp Hancke
ff05c5c805 audio/red: cleanup killswitch
this has been enable by default since M96

BUG=webrtc:11640

Change-Id: I5d310d3929882007211eae12bc3ac1366107ca87
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36123}
2022-03-03 15:43:48 +00:00
Alessio Bazzica
93348d89bc Remove unused audio options and corresponding media constraints
- experimental AGC (aka googAutoGainControl2) removed in [1]
- experimental NS (aka googNoiseSuppression2) removed in [2]
- typing noise detection (aka googTypingNoiseDetection)
  removed in [3]
- cricket::AudioOptions::tx_agc_ are unused

[1] https://webrtc-review.googlesource.com/c/src/+/219463
[2] https://webrtc-review.googlesource.com/c/src/+/232128
[3] https://chromium-review.googlesource.com/c/chromium/src/+/1617352

Bug: webrtc:11226
Change-Id: Id1ecef3d3e193c210fc11832e16db4f84d866d14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35987}
2022-02-14 10:50:20 +00:00
Tomas Gunnarsson
94f0194d5a Remove transport_name_ from Channel.
Because of this (seemingly simple) change, I had to change the return
type of transport_name from `const std::string&` to `absl::string_view`
to handle the case when there's no transport assigned.
That in turn caused an avalanche of required updates.

Bug: webrtc:12230, webrtc:11993
Change-Id: I16ec6c6a5fc2f5f7c7de572355a3c6ca924bb9d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244084
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35617}
2022-01-03 20:51:42 +00:00
Ivo Creusen
2562cf0105 Reland "Wire up non-sender RTT for audio, and implement related standardized stats."
This reverts commit 2c41cbae37.

Reason for revert: The breaking test in Chromium has been temporarily disabled in https://chromium-review.googlesource.com/c/chromium/src/+/3139794/2.

Original change's description:
> Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
>
> This reverts commit fb0dca6c05.
>
> Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.
>
> Original change's description:
> > Wire up non-sender RTT for audio, and implement related standardized stats.
> >
> > The implemented stats are:
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
> >
> > Bug: webrtc:12951, webrtc:12714
> > Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#34861}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=hta,hbos,minyue
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Olga Sharonova <olka@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34897}

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

Bug: webrtc:12951, webrtc:12714
Change-Id: I786b06933d85bdffc5e879bf52436bb3469b7f3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231181
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34930}
2021-09-06 14:26:55 +00:00
Björn Terelius
2c41cbae37 Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
This reverts commit fb0dca6c05.

Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.

Original change's description:
> Wire up non-sender RTT for audio, and implement related standardized stats.
>
> The implemented stats are:
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34861}

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

TBR=hta,hbos,minyue

Bug: webrtc:12951, webrtc:12714
Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34897}
2021-09-01 17:32:00 +00:00
Ivo Creusen
fb0dca6c05 Wire up non-sender RTT for audio, and implement related standardized stats.
The implemented stats are:
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements

Bug: webrtc:12951, webrtc:12714
Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34861}
2021-08-30 09:03:50 +00:00
Philipp Hancke
773a222667 red: enable opus-red by default
turning the current field trial into a killswitch.

Note that RED is not used by default since it is listed after opus in the SDP.
To enable RED for opus the setCodecPreferences can be used to change
the order of codecs.

BUG=webrtc:11640

Change-Id: I248f4340ca0a3f7c4ea6d6a41b566bc92ab6f19d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228426
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34781}
2021-08-17 10:03:08 +00:00
Harald Alvestrand
819286ee0f Clean out some leftover junk.
Bug: None
Change-Id: I2a2703deb522b992cba2014051d113e597f593fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218280
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33970}
2021-05-10 22:57:52 +00:00
Tommi
cf2aeffdc2 Remove lock from MediaChannel
Pending messages on network thread for MediaChannel, will be dropped
when the MediaChannel object is deleted (without blocking).

Remove MessageHandler inheritance from Channel since Post-ing to the
network thread has been removed from there.

Copy/pasted code for SendRtp/SendRtcp in WebRtcVideoChannel and
WebRtcVoiceMediaChannel consolidated in MediaChannel.

Bug: webrtc:11993
Change-Id: I05320eb7f86b98adba50ca5eb8b76b78f4111263
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217720
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33955}
2021-05-07 18:01:54 +00:00
Tommi
a63bee55f2 Remove Mutex from BaseChannel.
There's a bit of copy/pasted code in the channel code, which is
making moving network traffic consistently over to the network thread
a bit trickier than it needs to be, so I'm also updating variable
names used in Set[Local|Remote]Content_w to be more explicitly the same
and make it clear that the code is copy/pasted (and future updates can
consolidate more of it).

Also removing some code from the video/voice media channels that's
effectively dead code (vector + registration methods that aren't needed)

Bug: webrtc:12705
Change-Id: I2e14e69fbc489a64fc1e8899aaf1cfc979fe840b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215978
Reviewed-by: Sam Zackrisson <saza@google.com>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33847}
2021-04-27 12:46:10 +00:00
Tomas Gunnarsson
eb9c3f237b Handle OnPacketSent on the network thread via MediaChannel.
* Adds a OnPacketSent callback to MediaChannel, which matches with
  MediaChannel::NetworkInterface::SendPacket.
* Moves the OnPacketSent handling to the media channel implementations
  (video/voice) and removes the PeerConnection/SdpOfferAnswerHandler
  layer from the call path.
* Call::OnSentPacket is called directly from the channels on the network
  thread. This eliminates a PostTask to the worker thread for every
  audio/video network packet.
* Remove sigslot dependency from MediaChannel (and derived).

Bug: webrtc:11993
Change-Id: I1f79a7aa60f05d47e1882f9be1c9323ea8fac5f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215403
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33777}
2021-04-19 16:59:48 +00:00
Henrik Boström
15e078c574 Fix unsignalled ssrc race in WebRtcVideoChannel.
BaseChannel adds and removes receive streams on the worker thread
(UpdateRemoteStreams_w) and then posts a task to the network thread to
update the demuxer criteria. Until this happens, OnRtpPacket() keeps
forwarding "recently removed" ssrc packets to the WebRtcVideoChannel.
Furthermore WebRtcVideoChannel::OnPacketReceived() posts task from the
network thread to the worker thread, so even if the demuxer criteria was
instantly updated we would still have an issue of in-flight packets for
old ssrcs arriving late on the worker thread inside WebRtcVideoChannel.

The wrong ssrc could also arrive when the demuxer goes from forwarding
all packets to a single m= section to forwarding to different m=
sections. In this case we get packets with an ssrc for a recently
created m= section and the ssrc was never intended for our channel.

This is a problem because when WebRtcVideoChannel sees an unknown ssrc
it treats it as an unsignalled stream, creating and destroying default
streams which can be very expensive and introduce large delays when lots
of packets are queued up.

This CL addresses the issue with callbacks for when a demuxer criteria
update is pending and when it has completed. During this window of time,
WebRtcVideoChannel will drop packets for unknown ssrcs.

This approach fixes the race without introducing any new locks and
packets belonging to ssrcs that were not removed continue to be
forwarded even if a demuxer criteria update is pending. This should make
a=inactive for 50p receive streams a glitch-free experience.

Bug: webrtc:12258, chromium:1069603
Change-Id: I30d85f53d84e7eddf7d21380fb608631863aad21
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214964
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33757}
2021-04-16 09:33:42 +00:00
Artem Titov
d15a575ec3 Use SequenceChecker from public API
Bug: webrtc:12419
Change-Id: I00cca16a0ec70246156ba00b97aa7ae5ccbf5364
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205323
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33220}
2021-02-10 15:04:55 +00:00
Artem Titov
c8421c4c3e Replace rtc::ThreadChecker with webrtc::SequenceChecker
Bug: webrtc:12419
Change-Id: I825c014cc1c4b1dcba5ef300409d44859e971144
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205002
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33136}
2021-02-02 14:56:27 +00:00
Tomas Gunnarsson
33c0ab4948 Call MediaChannel::OnPacketReceived on the network thread.
Functionality wise, there should be no change with this CL, aside
from updating tests to anticipate OnPacketReceived to handle the packet
asynchronously (as already was the case via BaseChannel).

This only removes the network->worker hop out of the BaseChannel
class into the WebRTC MediaChannel implementations. However, it updates
the interface contract between BaseChannel and MediaChannel to align
with how we want things to work down the line, i.e. avoid hopping to
the worker thread for every rtp packet.

The following steps will be to update the video and voice channel
classes to call Call::DeliverPacket on the network thread and only
handle unsignalled SSRCs on the worker (exception case).

Bug: webrtc:11993
Change-Id: If0540874444565dc93773aee89d862f3bfc9c502
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202242
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33040}
2021-01-19 20:55:14 +00:00
Tomas Gunnarsson
8467cf27ac Reduce redundant flags for audio stream playout state.
Bug: none
Change-Id: Idbcb19cf415dd1fadfe54d01294bb62b8ba9012f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202244
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33015}
2021-01-18 09:09:09 +00:00
Olga Sharonova
09ceed2165 Async audio processing API
API to injecting a heavy audio processing operation into WebRTC audio capture pipeline

Bug: webrtc:12003
Change-Id: I9f6f58f468bd84efd0a9d53d703db6229a03959e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165788
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Olga Sharonova <olka@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32291}
2020-10-02 12:33:34 +00:00
Niels Möller
de95329daa Delete macros RTC_DISALLOW_ASSIGN and RTC_DISALLOW_IMPLICIT_CONSTRUCTORS
The former was unused, the latter is replaced with the explicit C++11
deletions. The related RTC_DISALLOW_COPY_AND_ASSIGN is left for now,
it is used in a lot more places.

Bug: None
Change-Id: I49503e7f2b9ff43c6285f8695833479bbc18c380
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185500
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32224}
2020-09-29 10:19: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
Niels Möller
6b4d962947 Fix standard GetStats to not modify NetEq state.
Add a get_and_clear_legacy_stats flag to AudioReceiveStream::GetStats,
to distinguish calls from standard GetStats and legacy GetStats.

Add const method NetEq::CurrentNetworkStatistics to get current
values of stateless NetEq stats. Standard GetStats will then call this
method instead of NetEq::NetworkStatistics.

Bug: webrtc:11622
Change-Id: I3833a246a9e39b18c99657a738da22c6e2bd5f5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183600
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32092}
2020-09-14 09:51:21 +00:00
Mirko Bonadei
c94650d88f Remove AudioProcessing::SetExtraOptions.
Bug: webrtc:5298
Change-Id: I28be75df69b66aa59ae91b05cb7f9afad4f55aa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182120
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32033}
2020-09-03 12:43:14 +00:00
Marina Ciocea
3e9af7fe05 Insert audio frame transformer between depacketizer and decoder.
The frame transformer is passed from RTPReceiverInterface through the
library to be eventually set in ChannelReceive, where the frame
transformation will occur in the follow-up CL.

Insertable Streams Web API explainer:
https://github.com/alvestrand/webrtc-media-streams/blob/master/explainer.md

Design doc for WebRTC library changes:
http://doc/1eiLkjNUkRy2FssCPLUp6eH08BZuXXoHfbbBP1ZN7EVk

Bug: webrtc:11380
Change-Id: I5af06d1431047ef50d00e304cf95e92a832b4220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171872
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30956}
2020-04-01 08:15:53 +00:00
Marina Ciocea
d2aa8f97f1 Insert audio frame transformer between encoder and packetizer.
The frame transformer is passed from RTPSenderInterface through the
library to be eventually set in ChannelSend, where the frame
transformation will occur in the follow-up CL.

Insertable Streams Web API explainer:
https://github.com/alvestrand/webrtc-media-streams/blob/master/explainer.md

Design doc for WebRTC library changes:
http://doc/1eiLkjNUkRy2FssCPLUp6eH08BZuXXoHfbbBP1ZN7EVk

Bug: webrtc:11380
Change-Id: I01b2adc3c96b948d182d5401a9a4fe14cf5960a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171870
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30946}
2020-03-31 11:14:00 +00:00
Markus Handell
0357b3e7b6 RtpTransceiverInterface: add header_extensions_to_offer()
This change adds exposure of a new transceiver method for getting
the total set of supported extensions stored as an attribute,
and their direction. If the direction is kStopped, the extension
is not signalled in Unified Plan SDP negotiation.

Note: SDP negotiation is not modified by this change.

Changes:
- RtpHeaderExtensionCapability gets a new RtpTransceiverDirection,
  indicating either kStopped (extension available but not signalled),
  or other (extension signalled).
- RtpTransceiver gets the new method as described above. The
  default value of the attribute comes from the voice and video
  engines as before.

https://chromestatus.com/feature/5680189201711104.
go/rtp-header-extension-ip
Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/65YdUi02yZk

Bug: chromium:1051821
Change-Id: I440443b474db5b1cfe8c6b25b6c10a3ff9c21a8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170235
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30800}
2020-03-16 13:16:42 +00:00
Saurav Das
749f6604a1 Enable SSRC 0 in MediaChannel methods
Refactor voice engine and video engine to use default methods instead of
treating 0 as a special value.

Bug: webrtc:8694
Change-Id: I47c211c6e870cdec737d6b0d05df29a9b534a011
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158600
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Saurav Das <dinosaurav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#30010}
2019-12-04 23:49:04 +00:00
Saurav Das
934afc6ba1 Deprecate RtpReceiver's SetParameters method
This removes the SetParameters method from AudioRtpReceiver and Video
RtpReceiver, which is currently not used and is not part of the
specifications.


Bug: webrtc:11111
Change-Id: I6f67773bfef2d4b51e9ab670bde17b5fbf5f94c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159307
Reviewed-by: Patrik Höglund <phoglund@google.com>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Saurav Das <dinosaurav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29995}
2019-12-03 19:50:42 +00:00
Sam Zackrisson
03fbace409 Remove apm_helpers, consolidate audio config in WebRtcVoiceEngine
Refactorings to the audio processing module has, piece by piece,
decreased the workload of the apm_helpers helpers. It has come to a
point where it seems more reliable to consolidate what little is left
into the WebRtcVoiceEngine itself.

Bug: webrtc:9878
Change-Id: I6d983ace8e7ccb1b99d95178cf72608a657c7506
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157443
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29553}
2019-10-21 09:40:39 +00:00
Saurav Das
ff27da5ca1 Add/remove receive streams with SSRC 0 from media channels
This enables creation and removal of receive streams with SSRC 0.
Several related methods, for example SetOutputVolume, still use 0 as a
special value.

Bug: webrtc:8694
Change-Id: I341e6bd6c981c9838997510d8d712ad2948f6460
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152780
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Saurav Das <dinosaurav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29398}
2019-10-07 23:01:28 +00:00
Sebastian Jansson
1b83a9e400 Only handle each RTCP once.
Previously, each RTCP packet was handled several times in a row, once
per m-section. This caused various weirdness and log warning spam, in
particular when using unified plan.

The cause was that the packets were wired trough each BaseChannel
instance up to the Call class. With this fix, the RTCP packets are wired
once per RtpTransportInternal via the common peer connection class.

Bug: chromium:1002875
Change-Id: I41c4eb3b68e215ebe0f2c6fb93ae0ee73335b89a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152668
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29226}
2019-09-18 16:54:39 +00:00
Niels Möller
a837030f8f Split out RtpSource from libjingle_peerconnection_api
And moved declaration into a new api directory, as
api/transport/rtp/rtp_source.h.

Bug: webrtc:8733
Change-Id: Ia73b7b0630e6065de4707a37633adddfa00a2b8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150880
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29039}
2019-09-02 14:04:47 +00:00
Per Åhgren
f40a340756 Remove deprecated code related to AEC2
This CL removes code related to the usage of the delay agnostic and
extended filter modes in AEC2.

Bug: webrtc:8671
Change-Id: I1a2c7a9eba54b03f5a015df3adb617785f52a939
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133912
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28789}
2019-08-07 10:09:36 +00:00
Sebastian Jansson
d2845f8246 Removes unused AudioAllocationSettings from voice engine.
Bug: webrtc:9883
Change-Id: Ie322a1cae1f9682f64a05767f3933cba13b70ae0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148281
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28787}
2019-08-07 09:36:42 +00:00
Niels Möller
e8e4dc4c8b Change StartAecDump methods to work with FILE* and FileWrapper
Bug: webrtc:6463
Change-Id: Id275975decb9b2876021ced19ee9f279b07bea53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140283
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28233}
2019-06-11 13:43:36 +00:00
Steve Anton
220f4bec16 Remove some media/ --> pc/ test dependencies
pc/ depends on media/, so the media/ tests should not have circular
dependencies on pc/.

Bug: None
Change-Id: I849cefecd91e9cd11415bbd93465a98dead735d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139361
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28115}
2019-05-30 18:52:28 +00:00
Niels Möller
8a9778efa4 Delete unused StartAecDump method with filename argument
Bug: None
Change-Id: Ia52e9730aa22ef89e350ffcf5a6608a0d273c027
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134461
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27799}
2019-04-29 10:16:26 +00:00
Danil Chapovalov
4c7112a27a Reland "in WebrtcVoiceEngine allow to set TaskQueueFactory"
in production code keep using GlobalTaskQueueFactory()
in tests switch to use DefaultTaskQueueFactory directly.

This reverts commit e27ccf9a16.

Reason for revert: addressed the failure with patchset#2

Original change's description:
> Revert "in WebrtcVoiceEngine allow to set TaskQueueFactory"
>
> This reverts commit a39254da59.
>
> Reason for revert: Tests are failing due to ThreadChecker's called on valid thread.
>
> Original change's description:
> > in WebrtcVoiceEngine allow to set TaskQueueFactory
> >
> > in production code keep using GlobalTaskQueueFactory()
> > in tests switch to use DefaultTaskQueueFactory directly.
> >
> > Bug: webrtc:10284
> > Change-Id: I170274a98324796623089a965a39f0cbb7e281d9
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128878
> > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27296}
>
> TBR=danilchap@webrtc.org,steveanton@webrtc.org
>
> Change-Id: I9742e5d0171a94f3840e197c40fdb44523e4963b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10284
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129780
> Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
> Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27297}

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

Bug: webrtc:10284
Change-Id: I55fd5811c68d04c3e8cf537974496460b38c1d4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129933
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27348}
2019-03-28 17:21:22 +00:00
Sam Zackrisson
f0d1c03c31 Add replacement interface for webrtc::GainConrol
The pointer-to-submodule interfaces are being removed.
This CL:
1) introduces AudioProcessing::Config::GainController1 with most config,
2) adds functions to APM for setting and getting analog gain,
3) creates a temporary GainControlConfigProxy to support the transition
   to the new config.
4) Moves the lock references in GainControlForExperimentalAgc and
   GainControlImpl into the GainControlConfigProxy, as it becomes the
   sole AGC object with functionality exposed to the client.

Bug: webrtc:9947, webrtc:9878
Change-Id: Ic31e15e9bb26d6497a92b77874e0b6cab21ff2b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126485
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27316}
2019-03-27 15:19:41 +00:00
Amit Hilbuch
e27ccf9a16 Revert "in WebrtcVoiceEngine allow to set TaskQueueFactory"
This reverts commit a39254da59.

Reason for revert: Tests are failing due to ThreadChecker's called on valid thread.

Original change's description:
> in WebrtcVoiceEngine allow to set TaskQueueFactory
> 
> in production code keep using GlobalTaskQueueFactory()
> in tests switch to use DefaultTaskQueueFactory directly.
> 
> Bug: webrtc:10284
> Change-Id: I170274a98324796623089a965a39f0cbb7e281d9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128878
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27296}

TBR=danilchap@webrtc.org,steveanton@webrtc.org

Change-Id: I9742e5d0171a94f3840e197c40fdb44523e4963b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10284
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129780
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27297}
2019-03-26 17:37:03 +00:00
Danil Chapovalov
a39254da59 in WebrtcVoiceEngine allow to set TaskQueueFactory
in production code keep using GlobalTaskQueueFactory()
in tests switch to use DefaultTaskQueueFactory directly.

Bug: webrtc:10284
Change-Id: I170274a98324796623089a965a39f0cbb7e281d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128878
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27296}
2019-03-26 17:18:21 +00:00
Jakob Ivarsson
647d5e6d91 Increase the default maximum jitter buffer size to 200 packets.
Bug: webrtc:10415
Change-Id: Iec5a5a263c11d92a23290c1c2de053fe9e5d5839
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128082
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27142}
2019-03-15 10:25:11 +00:00
Amit Hilbuch
e7a5f7bfae Modifying MediaChannel to accept CopyOnWriteBuffer by value.
MediaChannel accepted the RtpPacket buffers through non-const pointer.
This is both unclear and introduces questions regarding if the buffer is
actually copied or not.
This change modifies the method to accept by value to reduce ambiguity.
Usage of the non-const data() method which could potentially copy the
buffer contents is also reduced in favor of cdata() which never copies.

Bug: None
Change-Id: I3b2daef0d31cb6aacceb46c86da3a40ce836242b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127340
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27090}
2019-03-12 23:49:57 +00:00
Steve Anton
e25f595c0a Guard preferred_dscp with the network interface lock
Bug: webrtc:10389
Change-Id: I96112c2135c9c2d545140feeef6345f8a9b81086
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126540
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27043}
2019-03-08 23:59:41 +00:00
Ruslan Burakov
7ea460593c Add latency to remote source api.
Latency corresponds to base minimum delay on NetEq.

Bug: webrtc:10287
Change-Id: I538d202e3e4fe07b779c46bf560e2fde38e0468e
Reviewed-on: https://webrtc-review.googlesource.com/c/121704
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26724}
2019-02-16 02:13:44 +00:00
Mirko Bonadei
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00