Commit graph

105 commits

Author SHA1 Message Date
Florent Castelli
8037fc6ffa Migrate absl::optional to std::optional
Bug: webrtc:342905193
No-Try: True
Change-Id: Icc968be43b8830038ea9a1f5f604307220457807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361021
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42911}
2024-09-02 12:16:47 +00:00
Harald Alvestrand
5308652c73 Reland "Add recording of PT->Codec mappings on setting SDP for transport"
This reverts commit 6793f831ff.

Reason for revert: Removed the check that caused the error.

Original change's description:
> Revert "Add recording of PT->Codec mappings on setting SDP for transport"
>
> This reverts commit 15717236c8.
>
> Reason for revert: pr-answer
>
> Original change's description:
> > Add recording of PT->Codec mappings on setting SDP for transport
> >
> > Bug: webrtc:360058654
> > Change-Id: I2aa5e0058346cd3fcda47a8ea5115848fbc4f3e2
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360041
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Florent Castelli <orphis@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42819}
>
> Bug: webrtc:360058654
> Change-Id: I1fea51b3a0cecfa7e7de75f94f47a85fa064be59
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360380
> Reviewed-by: Jonas Oreland <jonaso@google.com>
> Commit-Queue: Jonas Oreland <jonaso@google.com>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42835}

Bug: webrtc:360058654
Change-Id: I2b60ccd60df3bacbeecd848c3cb86f6725b1505a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360400
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42847}
2024-08-26 11:11:43 +00:00
Jonas Oreland
6793f831ff Revert "Add recording of PT->Codec mappings on setting SDP for transport"
This reverts commit 15717236c8.

Reason for revert: pr-answer

Original change's description:
> Add recording of PT->Codec mappings on setting SDP for transport
>
> Bug: webrtc:360058654
> Change-Id: I2aa5e0058346cd3fcda47a8ea5115848fbc4f3e2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360041
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42819}

Bug: webrtc:360058654
Change-Id: I1fea51b3a0cecfa7e7de75f94f47a85fa064be59
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360380
Reviewed-by: Jonas Oreland <jonaso@google.com>
Commit-Queue: Jonas Oreland <jonaso@google.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42835}
2024-08-23 08:56:51 +00:00
Harald Alvestrand
15717236c8 Add recording of PT->Codec mappings on setting SDP for transport
Bug: webrtc:360058654
Change-Id: I2aa5e0058346cd3fcda47a8ea5115848fbc4f3e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360041
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42819}
2024-08-21 09:06:51 +00:00
Florent Castelli
f4673f97ed Move webrtc::AudioDeviceModule include to api/ folder
Bug: webrtc:15874
Change-Id: I5bdb19d5e710838b41e6ca283d406c9f1f21286b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348060
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42137}
2024-04-22 08:56:31 +00:00
Florent Castelli
0afde7614d Move webrtc::AudioProcessing include to api/ folder
Bug: webrtc:15874
Change-Id: Ie8a6e031c0f0505cfe238f7d252c47e9c34408d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347983
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42128}
2024-04-20 07:02:50 +00:00
Philipp Hancke
e3fb8122aa Reland "Let port allocator create ice tie breaker"
This is a reland of commit 3f3f991c03

Original change's description:
> Let port allocator create ice tie breaker
>
> Moves the responsibility for creating the ICE tie breaker from the JSEP transport controller to the port allocator. This will allow a future change to separate the ICE tie breaker (which is sent over the network and hence known to the peer) from the "port allocator random" (that is used to seed the ICE candidate foundation crc32 checksum) as an implementation detail.
>
> BUG=webrtc:14626
>
> Change-Id: I3a9a0980238d6108b1b154f45de2975b08793b1c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281660
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41707}

Bug: webrtc:14626
Change-Id: Id3c8f257c5611958551bd66d7ce7a885bf8ba2f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339320
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41720}
2024-02-12 14:47:12 +00:00
Mirko Bonadei
407367d053 Revert "Let port allocator create ice tie breaker"
This reverts commit 3f3f991c03.

Reason for revert: API breaking change on PortAllocatorSession.
Is it possible to duplicate the ctor of PortAllocatorSession and remove
the deprecated one (the one without ice_tiebreaker) in another CL?

Original change's description:
> Let port allocator create ice tie breaker
>
> Moves the responsibility for creating the ICE tie breaker from the JSEP transport controller to the port allocator. This will allow a future change to separate the ICE tie breaker (which is sent over the network and hence known to the peer) from the "port allocator random" (that is used to seed the ICE candidate foundation crc32 checksum) as an implementation detail.
>
> BUG=webrtc:14626
>
> Change-Id: I3a9a0980238d6108b1b154f45de2975b08793b1c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281660
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41707}

