Commit Graph

1474 Commits

Author SHA1 Message Date
13d163654a Delete support for has_internal_source
Bug: webrtc:12875
Change-Id: I9683e71e1fe5b24802033ffcb32a531ca685fc6f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179220
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35353}
2021-11-16 11:29:40 +00:00
efe46b6bee Change the type of RTCVideoSourceStats.framesPerSecond
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcvideosourcestats-framespersecond

Bug: webrtc:12905
Change-Id: If53e2e480e2d6f687c3f8bb95a9e1d1e386fe9c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237420
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35352}
2021-11-16 11:21:41 +00:00
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
bf0874568c Implement RTCOutboundRtpStreamStats.targetBitrate for audio.
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-targetbitrate

Bug: webrtc:13377
Change-Id: I98dd263e0b9d6e2ca94969d2a91857b14cd65f70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237402
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35337}
2021-11-12 09:24:34 +00:00
ee03431107 WebRtcVideoEngineTest: use simulated time.
Bug: chromium:1255737
Change-Id: I6036ae5af4b3f0e7bd04352b055935f501ecc52b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237341
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35316}
2021-11-05 14:06:12 +00:00
97597c0f51 Remove usage of INFO alias for LS_INFO in log messages
Bug: webrtc:13362
Change-Id: Ifda893861a036a85c045cd366f9eab33c62ebde0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237221
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35310}
2021-11-04 13:46:17 +00:00
bd9106d88f voice_engine: dont announce rid/rrid header extensions
which do not make sense for audio due to lack of support for RTX.

BUG=webrtc:13279

Change-Id: Ida42d8912bf993f01e0dc5c6ffbdbf4b84495c30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235061
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35309}
2021-11-04 12:47:48 +00:00
83d667925f Removed unused WebRTC-SupportVP9SVC field trial.
Instead use `parameters_.config.rtp.ssrcs.size()` directly to make decisions about the number of temporal and spatial layer used.

Bug: none
Change-Id: Icba553178ae7fea281c2c67654c510228d9ab5b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237080
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35299}
2021-11-02 16:05:52 +00:00
cd59704f8d AudioProcessing: Make minimum and maximum analog levels non-configurable
Remove analog_level_minimum and analog_level_maximum from
AudioProcessing GainController1 and replace their use with fixed
values 0 and 255, respectively.

Bug: webrtc:12774
Change-Id: Ia4bfe5ed43a65f1587ed67f36bfbb2966b6fdf26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235822
Commit-Queue: Hanna Silen <silen@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35297}
2021-11-02 12:49:50 +00:00
7194d832b2 Make AV1X constants private
The constants are being made private since no new code should use them.
However, the helper functions sill uses "AV1X" internally for backwards
compatibility.

Bug: webrtc:13166
Change-Id: I0a0cd46f31ca70bb7f395c9b1e9cdb202df11f6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236680
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35289}
2021-11-01 09:48:50 +00:00
e5e78c4521 Fix -Wunused-but-set-variable.
Bug: None
Change-Id: I8943227108e46c4c942895e4bd8fb276947502e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236525
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35272}
2021-10-28 12:53:49 +00:00
519c15de2b Remove the groupid field
This field is unused within WebRTC, and doesn't seem to
be essential for any existing customers.
If this works well, it will be deprecated and removed.

Bug: none
Change-Id: I96d7485e4d094abfa6a8c3d1e6855834c13dedd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189680
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35263}
2021-10-26 10:36:44 +00:00
b62ee8ce94 Detect and reject illegal RTP header extension modifications.
This is somewhat klugey, because it does the same checks at two
different layers in the stack, in different functions, which runs
the risk of making them out of sync. But it solves the immediate
problem.

Bug: chromium:1249753
Change-Id: I2ad96f0cc9499c15540ff6946a409b40df3e3925
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235826
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35259}
2021-10-22 11:52:02 +00:00
b7919c7fc2 usrsctp: Log EWOULDBLOCK at verbose instead of info level in transport
Benchmarks will spam a lot of annoying lines because of this.

Bug: webrtc:13288
Change-Id: I1321abafb91baefcaa626a561bee58ca3f321291
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235371
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35225}
2021-10-18 11:40:36 +00:00
c5d3c24439 video_engine: allow allocating h264/yuv444 in lower payload type range
BUG=webrtc:12194,chromium:1251096

