Commit graph

179 commits

Author SHA1 Message Date
Jonas Oreland
a49abbb3b6 Extend testing of prAnswer
- Modify munger to take (mutable)
  std::unique_ptr<SessionDescriptionInterface> rather than
  cricket::SessionDescription (that latter is embedded in the former)

- For all pranswer test cases, do a final SetRemoteDescription(kAnswer) and
check that signaling_state == stable

Add new test cases:
1) A test case that only applies it as prAnswer on caller (callee is stable)
2) A test case that "scramble" sdb between prAnswer and Anser.

Bug: None
Change-Id: Ifedd92ade01ae781a2e59d0569133c486c7093fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360781
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42891}
2024-08-30 08:06:47 +00:00
Harald Alvestrand
90e0829c59 Add test for PR-Answer functionality
Bug: None
Change-Id: I29bf1e40d47361917eb6f52424df23f7697bde0d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360721
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42859}
2024-08-27 08:17:32 +00:00
Philipp Hancke
4158678b46 Split "helpers" from SSL target to "crypto_random" and rename
since it contains helpers mostly related to cryptographically secure random numbers and strings.

BUG=webrtc:339300437

Change-Id: I10db939534b25dc792ac1600a4721d1b84521880
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42441}
2024-06-07 06:41:51 +00:00
Harald Alvestrand
d78e30e00b Deprecate cricket::VideoCodec and cricket::AudioCodec
These are aliases for cricket::Codec.
Also remove internal usage

Bug: b/42225532
Change-Id: I220b95260dc942368cb6280432a058159eec8700
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349321
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42194}
2024-04-29 16:24:51 +00:00
Harald Alvestrand
8c371f2a9b Reland "Take out Fuchsia-only SDES-enabling parameters"
This is a reland of commit 59f3b35013

Landing after taking out the Chrome usages.

Original change's description:
> Take out Fuchsia-only SDES-enabling parameters
>
> This does not remove all traces of SDES - we still need to delete
> the cricket::CryptoParams struct and all code that uses it.
>
> Bug: webrtc:11066, chromium:804275
> Change-Id: I811c8d40da7f4af714d53376f24cd53332a15945
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336780
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41634}

Bug: webrtc:11066, chromium:804275
Change-Id: I31414dfb6a0ecfa7b6fd91c68603cfd6146869d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337260
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41660}
2024-02-02 17:02:29 +00:00
Olga Sharonova
c0741e9f12 Revert "Take out Fuchsia-only SDES-enabling parameters"
This reverts commit 59f3b35013.

Broke WebRTC into Chrome rolls:

https://chromium-review.googlesource.com/c/chromium/src/+/5248171?tab=checks

/../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:216:18: error: no member named 'enable_dtls_srtp' in 'webrtc::PeerConnectionInterface::RTCConfiguration'
  216 |   configuration->enable_dtls_srtp = dtls_srtp_key_agreement;
      |   ~~~~~~~~~~~~~  ^

Original change's description:
> Take out Fuchsia-only SDES-enabling parameters
>
> This does not remove all traces of SDES - we still need to delete
> the cricket::CryptoParams struct and all code that uses it.
>
> Bug: webrtc:11066, chromium:804275
> Change-Id: I811c8d40da7f4af714d53376f24cd53332a15945
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336780
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41634}

Bug: webrtc:11066, chromium:804275
Change-Id: I2c2114873091e0c662977a6ef5723e6447166a65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337181
Commit-Queue: Olga Sharonova <olka@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Olga Sharonova <olka@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41643}
2024-01-31 14:35:19 +00:00
Harald Alvestrand
59f3b35013 Take out Fuchsia-only SDES-enabling parameters
This does not remove all traces of SDES - we still need to delete
the cricket::CryptoParams struct and all code that uses it.

Bug: webrtc:11066, chromium:804275
Change-Id: I811c8d40da7f4af714d53376f24cd53332a15945
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336780
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41634}
2024-01-30 10:50:12 +00:00
Tommi
698b4e7087 Update more Candidate type checkers to use Candidate::is_*
This is a follow up to a previous CL that removed direct dependency on
the `cricket::` string globals.

