Commit graph

110 commits

Author SHA1 Message Date
Mikhail Pavlov
55c5173220 Revert "sdp: add rtcp-fb:* lines for common feedback"
This reverts commit 815522782a.

Reason for revert: Breaks a downstream project.

The internal investigation is still in-progress.

Original change's description:
> sdp: add rtcp-fb:* lines for common feedback
>
> which potentially allows switching to that pattern in the future.
> Video FEC mechanisms (ulpfec, flexfec-03, RED) that currently
> do not have any feedback parameters but will still be considered "common" and feedback may be sent for them.
>
> For audio this causes rtcp-feedback to be sent for G711 and G722 if negotiated.
>
> BUG=webrtc:14802
>
> Change-Id: I54852d39e176f918d4b36462526ceb40617b8fbe
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290702
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39224}

Bug: webrtc:14802
Change-Id: I4dc3c0c53ad1bc06050c0d73b088303312ac58b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293020
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#39296}
2023-02-10 19:42:14 +00:00
Dor Hen
d1831cb4f8 Treat non DTLS/SCTP Protocol Based Data Channels as Unsupported Media
In current state, the SDP parser in webrtc is not backward compatible with clients that might still be using RTP data channels.
Obviously, this isn't there is no such usecase in webrtc since the code is deleted, but in Meta we still use it and would like
to be able to negotiate between clients that offer RTP data channels.
Instead of erroring the parsing procedure, we can parse it as unsupported media in the client that no longer supports RTP data channels.

Replaced the existing test that expects parsing failures with a test that validates that the content was parsed as unsupported media.

Bug: webrtc:14872
Change-Id: I4c105cf55e33b8c19b2849e16148b8175053c40c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291190
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39252}
2023-02-03 06:56:37 +00:00
Philipp Hancke
815522782a sdp: add rtcp-fb:* lines for common feedback
which potentially allows switching to that pattern in the future.
Video FEC mechanisms (ulpfec, flexfec-03, RED) that currently
do not have any feedback parameters but will still be considered "common" and feedback may be sent for them.

For audio this causes rtcp-feedback to be sent for G711 and G722 if negotiated.

BUG=webrtc:14802

Change-Id: I54852d39e176f918d4b36462526ceb40617b8fbe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290702
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39224}
2023-01-30 10:20:50 +00:00
Philipp Hancke
bf0223b3a0 sdp: move serialization of ice, dtls and header extensions to helpers
preparing to put them at session level when max-bundle is set.

Drive-by: move m= serialization to helper.

BUG=None

Change-Id: I04d918ee8eb70c0cc40baf8ebc12054c6b3a2a15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288820
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38950}
2022-12-23 11:47:42 +00:00
Philipp Hancke
3c529893e0 sdp: ignore duplicate stream ids in msid parsing
https://www.rfc-editor.org/rfc/rfc8830.html#section-3.2.2
says
  Check if a MediaStream with the same WebIDL "id"
  attribute already exists. If not, create it.

Ignoring duplicates here satisfies this and brings the behavior
closer to Firefox:
  https://github.com/w3c/webrtc-pc/issues/2803

Also make tests use a std::string for the sdp input string.

BUG=webrtc:14745

Change-Id: Iccaabc08d865b779416f6ba4d2dfd5cff04133f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286422
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38840}
2022-12-07 18:03:59 +00:00
Philipp Hancke
e093c481bf sdp: parse a=msid:<stream_id> w/o msid-appdata
parse
  a=msid:<stream_id>
since JSEP stipulates sending this syntax as track identifers
have become meaningless. The track id will be set to a random string.

  a=msid:<stream_id> <track_id>
remains supported for backward compability.

BUG=webrtc:14729

Change-Id: I86c073eb97cd613324271125de18a773235fc79d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285783
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38814}
2022-12-05 16:44:54 +00:00
Shaofan Qi
45c882e4be Allow maxptime equal to minptime in the SDP.
The DCHECK crashes debug builds running some applications such as Webex.