Change-Id: I71a8e85f0582fc724b9ebb9284936626c6aa08dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235211
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@nvidia.com>
Cr-Commit-Position: refs/heads/main@{#35222}
2021-10-16 11:04:51 +00:00
8ae1adc79a sctp: dcsctp: Don't log full send buffer as error
When sending a large amount of data, the sender will want to keep the
send buffer full so that the socket can quickly drain it as its able to
put more bytes on the wire.

When trying to send a message and when the send buffer is full, an error
will be returned and the OnError callback will be triggered. In these
situations, this is an expected and handled error and should not be
logged as an error, as it causes confusion.

Bug: chromium:1258225
Change-Id: I3e1feab03f60ba5c41cc524d8d8f066445030d18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235201
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35204}
2021-10-14 12:13:07 +00:00
6fa9e68da9 Route min/max FPS constraints to VideoStreamEncoder.
This change
- adds new type VideoTrackSourceConstraints expressing min/max FPS
  constraints.
- adds new method VideoTrackSourceInterface::ProcessConstraints.
- adds new method VideoSinkInterface<>::OnConstraintsChanged.
- updates AdaptedVideoTrackSource and VideoBroadcaster to forward
  the constraints to sinks.
- adds several unit tests for the added functionality.
- and finally, implements OnConstraintsChanged in VideoStreamEncoder.

Chromium will be updated in coming CLs to supply constraints set
through the MediaStream module.

go/rtc-0hz-present

Bug: chromium:1255737
No-Try: true
Change-Id: Iffef239217269c332a1aaa902ddeae2440929e22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235040
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35197}
2021-10-14 06:49:05 +00:00
70fa689fb6 Fix Wbitwise-instead-of-logical warnings
`a && b` only evaluates b if a is true. `a & b` always evaluates
both a and b. If a and b are of type bool, `&&` is usually what you
want, so clang now warns on `&` when both arguments are of type bool.
In the one case where this fires in webrtc, it isn't important if we
evaluate both branches, so I went with `&&`.

Bug: chromium:1255745
Change-Id: I7fd215778fca62e0d5ca64ab0cf1142942eb7304
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234600
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#35181}
2021-10-11 17:10:49 +00:00
83121d4dfe Propagate scalability mode in CreateSimulcastOrConferenceModeScreenshareStreams.
Bug: webrtc:11607
Change-Id: I0b14ea38026bccdb8f4bf1217fe2f9fa41f1c90e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234344
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35178}
2021-10-11 14:26:19 +00:00
eb42ab77cf Dont use simulcast for AV1.
Bug: none
Change-Id: I9d3bfb3bff497db740e317fcad0e8f91bfa88d1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234744
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35177}
2021-10-11 13:27:29 +00:00
9b2a7461f0 Use fallback encoder if primary can't be created
In case if primary encoder can't be instantiated (max number of
instances has reached, for example), use fallback encoder.

Bug: none
Change-Id: I477bdeb7af4dcce50e36b1804ffc6ad2ab004dfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234500
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35161}
2021-10-07 11:42:26 +00:00
54c90f2330 [-Wshadow] - Fix some warnings.
First CL to try to understand the extent of the cleanup needed in
order to remove -Wno-shadow and follow Chromium on enabling this
diagnostic.

Bug: webrtc:13219
Change-Id: Ie699762da50fe3dbc08b1fd92220962d4b7da86b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233641
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35134}
2021-10-03 11:53:16 +00:00
ae566cd831 audio/red: provide default fmtp line
otherwise the generated codec won't match the preassigned codec
and red will use 96 as payload type, increasing the payload type
congestion in the upper range.

BUG=webrtc:11640

Change-Id: I466ed6d4e025ef116f3099e85855e10493408ab1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233560
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35130}
2021-10-01 13:02:30 +00:00
7145a1421b red: fix fmtp payload type collision handling
along the lines of RTX handling but with limited support for missing
fmtp lines because of video/red.

BUG=webrtc:13178

Change-Id: Ia866c0e857da6da2ef1e4b81b51f90f534c7bb83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231948
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35107}
2021-09-28 10:29:54 +00:00
f72c06419f sctp: dcsctp: Manage lifecycle explicitly
Prior to this commit, the SCTP association could terminate due to too
many retransmission attempts when there is a long duration of packet
loss. The RTCPeerConnection wouldn't terminate, and when the network
later recovers (possibly using a different ICE candidate), it would be a
RTCPeerConnection with media, but without DataChannels.

This commit will make the dcSCTP library never abort by itself when
there are too many retransmissions. It will also put a cap on the retry
duration so that it will do a retry every three seconds (or lower).