Bug: none
Change-Id: I4d839a36739fc4694ce81b72ee036e83dae580df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335420
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41623}
2024-01-26 13:41:09 +00:00
Henrik Boström
ed1d084d0a [Stats] Replace all uses of is_defined() with has_value().
Same method, different name. Unblocks replacing RTCStatsMember<T> with
absl::optional<T>.

Bug: webrtc:15164
Change-Id: I251dd44d3b0f9576b3b68915fe0406d1b3381e5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334641
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41573}
2024-01-19 12:26:56 +00:00
Harald Alvestrand
24510d43dc Delete deprecated AsyncResolver and related classes
To be submitted after downstream usage has been removed, but no earlier than December 1, 2023.

Bug: webrtc:12598
Change-Id: Id9acbac591c48c0c5883fe8f06cf6a68471b70f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323004
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41290}
2023-11-30 15:36:55 +00:00
Danil Chapovalov
49c35d377b In PeerConnection postpone RtcEventLog destruction
This is done as a preparation to move RtcEventLog ownership into Environment where destruction happens later, when all users of the Environment are deleted.

Bug: webrtc:15656
Change-Id: I2a72c74f1fabb1e25c5200aa47a5d61e4b3d9cd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328301
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41272}
2023-11-29 11:18:31 +00:00
Philipp Hancke
d0f0f38f72 Remove most usage of MediaContentDescription::as_audio()/as_video()
and unify algorithms a bit more.

BUG=webrtc:15214

Change-Id: Ie9903f3e56d25b1dc026367e8ae6817275faa07b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328442
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41244}
2023-11-27 09:35:39 +00:00
Per K
14630a7e37 Use rtc::ReceivedPacket in Stun and TurnServer
StunServer is updated to ensure registring for receiving packet from the socket is happening on the same thread as where the packets are recevied.

Bug: webrtc:15368, webrtc:11943
Change-Id: I94cc3a47278d5489de7f170c8d43015d1551c437
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328120
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41219}
2023-11-23 10:40:56 +00:00
Harald Alvestrand
a6544377bc Remove not-needed webrtc:: prefixes in pc/
This test drives the new tools_webrtc/remove_extra_namespace.py tool.

Bug: None
Change-Id: I9b590aa1213e4cace2d64d555f4dafd893f03606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327021
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41141}
2023-11-13 13:23:04 +00:00
Harald Alvestrand
4d25a77fd3 Deprecate AsyncResolver config fields and remove internal usage.
Bug: webrtc:12598
Change-Id: Ic43cbcd13e4de44b02351c89da12844606368623
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317604
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40627}
2023-08-25 14:02:27 +00:00
Johannes Kron
4133797557 Remove expired histograms WebRTC.PeerConnection.SrtpCryptoSuite
Fixed: chromium:1448119
Change-Id: Ibf903626f78860e2fb33e5f58b37276c106fdcbe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308380
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40254}
2023-06-09 14:48:38 +00:00
Florent Castelli
8c4b9ea535 Remove references to AudioCodec and VideoCodec constructors
The preferred method to create codecs is to use the function
cricket::CreateAudioCodec or cricketCreateVideoCodec.
Empty codec objects are deprecated and should be replaced
with alternatives such as methods returning an
absl::optional object instead.

Bug: webrtc:15214
Change-Id: I7fe40f64673cd407830dbbb0e541b85a3aee93aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307521
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40226}
2023-06-05 23:23:40 +00:00
Tommi
dba22d3190 Move transceiver iteration loop over to the signaling thread.
This is required for ReportTransportStats since iterating over the
transceiver list from the network thread is not safe.

Bug: chromium:1446274, webrtc:12692
Change-Id: I7c514df9f029112c4b1da85826af91217850fb26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307340
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40197}
2023-06-01 16:29:46 +00:00
Henrik Boström
4e231eedbd Delete deprecated 'track' and 'stream' metrics from WebRTC.
Track stats are roughly equal in size as the RTP stream stats which
are the largest objects making up the majority of the RTCStatsReport
size and scales with meeting size. Deleting track/stream reduces the
size in approximately half which should reduce performance overhead
and unblock code simplifications.