Bug: webrtc:14626
Change-Id: I342c9a96ac1909244aedea6a7779f5682088a5fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339280
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41715}
2024-02-12 10:07:04 +00:00
Philipp Hancke
3f3f991c03 Let port allocator create ice tie breaker
Moves the responsibility for creating the ICE tie breaker from the JSEP transport controller to the port allocator. This will allow a future change to separate the ICE tie breaker (which is sent over the network and hence known to the peer) from the "port allocator random" (that is used to seed the ICE candidate foundation crc32 checksum) as an implementation detail.

BUG=webrtc:14626

Change-Id: I3a9a0980238d6108b1b154f45de2975b08793b1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281660
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41707}
2024-02-09 14:00:52 +00:00
Harald Alvestrand
974044efca Remove code for supporting SDES
Rework transport_description_factory to only have non-DTLS mode for
testing, and rewrite tests accordingly.

Bug: webrtc:11066, chromium:804275
Change-Id: Ie7d477c4331c975e4e0a3034fbbb749ed9009446
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336880
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41697}
2024-02-08 14:34:04 +00:00
Philipp Hancke
6f0f158af0 sdp: make msid support parsing more robust
by also taking into account any a=msid: line in addition to
msid-semantic. Also document issues with msid-semantic generation and unify support determination by removing the msid_supported flag.

BUG=webrtc:10421

Change-Id: Icea554ebd1998f2b526846457029eff6854a772a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329760
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41386}
2023-12-14 14:50:31 +00:00
Danil Chapovalov
151003d341 Deprecate RtcEventLogFactory constructor taking unused parameter
Bug: webrtc:15656
Change-Id: I22ed4cca4c0ce7ebf9c533ed7434617bf0a0f4a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330120
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41338}
2023-12-07 21:46:56 +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
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
Danil Chapovalov
c63120a092 Migrate PeerConnection tests to EnableMedia api
Add test helper to inject fake media engine for those tests.

Bug: webrtc:15574
Change-Id: Iae4282d2d3b9804548ccadf58797f39508f07c6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325880
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41075}
2023-11-03 12:32:14 +00:00
Danil Chapovalov
554f7db01c Add EnableMediaWithDefaults to replace SetMediaEngineDefaults
Update most of the webrtc tests to use EnableMediaWithDefaults instead of SetMediaEngineDefaults

Bug: webrtc:15574
Change-Id: I489a09e4ea3479dc26829ee0c1235e67bcbca7c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325485
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41059}
2023-11-01 11:47:59 +00:00
Philipp Hancke
f16e139357 Generalize ssrc-group check to apply to groups other than SIM
BUG=chromium:1477075

Change-Id: I20f094dee11ea26a180471ce52d78d916f922f29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322440
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40888}
2023-10-09 05:59:48 +00:00
philipel
098cfbdc82 Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: I36abdd0f23055c6cbd4edb2c00af7abf7f7a1b58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299704
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39747}
2023-04-03 12:04:27 +00:00
Tommi
4f7ade5c58 Create SctpDataChannel objects on the network thread.
* Change data channel creation code to return RTCError for more
  detailed/accurate errors.
* Move DataChannelController::sid_allocator_ to the network thread.
* Add a temporary duplicate vector of channels on the network thread.
  This will eventually be the main vector.
* Delete one test that turns out to be racy (as long as we're using
  both the signaling and network threads).

Bug: webrtc:11547, webrtc:12796
Change-Id: I93ab721a09872d075046a907df60e8aee4263371
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298624
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39719}
2023-03-29 20:27:54 +00:00
Harald Alvestrand
041ecb87f5 New PeerConnectionFactory::CreateVideoTrack with refcounted source
Bug: webrtc:15017
Change-Id: I04c794d8959583bb4cc5c3898f4175783ec49f16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249363
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39635}
2023-03-22 09:10:27 +00:00
Sameer Vijaykar
0793ee7552 Remove FakePortAllocator's dependency on ScopedKeyValueConfig.
Breaking this dependency is required for using FakePortAllocator in chromium tests to make the windows component build work.