Bug: None
Change-Id: I0061286c4c1d04964678a00014896f1fccd4685d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276460
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38644}
2022-11-16 10:54:03 +00:00
Philipp Hancke
c501f30333 sdp: temporarily relax channel requirements for statically assigned payload types
to allow for downstream users to upgrade.

BUG=chromium:1338902

Change-Id: Ie1205ad2c9c1be3f4ed8e133b1a5e54afd04ebd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268193
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37501}
2022-07-11 14:32:55 +00:00
Philipp Hancke
62c20f305e sdp: temporarily relax clockrate requirements for statically assigned payload types
to allow for downstream users to upgrade.

BUG=chromium:1338902

Change-Id: If6b56ab63f7859c13e9ebc70326e1088e5dfff1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268141
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37475}
2022-07-07 09:49:54 +00:00
Harald Alvestrand
1c5808145e Ignore RID that appears without an a=simulcast entry
RID is defined for multiple usages in RFC 8851, but we only support
usage with a=simulcast as specified in RFC 8853.

Bug: chromium:1341043
Change-Id: Ie72074c5b394bdc41865938a86ec9c7629e1f5e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267628
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37417}
2022-07-04 11:04:12 +00:00
Andrey Logvin
1d848e1c2e Reland "pc: make codec comparison for static codecs case-insensitive"
This reverts commit e130f29aaa.

Reason for revert: Reland as the downstream project error turned out to be unrelated to the CL

Original change's description:
> Revert "pc: make codec comparison for static codecs case-insensitive"
>
> This reverts commit dcc3d046e2.
>
> Reason for revert: Speculative revert. Presumably breaks downstream project
>
> Original change's description:
> > pc: make codec comparison for static codecs case-insensitive
> >
> > BUG=webrtc:14211,webrtc:14140
> >
> > Change-Id: Ib51de4c8961a4cf7c71aea27a55c115613296aae
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266371
> > Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37295}
>
> Bug: webrtc:14211,webrtc:14140
> Change-Id: Iead89fc597a634fe24a3d0e0f65f60215b62262d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266483
> Owners-Override: Andrey Logvin <landrey@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Andrey Logvin <landrey@webrtc.org>
> Commit-Queue: Andrey Logvin <landrey@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37300}

Bug: webrtc:14211,webrtc:14140
Change-Id: I74d4c1099182612d26b34ca983054688c7e67c42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266484
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37304}
2022-06-22 11:56:51 +00:00
Andrey Logvin
e130f29aaa Revert "pc: make codec comparison for static codecs case-insensitive"
This reverts commit dcc3d046e2.

Reason for revert: Speculative revert. Presumably breaks downstream project

Original change's description:
> pc: make codec comparison for static codecs case-insensitive
>
> BUG=webrtc:14211,webrtc:14140
>
> Change-Id: Ib51de4c8961a4cf7c71aea27a55c115613296aae
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266371
> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37295}

Bug: webrtc:14211,webrtc:14140
Change-Id: Iead89fc597a634fe24a3d0e0f65f60215b62262d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266483
Owners-Override: Andrey Logvin <landrey@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37300}
2022-06-22 08:46:21 +00:00
Philipp Hancke
dcc3d046e2 pc: make codec comparison for static codecs case-insensitive
BUG=webrtc:14211,webrtc:14140

Change-Id: Ib51de4c8961a4cf7c71aea27a55c115613296aae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266371
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37295}
2022-06-22 04:16:52 +00:00
Niels Möller
f1d822b03b Delete variant of rtc::split that copies the output fields
Bug: webrtc:13579
Change-Id: I065a32704d48d5eed21aee0e9757cac9ecf7aa99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261951
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37160}
2022-06-09 08:29:33 +00:00
Philipp Hancke
32c60b84c3 Reland "sdp: reject duplicate codecs with the same id but different name or clockrate"
This is a reland of commit ad6807805d