Blocked on:
- https://chromium-review.googlesource.com/c/chromium/src/+/4517530

# Relevant bots already passed
NOTRY=True

Bug: webrtc:14175, webrtc:14419
Change-Id: Ib7bdb84c10459b42b829228d11876498e5227312
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289043
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40129}
2023-05-24 12:26:56 +00:00
Philipp Hancke
1f98b466b8 stats: rename RTCInboundRTPStreamStats and RTCOutboundRTPStreamStats
to RTCInboundRtpStreamStats and RTCOutboundRtpStreamStats respectively
which follows the camel-casing convention used elsewhere.

The old name is kept around as an alias for a limited amount of time
to allow upgrading dependencies.

BUG=webrtc:14973

Change-Id: Ibf4e65933fd6cc2e7e89955042f6f8fb0f6c7853
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296261
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39497}
2023-03-07 14:27:47 +00:00
Emil Lundmark
4e86aa0870 Remove mentions of already deleted field trials
- WebRTC-Audio-Agc2ForceExtraSaturationMargin
- WebRTC-Audio-Agc2ForceInitialSaturationMargin
- WebRTC-Audio-BitrateAdaptation
- WebRTC-Audio-TransientSuppressorVadMode
- WebRTC-FrameBuffer3
- WebRTC-IntelVP8
- WebRTC-UseActiveIceController

Bug: None
Change-Id: I3545727c09f761867f2f4c2bb5c400012ce146d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295723
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39444}
2023-03-01 15:53:37 +00:00
Henrik Boström
f6afb3fd57 Disable flaky AudioKeepsFlowingAfterImplicitRollback test.
I don't quite understand why this is flaking but I beleive it is a
test-only problem, see description in https://crbug.com/webrtc/14947
how I have trouble understanding if "frames received" is measured
correctly.

Bug: webrtc:14947, webrtc:14909
Change-Id: I667306b7cd33687645ad6a9294364330075434ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295700
Reviewed-by: Markus Handell <handellm@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39433}
2023-03-01 10:50:37 +00:00
Harald Alvestrand
5b4c651d67 Add integration test for NACK functionality
This adds a test that sets the required feedback mechanisms
to get NACK configured for video, connects, and then sets packet
loss to 100%.

The expected result is that the receiver sends NACK; this will cause
the test to set packet loss to 0%, so the next NACK sent should get
to the sender and cause retransmission.

This is explicating a problematic case in splitting media channel.

Bug: webrtc:13931
Change-Id: I0c23c4a89953976454d84b0211f0a7545bbb717a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293720
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39412}
2023-02-28 08:50:55 +00:00
Philipp Hancke
fe1b39a648 stats: Deprecate RTCStatsReport(int64 timestamp_us)
in favor of the variant with (or returning) a Timestamp object.

BUG=webrtc:14813,webrtc:13756

Change-Id: I7b40f48f640a8be40a134b380a7a1b99cc99913b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294287
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39366}
2023-02-22 12:32:02 +00:00
Henrik Boström
39dab96b98 Verify GetSources is not flaky for unsignaled SSRCs.
This test verifies perkj's fixes in https://crbug.com/webrtc/14817.
I ran the test 6000 times locally and it didn't fail once.

Bug: webrtc:14817
Change-Id: I3f78f3ae2ca09b328cbfa12a89ad228d3de899c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294522
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39365}
2023-02-22 10:13:53 +00:00
Florent Castelli
bd1e5d5aa5 Reland "Ensure RTCRtpSenders are always created with one encoding"
This is a reland of commit b8023690d9

Original change's description:
> Ensure RTCRtpSenders are always created with one encoding
>
> It is possible to have AddTransceiver calls with an empty array
> of encodings or AddTrack calls. In both cases, before negotiation,
> the sender's encodings array would be empty and it was not possible
> to update any value.
>
> Now, a default entry should be created in those cases, allowing to
> update the configuration before negotiation.
>
> Bug: webrtc:10567
> Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
> Auto-Submit: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39126}

