Commit Graph

34239 Commits

Author SHA1 Message Date
3987e61086 GCC: fix template specialization in webrtc::BitstreamReader
GCC complains that explicit specialization in non-namespace scope
is happening for webrtc::BitstreamReader::Read(). However,
specializationvfor bool isn't used because std::is_unsigned<bool>::value
returns true. Add std::is_same for bool check and enable second
specialization only for bool types.

Bug: chromium:819294
Change-Id: I1873cd59e2737516bd4012fb952da65d6bf3172b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231561
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35007}
2021-09-15 17:20:50 +00:00
b6b29030f6 Add .vpython3 file to webrtc
It is needed to fix chromium roll. Tested here: https://webrtc-review.googlesource.com/c/src/+/232040 (the few red bots are unrelated).

Bug: b/199885455
Change-Id: I726228fe44aae1009a1934c451438a2d01002ab0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232023
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35006}
2021-09-15 16:56:30 +00:00
1061686107 red: handle opus dtx 400ms timestamp gap
by not encoding redundancy. The timestamp gap of 400ms means a
rtp timestamp difference of 19200 which would overflow the 14 bit
RED timestamp difference field.

To test in Chrome, go to
  https://webrtc.github.io/samples/src/content/peerconnection/audio/
set `useDtx = true` in the console and be very quiet.

BUG=webrtc:13182,webrtc:11640

Change-Id: I1cedc7d846ac7ae821bb7cb5c0f37a17511ac727
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231940
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35005}
2021-09-15 15:09:28 +00:00
b01e6457fe Reland "Reland "Enable WebRTC-Vp9DependencyDescriptor by default""
This is a reland of b062829311bf1962a7f264cecf36d17ef41951df

> Reland "Enable WebRTC-Vp9DependencyDescriptor by default"
>
> This is a reland of 472707150662bc4e174072e445938e5c405aa884
>
> Original change's description:
> > Enable WebRTC-Vp9DependencyDescriptor by default
> >
> > Bug: chromium:1178444
> > Change-Id: I420e1e9b3c557b8b186cb08c15b962a779e1ca17
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226941
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34584}
>
> Bug: chromium:1178444
> Change-Id: I874412b41e657179be6ffbe399617e18a29ec804
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230121
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34890}

Bug: chromium:1178444
Change-Id: I5bb3e3bd2da26f9a24d5e8161bd66b447543fc8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231843
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35004}
2021-09-15 13:48:58 +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
9c1657cba8 dcsctp: support socket handover in ReassemblyQueue
Bug: webrtc:13154
Change-Id: I816e51dcd923ba6440480de5d5df9012e4af9e5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231958
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Sergey Sukhanov <sergeysu@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35002}
2021-09-15 10:49:57 +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
9a45e897d5 Update h264_bitstream and pps parsers to use BitstreamReader
The new version is subjectivly cleaner
and objectively generates smaller binary size

Bug: None
Change-Id: I6639b4a1455e745e0047339115b3d02ef81ce731
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231238
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35000}
2021-09-15 10:26:47 +00:00
10dc1a6d8b New H264PacketBuffer consolidating a bunch of H264 specific hacks into one class.
Bug: webrtc:12579
Change-Id: Idea35983e204e4a3f8628d5b4eb587bbdbff5877
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227286
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34999}
2021-09-15 09:57:29 +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
ac554ebbc5 Add VPN detection by mac-address for Windows
This patch adds VPN detection for windows
based on known MAC addresses.
- Cisco AnyConnect
- GlobalProtect Virtual Ethernet