Original change's description:
> sdp: reject duplicate codecs with the same id but different name or clockrate
>
> since something like
>   rtpmap:96 VP8/90000
>   rtpmap:96 VP9/90000
> or
>   rtpmap:97 ISAC/32000
>   rtpmap:97 ISAC/16000
> is wrong. Note that fmtp or rtcp-fb are not taken into account.
> Also note that sending invalid static payload types now throws an error.
>
> Drive-by: replace "RtpMap" with "Rtpmap" for consistency.
>
> BUG=None
>
> Change-Id: I2574b82a6f1a0afe3edc866e514a5dbca0798e8c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263641
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
> Cr-Commit-Position: refs/heads/main@{#37028}

Bug: webrtc:14140
Change-Id: I63a37aacea6b9e0a9d7570b8422849275eb69aae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264544
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#37066}
2022-05-31 16:09:17 +00:00
Henrik Boström
874517b5f5 Revert "sdp: reject duplicate codecs with the same id but different name or clockrate"
This reverts commit ad6807805d.

Reason for revert: Speculative revert due to consistent Mac browser
test failures preventing WebRTC from rolling int Chromium:
https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Mac%20Tester/10410/overview

"Failed to parse SessionDescription. a=rtpmap:103 ISAC/16000 Duplicate payload type with conflicting codec name, clock rate or number of channels."

Original change's description:
> sdp: reject duplicate codecs with the same id but different name or clockrate
>
> since something like
>   rtpmap:96 VP8/90000
>   rtpmap:96 VP9/90000
> or
>   rtpmap:97 ISAC/32000
>   rtpmap:97 ISAC/16000
> is wrong. Note that fmtp or rtcp-fb are not taken into account.
> Also note that sending invalid static payload types now throws an error.
>
> Drive-by: replace "RtpMap" with "Rtpmap" for consistency.
>
> BUG=None
>
> Change-Id: I2574b82a6f1a0afe3edc866e514a5dbca0798e8c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263641
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
> Cr-Commit-Position: refs/heads/main@{#37028}

Bug: None
Change-Id: Ic9c06c9309bb68bd94bfdd2e30ffd6ff96f6812b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264540
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37064}
2022-05-31 13:31:56 +00:00
Philipp Hancke
ad6807805d sdp: reject duplicate codecs with the same id but different name or clockrate
since something like
  rtpmap:96 VP8/90000
  rtpmap:96 VP9/90000
or
  rtpmap:97 ISAC/32000
  rtpmap:97 ISAC/16000
is wrong. Note that fmtp or rtcp-fb are not taken into account.
Also note that sending invalid static payload types now throws an error.

Drive-by: replace "RtpMap" with "Rtpmap" for consistency.

BUG=None

Change-Id: I2574b82a6f1a0afe3edc866e514a5dbca0798e8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263641
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#37028}
2022-05-30 08:16:25 +00:00
Niels Möller
4662f53285 Add string_view version of cricket::StringToProto
And deprecate old version.

Bug: webrtc:13579
Change-Id: I3eda669fdaa814c0e3c75a78242279bf9e526b1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262241
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36999}
2022-05-25 08:44:21 +00:00
Niels Möller
810057cf96 Refactor GetLine function to use string_view
Bug: webrtc:13579
Change-Id: I01b7a2e20b7ff976aa50f7dd068431eb288e6fae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261904
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36861}
2022-05-12 09:26:33 +00:00
Niels Möller
e34291fed9 Use string_view for a few more sdp-related functions
Bug: webrtc:13579
Change-Id: I536bb2b2dbe8e1eb00b7ad4637faa7e08ff849ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231127
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36836}
2022-05-10 13:00:52 +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
Niels Möller
658b88a48e Delete rtc::string_trim. Replaced with absl::StripAsciiWhitespace.
Bug: webrtc:6424, webrtc:13579
Change-Id: I222e1bfb62d5f1f1a2c74e5fce1038e04e7bebfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255824
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36234}
2022-03-17 12:53:14 +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
Philipp Hancke
d58ac5adf8 sdp: reject large number of channels
the maximum used in practice is multiopus with
6 or 8 channels. 24 is the maximum number of channels
supported in the audio decoder.

BUG=chromium:1265806