Bug: webrtc:10567
Change-Id: I558a95f7b587302b5e95f6ec26d1eb1fedf3dbed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291240
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39150}
2023-01-19 15:49:04 +00:00
Evan Shrubsole
9f9671fe7f Revert "Reland "Ensure RTCRtpSenders are always created with one encoding""
This reverts commit fc5d627cef.

Reason for revert: Breaks upstream WPT tests

Original change's description:
> Reland "Ensure RTCRtpSenders are always created with one encoding"
>
> This is a reland of commit b8023690d9
>
> Original change's description:
> > Ensure RTCRtpSenders are always created with one encoding
> >
> > It is possible to have AddTransceiver calls with an empty array
> > of encodings or AddTrack calls. In both cases, before negotiation,
> > the sender's encodings array would be empty and it was not possible
> > to update any value.
> >
> > Now, a default entry should be created in those cases, allowing to
> > update the configuration before negotiation.
> >
> > Bug: webrtc:10567
> > Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
> > Auto-Submit: Florent Castelli <orphis@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Commit-Queue: Florent Castelli <orphis@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39126}
>
> Bug: webrtc:10567
> Change-Id: I2d52fa5b1d7cfdc9dce279fcf9faf1e0129c9008
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291140
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39145}

Bug: webrtc:10567
Change-Id: If9b5adb5debb7c87a15662a8d0f232405a0e8136
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291221
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39147}
2023-01-19 14:02:26 +00:00
Florent Castelli
fc5d627cef Reland "Ensure RTCRtpSenders are always created with one encoding"
This is a reland of commit b8023690d9

Original change's description:
> Ensure RTCRtpSenders are always created with one encoding
>
> It is possible to have AddTransceiver calls with an empty array
> of encodings or AddTrack calls. In both cases, before negotiation,
> the sender's encodings array would be empty and it was not possible
> to update any value.
>
> Now, a default entry should be created in those cases, allowing to
> update the configuration before negotiation.
>
> Bug: webrtc:10567
> Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
> Auto-Submit: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39126}

Bug: webrtc:10567
Change-Id: I2d52fa5b1d7cfdc9dce279fcf9faf1e0129c9008
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291140
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39145}
2023-01-19 11:27:34 +00:00
Evan Shrubsole
44e5d5a9d1 Revert "Ensure RTCRtpSenders are always created with one encoding"
This reverts commit b8023690d9.

Reason for revert: Breaking WPT tests in Chrome. Example build https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/1263191/overview

Original change's description:
> Ensure RTCRtpSenders are always created with one encoding
>
> It is possible to have AddTransceiver calls with an empty array
> of encodings or AddTrack calls. In both cases, before negotiation,
> the sender's encodings array would be empty and it was not possible
> to update any value.
>
> Now, a default entry should be created in those cases, allowing to
> update the configuration before negotiation.
>
> Bug: webrtc:10567
> Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
> Auto-Submit: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39126}

Bug: webrtc:10567
Change-Id: Ib8931b38182251baac616540788a02a5fafaf670
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291120
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39132}
2023-01-18 10:34:03 +00:00
Florent Castelli
b8023690d9 Ensure RTCRtpSenders are always created with one encoding
It is possible to have AddTransceiver calls with an empty array
of encodings or AddTrack calls. In both cases, before negotiation,
the sender's encodings array would be empty and it was not possible
to update any value.

Now, a default entry should be created in those cases, allowing to
update the configuration before negotiation.

Bug: webrtc:10567
Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39126}
2023-01-17 18:05:49 +00:00
Henrik Boström
4df20baff1 Implement GetParameters/GetSources support for unsignaled SSRCs.
Unsignaled SSRCs are only applicable for the receiver case (not sender).
This CL updates the receievr's GetParameters() and GetSources() methods
to lookup parameters/sources by the current SSRC (whether or not it was
signaled) instead of only looking at the signaled SSRC.