Bug: chromium:1408420
Change-Id: I4215b92c1d1430156107605e5b054926b30f83f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291114
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#39180}
2023-01-24 08:24:55 +00:00
Henrik Boström
a445e6a489 Delete deprecated disable_ipv6 flag.
M108 Stable has been released, which does not contain googIPv6 anymore,
and today the last downstream dependency on this flag was removed.

Let's delete!

Bug: webrtc:14608
Change-Id: Ia2d201f0da04b14961f891687b6135fc69b7767e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285720
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38786}
2022-12-01 11:01:02 +00:00
Alessio Bazzica
17887eb04a Reland "[ACM] iSAC audio codec removed"
This is a reland of commit b46c4bf27b

Original change's description:
> [ACM] iSAC audio codec removed
>
> Note: this CL has to leave behind one part of iSAC, which is its VAD
> currently used by AGC1 in APM. The target visibility has been
> restricted and the VAD will be removed together with AGC1 when the
> time comes.
>
> Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319
>
> Bug: webrtc:14450
> Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38652}

Bug: webrtc:14450
Change-Id: Ia22c4d7724b6022238235fede93e36e570a49376
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283843
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38665}
2022-11-17 12:52:35 +00:00
Alessio Bazzica
fbeb76ab51 Revert "[ACM] iSAC audio codec removed"
This reverts commit b46c4bf27b.

Reason for revert: breaks a downstream project

Original change's description:
> [ACM] iSAC audio codec removed
>
> Note: this CL has to leave behind one part of iSAC, which is its VAD
> currently used by AGC1 in APM. The target visibility has been
> restricted and the VAD will be removed together with AGC1 when the
> time comes.
>
> Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319
>
> Bug: webrtc:14450
> Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38652}

Bug: webrtc:14450
Change-Id: Ice138004e84e8c5f896684e8d01133d4b2a77bb7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283800
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38655}
2022-11-16 20:40:52 +00:00
Alessio Bazzica
b46c4bf27b [ACM] iSAC audio codec removed
Note: this CL has to leave behind one part of iSAC, which is its VAD
currently used by AGC1 in APM. The target visibility has been
restricted and the VAD will be removed together with AGC1 when the
time comes.

Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319

Bug: webrtc:14450
Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38652}
2022-11-16 16:42:55 +00:00
Philipp Hancke
fd91d02210 ice: include tiebreaker in computation of foundation attribute (tests)
split from the actual change for easier review and cherry-picking.

BUG=webrtc:14605

Change-Id: I7dbaf8e1f4a03f35a5d8c4da1a2784b00589bfc3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280680
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38519}
2022-11-01 07:47:23 +00:00
Henrik Boström
24e0337846 Make disable_ipv6 ABSL_DEPRECATED.
// All tests pass, infra failure unrelated
NOTRY=True

Bug: webrtc:14608
Change-Id: Ie16dcf9dc66e687f0befef42c7d8e914696af191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280760
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38502}
2022-10-30 21:47:27 +00:00
Jonas Oreland
4b2a106af2 Add optional init_send_encodings to AddTrack
This patch adds variant of PeerConnectionInterface::AddTrack
that takes an initial_send_encodings.

This allows for setting/modifying encoding parameters before sdp
negotiation is performed/complete (e.g requested_resolution).

This is already available if using RtpTransciverInit and AddTransceiver,
but was not added to AddTrack because of concerns that it complicated matching with existing transceivers. This CL sidesteps that by never matching to a preexisting transceiver if initial_send_encodings are specified.

Note:
1) The patch adds a new method rather than an extra (e.g optional)
argument to existing AddTrack. This is to avoid problems with downstream mocks.

2) chromium "problems" was fixed in https://chromium-review.googlesource.com/c/chromium/src/+/3952684 and https://chromium-review.googlesource.com/c/chromium/src/+/3956060

Bug: webrtc:14451
Change-Id: I19b5a03872730280fbf868ca5d3a2f46443359f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278783
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38437}
2022-10-19 09:13:08 +00:00
Byoungchan Lee
10a7d23be5 Fix degradation_preference setting being ignored using RtpSender.SetParameters.
RtpSenderBase::SetParametersInternal stores init_parameters_
if media_channel_ does not exist. When RtpSenderBase::SetSsrc is called,
init_parameters_ is used to set the initial encoding parameters and
degradation_preference. However, if no encoding parameter is specified,
degradation_preference will not be set.

This CL modifies the RtpSender so that degradation_preference is not
ignored even in this case.