Bug: webrtc:13097
Change-Id: Ia90ee50be0dc2dcd2e6e9de1493fdd2c5e7d9d3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230245
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34997}
2021-09-15 08:57:28 +00:00
225cd47445 dcsctp: implement handover in DataTracker
Bug: webrtc:13154
Change-Id: Ia8c41dcffd95dafd904ee630f2131b575fe833dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231955
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Sergey Sukhanov <sergeysu@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34996}
2021-09-15 07:30:18 +00:00
e229fb83fb Update WebRTC code version (2021-09-15T04:03:10).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: I7deecf188cea2fb477d6d1f65ec04fc57ca52014
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231987
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#34995}
2021-09-15 05:54:38 +00:00
bd917a13fb Don't invoke custom certificate verifier unless there is an error.
The custom callback is intended to override errors, so there's no
point in calling it if the status is ok.

Calling it during an otherwise successful verification was an
unintentional change from:
https://webrtc-review.googlesource.com/c/src/+/196941

This is misleading as the return value isn't even used.

Bug: chromium:1247577
Change-Id: Id74411f7364537a3225021e7631bc9ab962889ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231881
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34994}
2021-09-15 00:04:27 +00:00
bc503c95b5 Remove support for nack threshold.
The nack threshold feature is unlikely to provide any value, since
reordered packets are rare. This CL also removes the factory method
from the NackTracker class, since it did not add much value.

Bug: webrtc:10178
Change-Id: Ib6bece4a2d9f95bd4298799aaa15627f5c014b61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231953
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34993}
2021-09-14 16:51:17 +00:00
7ca630f8dd Fix iOS sim bot to for the new Chromium roll
Bug: b/199044368, chromium:1249456
Change-Id: I0d91abca55618d87dc8366315182729e2a2b1016
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231954
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34992}
2021-09-14 16:16:33 +00:00
ad6b7a733a dcsctp: introduce handover API types and implement it for streams
Bug: webrtc:13154
Change-Id: Ifa250175af79b7adc87dbc2750054adc94b90bb7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231842
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Sergey Sukhanov <sergeysu@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34991}
2021-09-14 13:47:03 +00:00
d0321c5e5a Deduplicate set of the rtp header extension uri constants
Bug: webrtc:7472
Change-Id: Ic0b4f2cc3374ba70a043310b5046d8bf91f0acbe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231949
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34990}
2021-09-14 13:38:44 +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
99c6ca0e66 Add danilchap@webrtc.org as owner of test/fuzzers/
Bug: None
Change-Id: I11cc6c4a17c8d0c310816c87f1b67d0a338ebe24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231941
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34988}
2021-09-14 08:48:03 +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
52b9e1ecfb Ensure RtpVideoLayersAllocationExtension::Parse validate sanity of the output
This is tested by a simple unit test and a new fuzzer that verify that all that can be parsed also can be written.

Bug: webrtc:12000
Change-Id: I461aedf97d3dec6e8916e72110fa097c3b31c27f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231642
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34986}
2021-09-14 06:43:13 +00:00
f1384afda0 Update WebRTC code version (2021-09-14T04:04:50).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: I2010ee67fc200a93732ccf67cdc82238bf75f0cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231921
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#34985}
2021-09-14 05:31:20 +00:00
018cd3d6fc Avoid NACKing after DTX.
This is done by not adding missing packets to the NACK list if the number of samples per packet is too large.

Bug: webrtc:10178
Change-Id: If46398d6d05ea35f30d7028040d3b808559e950b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231841
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34984}
2021-09-13 16:31:42 +00:00
593b4d550d Pipewire: Use xdg-portal provided file descriptor
The documentation for `OpenPipeWireRemote()` says:
> Open a file descriptor to the PipeWire remote where the camera nodes
> are available. The file descriptor should be used to create a
> pw_core object, by using pw_context_connect_fd.

In `InitPipeWire()` we already successfully requested the FD, but then
went on and used the unrestricted default socket.
This does not matter in non-sandboxed environments, as the stream we
want to use is available from both FDs. In flatpak sandboxes, however,
this requires to give full Pipewire access to the application.

Fix this by simply using the right, restricted FD, and while on it,
also make sure to not leak it.

This change has already landed in downstream in Firefox, see
https://phabricator.services.mozilla.com/D122904
https://phabricator.services.mozilla.com/D124508