To clarify that the `ssrc_` variable inside the [Audio/Video]RtpReceiver
is the signaled ssrc (and not set if the current ssrc is unsignaled),
we rename this variable to `signaled_ssrc_`.

By the looks of it, other APIs like setting volume or packetizers also
have a dependency on the assumptions that the SSRC is signaled. We will
not address that in this CL, but this CL makes that more clear.

Bug: webrtc:14811
Change-Id: I32c93d264ab441ade23a4078639744d25b791742
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290573
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39051}
2023-01-10 06:44:27 +00:00
Henrik Boström
323e9df6d1 Remove dependencies on 'track' stats from PC integration tests.
This unblocks the deletion of this deprecated stats object.

Bug: webrtc:14175
Change-Id: I850c028fc9556a36191909afa3d635a7e6b65b69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288582
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38983}
2023-01-03 11:40:28 +00:00
Henrik Boström
15166b2fa4 [ModernStats] Mark obsolete stats as [[deprecated]].
This includes the stats dictionaries that have been made obsolete in
the spec and whose IDs are prefixed "DEPRECATED_":
- RTCMediaStreamTrackStats
- RTCMediaStreamStats

There is an ongoing experiment to unship these stats dictionaries in
Chrome (https://crbug.com/1374215). Marking then as [[deprecated]] helps
alert other dependencies that these classes are deprecated.

In the meantime, the "DEPRECATED_RTCMediaStreamTrackStats" prefix makes
it possible to use the deprecated classes.

# Unrelated infra failures
NOTRY=True

Bug: webrtc:14175, webrtc:14419
Change-Id: I498d370294058a628278e1e5b027cd12e24ad31a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279700
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38439}
2022-10-19 09:58:37 +00:00
Harald Alvestrand
22d32f1a6c Remove the KeyProtocol metric
Now that SDES is (largely) removed, this is no longer useful.

Bug: chromium:1365484
Change-Id: I3e626a7d5d83130a70958851de3df0aa27616bd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277781
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38278}
2022-10-03 14:20:17 +00:00
Danil Chapovalov
2aaef45876 Replace Invoke in tests with SendTask test helper
Bug: webrtc:11318
Change-Id: I14e3fbc694d41c785a61c88d8207005c681576c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271540
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37774}
2022-08-12 23:42:16 +00:00
Ali Tofigh
b7821cea6b Remove unnecessary overload in RtcEventLogOutput
Bug: webrtc:13579
Change-Id: I3ea4b8ce8d111ae6b9ce7e92f75bd4196bc9656b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268420
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37508}
2022-07-12 22:09:36 +00:00
Björn Terelius
63299a3124 Add absl::string_view overload for RtcEventLogOutput::Write
Bug: webrtc:13579
Change-Id: I13f63fb6be6aa62c2e011c18327499fa16b5824e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267641
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37440}
2022-07-05 10:47:47 +00:00
Philipp Hancke
a09b921dd4 pc: flush getStats cache in addIceCandidate
BUG=webrtc:14190

Change-Id: I6faf35af7b124f4d5258204f7813cedcf3275f42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265878
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37297}
2022-06-22 07:40:51 +00:00
Philipp Hancke
1fe14f2752 pc: invalidate stats cache when firing onicecandidate
https://w3c.github.io/webrtc-stats/#guidelines-for-getstats-results-caching-throttling
"When the state of the RTCPeerConnection visibly changes as a result of an API call, a promise resolving or an event firing, subsequent new getStats() calls must return up-to-date dictionaries for the affected objects."

BUG=webrtc:14190

Change-Id: I4560be22795f30e0369d573bda0100e490efb57b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265870
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#37255}
2022-06-17 11:26:18 +00:00
Niels Möller
105711e9ad Move rtc::make_ref_counted to api/
Bug: webrtc:12701
Change-Id: If49095b101c1a1763c2a44a0284c0d670cce953f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265390
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37219}
2022-06-15 09:47:38 +00:00
Jonas Oreland
6545516a14 RtpSenderInterface::SetEncoderSelector
This cl/ adds a way of setting an EncoderSelector on a specific
RtpSenderInterface. This makes it possible to easily use different
EncoderSelector on different streams within the same or different PeerConnections.