Bug: webrtc:14279
Change-Id: I7e95ecdf5fcb19037e4f118981d1314d78ffca5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268960
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#37574}
2022-07-20 13:48:27 +00:00
Ali Tofigh
eb91fe48fe Remove unnecessary std::string overloads
Makes std::string version of rtc::RtcEventLogOutput::Write() no longer pure virtual while making the absl::string_view version pure virtual. Also removes unnecessary overloads in subclasses.

BUG=webrtc:13579

Change-Id: I8fb449560b795a1ef76fab27533d9042d0c34cd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268062
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37484}
2022-07-07 14:24:14 +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
Byoungchan Lee
d58f526384 Always inject PacketSocketFactory in FakePortAllocator
This CL removes the use of the rtc::Thread::socketserver() method
in one place.

Bug: webrtc:13145
Change-Id: I1a1b2501450788263d5280c43e4328ade46f4146
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263320
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#37340}
2022-06-27 12:45:28 +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
Harald Alvestrand
88b8dec17b Reland "remove mslabel and mslabel ssrc-specific attributes"
This reverts commit f0a34f2a30.

Reason for revert: Fixed downstream projects to not require those fields.

Original change's description:
> Revert "remove mslabel and mslabel ssrc-specific attributes"
>
> This reverts commit e3f257c4ee.
>
> Reason for revert: Breaks downstream projects
>
> Original change's description:
> > remove mslabel and mslabel ssrc-specific attributes
> >
> > Removes support for parsing and serializing
> >   a=ssrc:1 mslabel:stream
> >   a=ssrc:1 label:track
> > which have been superceeded by
> >   a=ssrc:1 msid:stream track
> > a long time ago.
> >
> > Bug: webrtc:7110
> > Change-Id: I3aca47728098b6e7e049b82ed34c59426d411c41
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168244
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30801}
>
> TBR=kthelgason@webrtc.org,hta@webrtc.org,philipp.hancke@googlemail.com
>
> Change-Id: Ibd0ad11d2dee9f54bacab3dcca61dedccfc2c120
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7110
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170620
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30805}

Change-Id: Iec4bd460b35ce49cdb03dd607d2c8b1dee6210ab
Bug: webrtc:7110
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170622
Reviewed-by: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36640}
2022-04-25 08:50:50 +00:00
Harald Alvestrand
2f7ad28a6d Change stream.AddTrack/RemoveTrack to take a scoped_refptr argument
This better reflects the ownership passing of AddTrack, and is more
consistent for RemoveTrack.

Bug: webrtc:13980
Change-Id: Ide5baccf15fc687a4e092f8831ce8c0fea46604e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259740
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36603}
2022-04-21 12:32:17 +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
Henrik Boström
35c5cc8a6f Enable DSCP by default.
DSCP is controlled by the spec-compliant API
RTCRtpEncodingParameters.networkPriority[1]. It already has a default
value that is the same as when DSCP is disabled.
- If you want non-default DSCP default values, you need to set
  networkPriority and shouldn't need to set a non-standard googDscp flag
  for it to have an effect.
- If you want the default DSCP value, you wouldn't change
  networkPriority and so you don't care if enable_dscp is true... you'll
  get the default regardless.

Drive-by: This CL also adds crbug references to other goog flags.

[1] https://w3c.github.io/webrtc-priority/#dom-rtcrtpencodingparameters-networkpriority

Bug: chromium:1315574
Change-Id: I15a0470fa04f55e2534cee0d240eeb03446c2de6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36550}
2022-04-14 09:35:29 +00:00
Florent Castelli
72424408ed Remove calls to deprecated CreatePC() and CreateDC()
Anything linking to //third_party/jsoncpp is hiding deprecated usage
warnings, so these were not discovered earlier.

Bug: chromium:983223
Change-Id: Id0ade4ca016f19db16377dbeeb756358a7e94fa2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258124
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36463}
2022-04-06 11:57:50 +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
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
Harald Alvestrand
93dd763360 Remove deprecated RemoveTrack interface
Bug: webrtc:9534
Change-Id: I970e6fd43284d9159897d5214fff9992cd26e171
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247371
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35856}
2022-01-31 14:08:57 +00:00
Henrik Boström
62995db2fc Change default sdp_semantics to kNotSpecified.
In preparation for switching the default from kPlanB to kUnifiedPlan,
which could cause subtle bugs for those not prepared for it, we change
the default to kNotSpecified. The only purpose of kNotSpecified is to
crash, forcing any dependencies to explicitly set their sdp_semantics
value.

Tests are updated to explicitly set sdp_semantics when necessary, and
where the test does not care we update to kUnifiedPlan.