Bug: webrtc:13129
Change-Id: I08162ea20d6a60aa0eae2717966d9a2ddba8fc22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232540
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35061}
2021-09-22 07:17:29 +00:00
1b200b93d5 APM: remove webrtc::Config
Remove the deprecated way of configuring APM.

Bug: webrtc:5298
Change-Id: Idcedf1fe4a121adfcf2881003579cd58ac42a2b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232302
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35026}
2021-09-17 11:21:32 +00:00
be1b8989d1 ExperimentalNs removed + APM not depending anymore on webrtc::Config
Thanks to the elimination of `ExperimentalNs`, there is no need anymore
to pass `webrtc::Config` to build APM.
Hence, `AudioProcessingBuilder::Create(const webrtc::Config&)` is also
removed.

Bug: webrtc:5298
Change-Id: I0a3482376a7753434486fe564681f7b9f83939c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232128
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35025}
2021-09-17 10:53:43 +00:00
b26863ed0c Reland "Handle scalability mode in QueryCodecSupport"
This reverts commit 74281bed5350af9c15f83e0b1aec5c5921dbf76f.

Reason for revert: Fixed unit test by removing VP9 profile 2 from encoder factory unit test since this is platform dependent.

Original change's description:
> Revert "Handle scalability mode in QueryCodecSupport"
>
> This reverts commit 715a14811883a642e3acca21fb6017f8a128c0a5.
>
> Reason for revert: Speculative revert. Breaks upstream project http://b/200009579
>
> Original change's description:
> > Handle scalability mode in QueryCodecSupport
> >
> > All valid scalability modes should be supported by the builtin
> > software decoder/encoder.
> >
> > Bug: chromium:1187565
> > Change-Id: If66105d210d5055019f35dae2f80a18ad4a70cdd
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222642
> > Commit-Queue: Johannes Kron <kron@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#34998}
>
> TBR=danilchap@webrtc.org,sprang@webrtc.org,kron@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: Ibf40d523c50791d73e2afdc3917892b859d2bcb6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1187565
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232020
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Commit-Queue: Andrey Logvin <landrey@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35001}


Bug: chromium:1187565
Change-Id: I598a2a530b8fea22997bbb5910eb3b864d1e28a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232021
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35003}
2021-09-15 13:12:58 +00:00
74281bed53 Revert "Handle scalability mode in QueryCodecSupport"
This reverts commit 715a14811883a642e3acca21fb6017f8a128c0a5.

Reason for revert: Speculative revert. Breaks upstream project http://b/200009579

Original change's description:
> Handle scalability mode in QueryCodecSupport
>
> All valid scalability modes should be supported by the builtin
> software decoder/encoder.
>
> Bug: chromium:1187565
> Change-Id: If66105d210d5055019f35dae2f80a18ad4a70cdd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222642
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34998}

TBR=danilchap@webrtc.org,sprang@webrtc.org,kron@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ibf40d523c50791d73e2afdc3917892b859d2bcb6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1187565
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232020
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35001}
2021-09-15 10:45:41 +00:00
715a148118 Handle scalability mode in QueryCodecSupport
All valid scalability modes should be supported by the builtin
software decoder/encoder.

Bug: chromium:1187565
Change-Id: If66105d210d5055019f35dae2f80a18ad4a70cdd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222642
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34998}
2021-09-15 09:38:12 +00:00
dc8fc72204 Fix potential crash during SimulcastEncoderAdapter tear down.
On the Android and iOS platforms, occasionally crash when using the SimulcastEncoderAdapter.

The Android platform reverted,
In function `SimulcastEncoderAdapter::EncoderContext::Release`,
After executing `encoder_->RegisterEncodeCompleteCallback(nullptr)`
before execute `encoder_->Release()`

If the encoder thread is executed here,
```
// out/xxx/xxx/gen/sdk/android/generated_video_jni/VideoEncoderWrapper_jni.h
JNI_GENERATOR_EXPORT void Java_org_webrtc_VideoEncoderWrapper_nativeOnEncodedFrame(
    JNIEnv* env,
    jclass jcaller,
    jlong nativeVideoEncoderWrapper,
    jobject frame) {
  VideoEncoderWrapper* native = reinterpret_cast<VideoEncoderWrapper*>(nativeVideoEncoderWrapper);
  CHECK_NATIVE_PTR(env, jcaller, native, "OnEncodedFrame");
  return native->OnEncodedFrame(env, base::android::JavaParamRef<jobject>(env, frame)); // HERE
}
```
it will cause `native` to nullptr.

iOS also.