The cl/ is almost identical to the impl. of RtpSenderInterface::SetFrameEncryptor.

Iff a EncoderSelector is set on the RtpSender, it will take precedence
over the VideoEncoderFactory::GetEncoderSelector.

Bug: webrtc:14122
Change-Id: Ief4f7c06df7f1ef4ce3245de304a48e9de0ad587
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264542
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37150}
2022-06-08 11:06:52 +00:00
Harald Alvestrand
099ff62d94 Enable IceStatesReachCompletionWithRemoteHostname for all
This is verifying the theory that the fix on bug 12592 also fixed
bug 3608.

Bug: webrtc:3608, webrtc:12592
Change-Id: Ia1f5ba5ebdc9a839034092351c970c3b6a159fa2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264829
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37113}
2022-06-03 12:34:55 +00:00
Harald Alvestrand
4f7486ab3b Destroy peerconnections in test when they refer to on-stack mocks
Adds a function to PeerConnectionIntegrationBaseTest to stop and destroy
the caller and callee objects. This should take care of dangling pointers.

Before this change, the affected test would crash randomly - typically
detected within a few minutes of a gtest-repeat=-1 run.

After this change, it has not crashed in 15 minutes of running.

Bug: webrtc:12592
Change-Id: I9980f8974015bf2b2104fcb83c2ca0d677d03c3e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264555
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37096}
2022-06-02 13:11:11 +00:00
Harald Alvestrand
f8f7b70050 Create a "slow peerconnection unittests" target
This CL moves all tests that take more than 5 seconds into the new target.

Bug: webrtc:14025
Change-Id: I760d1a270b399b581f41606647740466f6b87e7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261262
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36782}
2022-05-05 14:40:38 +00:00
Harald Alvestrand
35ba0c5cd5 Check that PC is configured for media before doing media operations.
If media_engine is not passed in init parameters, the PC can't handle
media, but can be used for datachannels. This CL adds testing that
datachannels work without media engine, and adds failure returns
to PeerConnection APIs that manipulate media when media engine is
not present.

Bug: webrtc:13931
Change-Id: Iecdf17a0a0bb89e0ad39eb74d6ed077303b875c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261246
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36778}
2022-05-05 11:54:48 +00:00
Niels Möller
afb246b5a9 Update pc/ to not use implicit conversion from scoped_refptr<T> to T*.
Bug: webrtc:13464
Change-Id: I768646af8ded6338ef51486b8d69db1ad71e9a2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259500
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36588}
2022-04-20 13:18:33 +00:00
Florent Castelli
15a38de78d Fix SdpSemantics::kPlanB deprecated usage
Anything linking to //third_party/jsoncpp is hiding deprecated usage
warnings, so these were not discovered earlier.

Bug: chromium:983223
Change-Id: Ib527710b2688d691250d2b9f4894a9e6726d148f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258123
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36458}
2022-04-06 09:35:03 +00:00
Harald Alvestrand
ca32793187 Make requesting SDES available only on Fuchsia builds
Bug: webrtc:11066
Change-Id: I0707cf63064830a55db31e883dc7b15aa675950b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257900
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36438}
2022-04-05 06:12:50 +00:00
Evan Shrubsole
7619b7c078 Add tests for FrameBuffer3 and SyncDecoding in PC Integration Tests
Change-Id: I04ae6a694599a535347c29706e5ad40cba58155b
Bug: webrtc:13672
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251721
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36104}
2022-03-01 15:22:48 +00:00
Harald Alvestrand
c24a2189d7 Update IWYU tool with a mapping file
Also apply IWYU to all .cc files in pc/, and correct BUILD file to match.
Note: Some files came out wrong when iwyu was applied. These are not included.

Bug: none
Change-Id: Ib5ea46b8fcc505414d0447cca7218ad3afc2e321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252280
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36064}
2022-02-24 11:05:06 +00:00