Change-Id: Iba8e3185a1f235b846fed9c154e66fb3983664ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@nvidia.com>
Cr-Commit-Position: refs/heads/main@{#35440}
2021-11-30 11:01:14 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Philipp Hancke
62bb58f3ee sdp: check for token-char in C++ style
BUG=None

Change-Id: I391711b479dd82aa094248a2d47d61ebe90a29a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237600
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#35343}
2021-11-15 13:20:58 +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
Niels Möller
a654e07d11 Eliminate a temporary std::string in ParsedFailed helper.
Bug: None
Change-Id: If3435b5e9da9d2049c9b82b8b68e54d1ecc69003
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233440
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35125}
2021-09-30 09:31:28 +00:00
Harald Alvestrand
efece42aa5 Allow remote SDP offers to be "active" or "passive"
Bug: webrtc:12933
Change-Id: I75f148a1700143571e0ef8bce8a99123bae9c918
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229181
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34812}
2021-08-19 20:05:21 +00:00
Niels Möller
a820cc226e Change signatures of SDP ParseFailed* functions
Change types of const std::string& arguments.

Use absl::string_view for the reference to input, to prepare for
parsing with less copies. Use std::string (passed by value) for the
description, to support ownership transfer without copying.

Bug: None
Change-Id: I4358b42bb824e4eb7a5ac9b64d44db1b9b022bab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223667
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34721}
2021-08-11 13:14:05 +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
Henrik Boström
f8187e0a82 [Unified Plan] Support multiple BUNDLE groups.
In this CL, JsepTransportController and MediaSessionDescriptionFactory
are updated not to assume that there only exists at most a single BUNDLE
group but a list of N groups. This makes it possible to create multiple
BUNDLE groups by having multiple "a=group:BUNDLE" lines in the SDP.

This makes it possible to have some m= sections in one group and some
other m= sections in another group. For example, you could group all
audio m= sections in one group and all video m= sections in another
group. This enables "send all audio tracks on one transport and all
video tracks on another transport" in Unified Plan. This is something
that was possible in Plan B because all ssrcs in the same m= section
were implicitly bundled together forming a group of audio m= section and
video m= section (even without use of the BUNDLE tag).

PeerConnection will never create multiple BUNDLE groups by default, but
upon setting SDP with multiple BUNDLE groups the PeerConnection will
accept them if configured to accept BUNDLE. This makes it possible to
accept an SFU's BUNDLE offer without having to SDP munge the answer.

C++ unit tests are added. This fix has also been verified manually on:
https://jsfiddle.net/henbos/to89L6ce/43/

Without fix: 0+2 get bundled, 1+3 don't get bundled.
With fix: 0+2 get bundled in first group, 1+3 get bundled in second
group.

Bug: webrtc:10208
Change-Id: Iaf451fa5459c484730c8018274166ef154b19af8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214487
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33838}
2021-04-27 05:53:37 +00:00
Harald Alvestrand
48171ec264 Remove more mentions of RTP datachannels
Bug: webtc:6625
Change-Id: I38c51c4c10df8a5f517733f211e030359d33e787
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215783
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33799}
2021-04-21 10:16:43 +00:00
Harald Alvestrand
7af57c6e48 Remove RTP data implementation
Bug: webrtc:6625
Change-Id: Ie68d7a938d8b7be95a01cca74a176104e4e44e1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215321
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33759}
2021-04-16 13:10:54 +00:00
Harald Alvestrand
99bcf60a41 Check MID for illegal token characters.
Bug: webrtc:12516
Change-Id: I311dc984aa1dc8784d3ba3394676337b35cc92d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209360
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33370}
2021-03-03 08:55:39 +00:00
Harald Alvestrand
5761e7b3ff Running apply-iwyu on ~all files in pc/
Bug: none
Change-Id: Ieebdfb743e691f7ae35e1aa354f68ce9e771064d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204381
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33105}
2021-01-29 16:14:10 +00:00
Philipp Hancke
cd467b51ab sdp: check that sctp is on a application content type
regression from
  https://webrtc-review.googlesource.com/c/src/+/197813