Bug: webrtc:13152
Change-Id: I3f8995c54c797e1a90a980f231e496a13cbe65b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230803
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#34983}
2021-09-13 16:29:52 +00:00
7f876c8930 Allow full SVC to reference T0 frame only after it has been encoded
The VP9 encoder may drop a frame internally which will not advance the
frame pattern. Consider the following scenario where only spatial layer
0 and temporal layer 0 is active:

1. Key frame encoded
2. Spatial layer 1 is activated
3. Delta T0 dropped
4. Delta T0 encoded

No S1T0 frame is encoded in (1) since it's not active. When
NextFrameConfig is called in (3) it will say that future frames may
reference T0 on both S0 and S1, but it's then dropped.

On step (4), the SVC controller essentially thinks it's encoding a new
picture and will happily reference the T0 on what it thinks is the first
delta frame. However, this is actually still the key frame and since
there was no S1T0 frame produced it will reference an invalid buffer.

To fix this, only say it's possible to reference a T0 frame after it has
been successfully encoded.

Bug: webrtc:11999, webrtc:13142, chromium:1178444
Change-Id: Iab3d2042ce0b3fa7d952b2831d1a36b1a6613a86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231695
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34982}
2021-09-13 15:52:42 +00:00
9103e8efaf Fuzz explicitly configured spatial layers with VP9 encoder
With the new SVC controller this will hopefully help uncover more subtle
bugs.

Bug: webrtc:11999
Change-Id: Iab76d38b3fb8dfbbeb269f4ba1e74f6f425501f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231694
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34981}
2021-09-13 15:40:06 +00:00
baa6090825 Fix SVC controller's bitrate allocation in VP9 encoder
Unlike libvpx, the VideoBitrateAllocation expects that the bitrate
allocation is separate for each temporal layer. In this instance, if the
bitrates are not separated it will fool the SVC controller into thinking
that all temporal layers are always active.

Bug: webrtc:11999
Change-Id: Ibc33ac00b8b7716c011b94e1ec9c640cedb5274e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231693
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34980}
2021-09-13 15:36:13 +00:00
e130084c68 Fix integer overflow in rtcp::TransportFeedback::IsConsistent
Bug: webrtc:13141
Change-Id: I450d7ffbef86ce67b3e6fdde0520bdb6ac7d666c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231840
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34979}
2021-09-13 13:49:13 +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
a43ffb32f2 Remove unnecessary static_cast in rtp_video_stream_receiver2
Bug: None
Change-Id: I8f7424c877e07ee585d46adc81b777577c43d796
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231697
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#34977}
2021-09-13 08:39:10 +00:00
7a4ab1a063 red: handle 0-redundancy encoding case
which is a "degenerated" case that just adds a one-byte header.

BUG=webrtc:11640

Change-Id: I173f4cb56270e0090219e4450b036bbe1b51756a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231696
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34976}
2021-09-13 07:23:11 +00:00
6ee8a692b8 Update WebRTC code version (2021-09-13T04:03:47).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: Iab72a24b1b187a1a9a57b3b3c14905df2f75729d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231822
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#34975}
2021-09-13 05:39:00 +00:00
eb2ccc9d6a Update WebRTC code version (2021-09-12T04:02:50).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: I6cd77c8717c264aa42114b2515a7e0c29b8525cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231771
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#34974}
2021-09-12 05:14:57 +00:00
06defc4320 QualityRampupExperiment: SetMaxBitrate may not be set correctly.
Call SetMaxBitrate when encoder is configured instead of in OnMaybeEncodeFrame (which is called after the initial frame dropping ->
max bitrate is not set for dropped frames).

Added support for single active stream configuration.

Bug: none
Change-Id: I33ff96e7feed70b9ea3c9b3da89f117859108347
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231681
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34973}
2021-09-11 10:28:43 +00:00
3808ffe7f5 Update WebRTC code version (2021-09-11T04:04:19).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: I42d7209347996575af2443656b77ce5a0ed9ba96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231742
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#34972}
2021-09-11 05:40:53 +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
3a9640a5aa Improve nacking logic
Requesting nacks in more cases allows the delay adaptation to better
predict if it's worth it to increase the jitter buffer delay to wait for
the nacked packets to arrive.