Bug: webrtc:13156
Change-Id: Id5563b3fa2c11606ae7b35de56bbaa6adba59b14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231780
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34989}
2021-09-14 09:15:22 +00:00
6b19d8273b Replace AV1X with AV1
* Replace "AV1X" with "AV1";
* Keep mapping of "AV1X" payload name to kVideoCodecAv1 to not break
support of injectable "AV1X".

Bug: webrtc:13166
Change-Id: I9a50481209209f3857bbf28f4ed529ee6972377e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231560
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34987}
2021-09-14 08:29:02 +00:00
4d4f62f6e7 VideoSendStreamTest: Add tests for encoder reconfiguration.
Bug: none
Change-Id: I1d976eb77357c7050ed6ca7d0eee9153f9ef0251
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231000
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34978}
2021-09-13 13:14:22 +00:00
b9b0890541 Fix error adding receive stream after packet received from non-primary SSRC.
The non-primary SSRC being RTX, for example. Normally a default stream
wouldn't be created from RTX packets, but there is a window of time
where packets can be received before the video engine has receive
parameters/payload type mappings, so it creates one anyway.

Then in AddRecvStream, normally the default stream would be destroyed
before creating a new one, but this only happens for sp.first_ssrc().
Resulting in the error "Receive stream with SSRC 'X' already exists".

Fixed by simply iterating over all SSRCs.

Bug: webrtc:13171
Change-Id: Iaf4e4a3ceafddee3d9b2d1e24af68be56f9695de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231633
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34971}
2021-09-10 21:28:23 +00:00
885ba07b65 Reland "red: generate and parse the red fmtp format"
This is a reland of 9d0730942677a520ce7e184d081b4c5a2469fc48

Original change's description:
> red: generate and parse the red fmtp format
>
> generates a fmtp line like
>   a=fmtp:<red payloadtype> <opus payloadtype>/<opus payloadtype>
> and matches the incoming redundant payload types against the
> send codec one. Offers without an FMTP line will not use RED.
> Redundancy levels of 1 (plus main packet ) to 32 are accepted but
> this is not wired up to the encoder since the O/A semantic of
> RFC 2198 is not clear.
>
> This decreases the chance of a collision with the SATIN codec
> which also runs on 48khz (but so far does not specify a channelCount of 2)
>
> BUG=webrtc:11640
>
> Change-Id: I8755e5b1e944d105212f1bbe4f330cf4e0753e67
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229583
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34848}

Bug: webrtc:11640
Change-Id: I9465e489897a8ded9845592477fe14678af7ab61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230545
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34965}
2021-09-10 13:15:05 +00:00
fb501792eb Convert WebRtcVoiceEngine tests to rtc::make_ref_counted
Bug: webrtc:12701
Change-Id: I8d6fb12a657c61112415aeffb25f177c1c81f03a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229589
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34960}
2021-09-09 13:33:56 +00:00
1f38a38b6f Add ability to set rtp header extensions without recreating streams.
Setting the rtp header extensions on the packet delivery thread
(currently worker, soon to be network), is now possible without
taking the hit of deleting and recreating the receive stream (and
rtp receiver and related state).

Bug: webrtc:11993
Change-Id: I9bbe306844a25d85d79cd216092ead66eaf68960
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223741
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34953}
2021-09-08 13:39:36 +00:00
9af2d92287 Replace RTC_DLOG with RTC_LOG in SetRecvParameters
To enable the logging in release builds. Note that SetSendParameters
always used RTC_LOG.

Bug: none
Change-Id: I5b3a84724e219e4bc41330a197b8961c92954500
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231501
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34952}
2021-09-08 12:52:46 +00:00
2562cf0105 Reland "Wire up non-sender RTT for audio, and implement related standardized stats."
This reverts commit 2c41cbae37cac548a1133589b9d2c2e8614fa6cb.

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 fb0dca6c055cbf9e43af665d3c437eba6f43372e.
>
> 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
767235dda3 media: sctp: Convert frequent logs to RTC_DLOG
In benchmarks, each log statement represent 2% of the CPU usage. RTC_LOG
is not very expensive, but not free either, and it's called for every
received and sent packet.

Bug: webrtc:12943
Change-Id: Id65baafb5e494091a3a7604687718fdd4f477d86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231223
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34929}
2021-09-06 13:28:19 +00:00
2c41cbae37 Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
This reverts commit fb0dca6c055cbf9e43af665d3c437eba6f43372e.

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
3cd7a0ffdd Remove media/base/h264_profile_level_id.* and media/base/vp9_profile.h
The content of these files was moved to api/video_codecs in
https://webrtc.googlesource.com/src.git/+/c3fcee7c3a7714afc3e37d4753b40f4fdbc3653e
but the original files could not be removed due to dependencies
in downstream projects.