which attempted to cast the unsupported content type with
a sctp protocol to a application/datachannel one.

BUG=chromium:1171965

Change-Id: I87c63da83b9f49d968e9b045bb1079f687ab226e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204481
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33100}
2021-01-29 10:54:00 +00:00
Philipp Hancke
b70c9531ee sdp: cross-check media type and protocol earlier
catching some unsupported configurations earlier.

BUG=None

Change-Id: I9f366929816fe15031837a3218086aa5a13d787a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197813
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33084}
2021-01-28 09:23:30 +00:00
Emil Lundmark
801c9995c8 Signal extmap-allow-mixed by default on session level
The extmap-allow-mixed SDP attribute signals that one- and two-byte RTP
header extensions can be mixed. In practice, this also means that WebRTC
will support two-byte RTP header extensions when this is signaled by
both peers.

Bug: webrtc:9985
Change-Id: I80a3f97bab162c7d9a5acf2cae07b977641c039d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197943
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33036}
2021-01-19 14:28:11 +00:00
Philipp Hancke
4a541f15dd sdp: remove extra check for attribute type when parsing fingerprint
for style consistency. This check is already done outside the method.

BUG=None

Change-Id: Ie1366fa57417258a301b02503ad76f304f4279a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198040
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32853}
2020-12-17 09:47:11 +00:00
Philipp Hancke
4793e9e3ce sdp: ignore legacy sctpmap line
and reorganise the parsing

Bug: None
Change-Id: I21f08297429a0cc0265da00daa681d934fc43d66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196643
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32843}
2020-12-16 09:05:01 +00:00
Philipp Hancke
20ecd8f777 sdp: add missing continue after parsing b= lines
otherwise this shows up in the logs as unhandled when it has been handled.

BUG=None

Change-Id: Ic081312a266d7a7ffff6220d2979cefa29a8591e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196652
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32810}
2020-12-09 13:16:25 +00:00
Philipp Hancke
df9245c09a sdp: log unhandled lines at LS_VERBOSE level
for consistency with
  https://webrtc-review.googlesource.com/c/src/+/196526

Bug: None
Change-Id: Iddeb5e1639444e855e61d10d13c7a741916b658e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196642
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32802}
2020-12-08 15:12:48 +00:00
Harald Alvestrand
ba90b7f171 Don't log errors on a=rtcp lines
The a=rtcp:9 IN IP4 0.0.0.0 line is required by JSEP to be generated,
but is also required to be ignored. This reduces log spew.

Bug: None
Change-Id: I984060d9693b9df4c4cfdf2c5dea0ea620f4bc83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196641
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32798}
2020-12-08 14:28:34 +00:00
henrika
d62c19e53f Removes spammy SDP log
Example of current output in appr.tc:

https://paste.googleplex.com/4582802164023296

No-Try: True
Bug: None
Change-Id: I9b717b9c13e771e84682d9e3d3ee6b0920a85a44
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196526
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32796}
2020-12-08 11:01:13 +00:00
Philipp Hancke
afee708f66 do not set rtp datachannel b=AS for SCTP
the limit is ignored anyway. Also rename rtp datachannel
bandwidth limit constant.

BUG=webrtc:6625

Change-Id: If7b26691ced8148955e98c86b9bed692b2e55e8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189972
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32479}
2020-10-23 20:14:53 +00:00
Philipp Hancke
4e8c115960 Reland "introduce an unsupported content description type"
This is a reland of 239f92ecf7

Original change's description:
> introduce an unsupported content description type
>
> This carries around unsupported content descriptions
> (i.e. things where webrtc does not understand the media type
> or protocol) in a special data type so that a rejected content or
> mediasection is added to the answer SDP.
>
> BUG=webrtc:3513
>
> Change-Id: Ifc4168eae11e899f2504649de5e1eecb6801a9fb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179082
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
> Cr-Commit-Position: refs/heads/master@{#32410}

Bug: webrtc:3513
Change-Id: I48e338100f829f1df5b8165217c89b5ef860fe79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188820
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32457}
2020-10-21 08:20:05 +00:00