If this change lands without getting reverted we can let it sit for a
few weeks, after which we should change the default to kUnifiedPlan and
delete kNotSpecified.

Bug: webrtc:11121
Change-Id: I19b669b0735d78e269e19eaae86c2d7d95a91141
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242968
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35651}
2022-01-10 14:56:03 +00:00
Niels Möller
e7cc8830ef Update pc/ to not use implicit T* --> scoped_refptr<T> conversion
Bug: webrtc:13464
Change-Id: I729ec2306ec0d6df2e546b5dbb530f57065d60da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244090
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35623}
2022-01-04 16:19:33 +00:00
Harald Alvestrand
0d018415d5 Revert "Remove code supporting the SDES crypto mode in SDP"
This reverts commit ee212a72f2.

Reason for revert: Don't remove until downstream issues resolved

Original change's description:
> Remove code supporting the SDES crypto mode in SDP
>
> Removes the ability to accept nonencrypted answers to encrypted offers.
> Fixes some logic around bundled sessions and requirement for
> transport parameters.
>
> Bug: webrtc:11066
> Change-Id: I56d8628d223614918a1e5260fdb8a117c8c02dbd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236344
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35298}

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

Bug: webrtc:11066
Change-Id: I0c400ceffe1b08e0be7b44abbb54c8a032128f05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237223
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35312}
2021-11-04 14:46:27 +00:00
Harald Alvestrand
ee212a72f2 Remove code supporting the SDES crypto mode in SDP
Removes the ability to accept nonencrypted answers to encrypted offers.
Fixes some logic around bundled sessions and requirement for
transport parameters.

Bug: webrtc:11066
Change-Id: I56d8628d223614918a1e5260fdb8a117c8c02dbd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236344
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35298}
2021-11-02 12:58:50 +00:00
Harald Alvestrand
f9e502d935 Remove enable_dtls_srtp option
This is part of the removal of support for SDES.

Bug: webrtc:11066
Change-Id: I448d0e0032672c04c87b00550ab4b9d792071a0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234864
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35262}
2021-10-26 10:35:41 +00:00
Artem Titov
880fa8169b Reland "Use backticks not vertical bars to denote variables in comments for /pc"
Original change's description:
> Revert "Use backticks not vertical bars to denote variables in comments for /pc"
>
> This reverts commit 37ee0f5e59.
>
> Reason for revert: Revert in order to be able to revert https://webrtc-review.googlesource.com/c/src/+/225642
>
> Original change's description:
> > Use backticks not vertical bars to denote variables in comments for /pc
> >
> > Bug: webrtc:12338
> > Change-Id: I88cf10afa5fc810b95d2a585ab2e895dcc163b63
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226953
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34575}
>
> TBR=hta@webrtc.org,titovartem@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I5eddd3a14e1f664bf831e5c294fbc4de5f6a88af
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:12338
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227082
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34577}

Bug: webrtc:12338
Change-Id: I96bd229b73613c162d11d75fa4f5934e1b4295c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227087
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34611}
2021-07-30 22:13:59 +00:00
Björn Terelius
fd05d6f504 Revert "Use backticks not vertical bars to denote variables in comments for /pc"
This reverts commit 37ee0f5e59.

Reason for revert: Revert in order to be able to revert https://webrtc-review.googlesource.com/c/src/+/225642

Original change's description:
> Use backticks not vertical bars to denote variables in comments for /pc
>
> Bug: webrtc:12338
> Change-Id: I88cf10afa5fc810b95d2a585ab2e895dcc163b63
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226953
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34575}

TBR=hta@webrtc.org,titovartem@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I5eddd3a14e1f664bf831e5c294fbc4de5f6a88af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227082
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34577}
2021-07-27 22:10:24 +00:00
Artem Titov
37ee0f5e59 Use backticks not vertical bars to denote variables in comments for /pc
Bug: webrtc:12338
Change-Id: I88cf10afa5fc810b95d2a585ab2e895dcc163b63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226953
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34575}
2021-07-27 20:52:02 +00:00
Tommi
87f7090fd9 Replace more instances of rtc::RefCountedObject with make_ref_counted.
This is essentially replacing `new rtc::RefCountedObject` with
`rtc::make_ref_counted` in many files. In a couple of places I
made minor tweaks to make things compile such as adding parenthesis
when they were missing.

Bug: webrtc:12701
Change-Id: I3828dbf3ee0eb0232f3a47067474484ac2f4aed2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215973
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33852}
2021-04-27 17:01:59 +00:00