Bug: chromium:1187565
Change-Id: I414efa22102bfdea0765fa72a8cf8b0bd5c090db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229303
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34869}
2021-08-30 10:31:08 +00:00
59947d2871 SimulcastEncoderAdapter: Use FramerateController instead of FramerateControllerDeprecated.
Results from test (CallPerfTest.TestEncodeFramerateVp8Simulcast):
Simulcast streams:
0: max_fps:20 -> StreamStats.encode_frame_rate:15 (before), 20 (after)
1: max_fps:30

Bug: webrtc:13031
Change-Id: I30e6b2dcb2746859bd3e21b098bfa7b0fb3b2dda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230120
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34867}
2021-08-30 10:20:55 +00:00
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
75bbd1fbe6 Revert "red: generate and parse the red fmtp format"
This reverts commit 9d0730942677a520ce7e184d081b4c5a2469fc48.

Reason for revert: Speculative revert due to failing downstream test. If the test recovers, I'll assign the issue to the tests owners.

Original change's description:
> red: generate and parse the red fmtp format
>
> generates a fmtp line like
>   a=fmtp:<red payloadtype> <opus payloadtype>/<opus payloadtype>
> and matches the incoming redundant payload types against the
> send codec one. Offers without an FMTP line will not use RED.
> Redundancy levels of 1 (plus main packet ) to 32 are accepted but
> this is not wired up to the encoder since the O/A semantic of
> RFC 2198 is not clear.
>
> This decreases the chance of a collision with the SATIN codec
> which also runs on 48khz (but so far does not specify a channelCount of 2)
>
> BUG=webrtc:11640
>
> Change-Id: I8755e5b1e944d105212f1bbe4f330cf4e0753e67
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229583
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34848}

TBR=henrik.lundin@webrtc.org,hta@webrtc.org,philipp.hancke@googlemail.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I5a0816a22a2a213679ab047c61e3b1dda40c4f59
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11640
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230140
Reviewed-by: Björn Terelius <terelius@google.com>
Commit-Queue: Björn Terelius <terelius@google.com>
Cr-Commit-Position: refs/heads/main@{#34850}
2021-08-25 11:46:34 +00:00
9d07309426 red: generate and parse the red fmtp format
generates a fmtp line like
  a=fmtp:<red payloadtype> <opus payloadtype>/<opus payloadtype>
and matches the incoming redundant payload types against the
send codec one. Offers without an FMTP line will not use RED.
Redundancy levels of 1 (plus main packet ) to 32 are accepted but
this is not wired up to the encoder since the O/A semantic of
RFC 2198 is not clear.

This decreases the chance of a collision with the SATIN codec
which also runs on 48khz (but so far does not specify a channelCount of 2)

BUG=webrtc:11640

Change-Id: I8755e5b1e944d105212f1bbe4f330cf4e0753e67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229583
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34848}
2021-08-25 10:37:41 +00:00
062acd9eb4 Move frame drop functionality in VideoAdapter into a separate class.
This class will replace modules/video_coding/utility/framerate_controller.h

Bug: webrtc:13031
Change-Id: I8faa9c3c158b7c5ab0618e3504224c7e00f8e0b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227350
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34802}
2021-08-19 11:50:41 +00:00
d5a0efe6de Delete deprecated EncoderSimulcastProxy constructor
Bug: None
Change-Id: Ib55a3f6f051b829c0102a698c4a476ade3c9ab83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229180
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34794}
2021-08-18 13:23:39 +00:00
fb1959625d Allow setting different number of temporal layers per simulcast layer.
Setting different number of temporal layers is supported by SimulcastEncodeAdapter and LibvpxVp8Encoder will fallback to SimulcastEncoderAdapter if InitEncode fails.

Bug: none
Change-Id: I8a09ee1e6c70a0006317957c0802d019a0d28ca2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228642
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34785}
2021-08-17 13:33:55 +00:00
29dddff209 usrsctp: Remove usage of usrsctp_getladdrs()
Using usrsctp_getladdrs() would sometimes be flagged by TSAN for a lock
order inversion. It was used to retrieve the "id" of the socket on the
transport.
The "id" is instead stored in the "ulp_info" parameter, which is
passed with each callback from usrsctp.

Bug: webrtc:12823
Change-Id: Ifb3d7780273a460e677526dd3a93f9365b29300c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229000
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34784}
2021-08-17 12:24:03 +00:00