Bug: webrtc:10178
Change-Id: I46adb76c013dbb8df0b99eb3f7a398f8f21c2bf6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231648
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34970}
2021-09-10 14:21:22 +00:00
32b917ac41 With Svc controller do not produce frame that will be dropped anyway
This cover scenario where target bitrate is changed in a middle of
of group of frame after spatial upswitch.
This change should avoid wasting encoder resources to produce those
frames, reduce number of errors
"Encoder produced a frame for layer that wasn't requested"

Bug: webrtc:11999
Change-Id: I06045259b1cee2c21bfdabbafff3892b57c82a84
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230543
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34969}
2021-09-10 13:57:35 +00:00
5d3bf6ae2a Add helper to query scalability structure configuration
without creating svc controller for it.

Bug: chromium:1187565
Change-Id: I219f88203e73036bf48bce04527bb8e46ccf1c33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231128
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34968}
2021-09-10 13:47:22 +00:00
b32650e219 Improve SSLVerifyCallback variable naming
The names used were confusing.

Bug: chromium:1247577
Change-Id: I007f8b9b6b9c2188cbfc2dcfb2499acf3c14a9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231683
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34967}
2021-09-10 13:40:31 +00:00
5eb5bb5007 AEC3: Using a more conservative frequency response representation of the tails.
Bug: webrtc:13173
Change-Id: Ic469f6226fe079c306cec6f941eeb70d6d9094f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231682
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34966}
2021-09-10 13:20:35 +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
5e7a3aedf1 Let EmulatedNetworkManagerInterface own and expose a PacketSocketFactory
So that applications don't need to construct it from the exposed
network_thread.

The EmulatedNetworkManagerInterface::network_thread() accessor is currently
used as a way to get to emulation's SocketServer, and should be deleted
when applications of the emulation framework have migrated away from
that usage.

Bug: webrtc:13145
Change-Id: I3efa55d117cad8ac601c48a9d2d2aa62a121f9c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231649
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34964}
2021-09-10 13:14:03 +00:00
824eebab8b Improve points visualization in metrics_plotter.
Bug: None
Change-Id: Id86c67ae9e1690817b98d8f62db0c9d05911a58a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231680
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34963}
2021-09-10 10:59:58 +00:00
a47d91b60d Update WebRTC code version (2021-09-10T04:04:33).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: I666f354621d55a23856395cd1b4301f1f2c598b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231636
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#34962}
2021-09-10 05:56:26 +00:00
f7fcfb7e66 Fix payload type assignment issue with SetCodecPreferences
When SetCodecPreferences was used, the media session was adding codecs
from a list that didn't have corrected payload type mappings. As a
result, it's possible to generate offers or answers that use the same
payload type for audio and video codecs, which is a clear violation.

Bug: webrtc:12169
Change-Id: Ib7be73b4b3b4c57b8d2f374dba8b039c7a3df5a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231620
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34961}
2021-09-09 21:33:46 +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
66e06055f1 Change kDefaultMaximumPreStreamDecoders to 1
The experiment WebRTC-PreStreamDecoders (aka Lazy decoder creation) has
investigated the benefit of only creating a subset of all decoders
during negotiation and the remaining decoders on demand.

This CL changes the default value to only create one decoder during
negotiation. This frees up hardware resources and reduces the SDP
negotiation time.

Bug: chromium:1202042
Change-Id: I6e2206839162aa857fcc948ccd53d0ff91cbdeaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231643
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34959}
2021-09-09 10:49:36 +00:00
552c83171b Update nack tracker when receiving empty packets.
Bug: webrtc:7611
Change-Id: Ied50829f245ea99f8d737cffdf9a3d646de3fbaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231641
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34958}
2021-09-09 10:40:35 +00:00