Commit graph

76 commits

Author SHA1 Message Date
Elad Alon
fadb1811a8 Negotiate use of RTCP loss notification feedback (LNTF)
When the LossNotifications field trial is in effect, LNTF should
be offered/accepted in the SDP message, not assumed to be configured
on both sides equally.

Bug: webrtc:10662
Change-Id: Ibd827779bd301821cbb4196857f6baebfc9e7dc2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138079
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28056}
2019-05-24 12:44:14 +00:00
Harald Alvestrand
fbb45bd02f Send and parse SCTP max-message-size in SDP
This also changes the default when no max-message-size is set
to the protocol defined value of 64K, and prevents messages
from being sent when they are too large to send.

Bug: webrtc:10358
Change-Id: Iacc1dd774d1554d9f27315378fbea6351300b5cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135948
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27945}
2019-05-15 07:14:32 +00:00
Harald Alvestrand
c3f4820e12 Change default secure SCTP protocol to UDP/DTLS/SCTP
The old value - DTLS/SCTP - is not standards conformant,
and the new value should be parsable since Chrome M61.

Bug: webrtc:7706
Change-Id: I7468cc9597dec4ef4b102fccddc4e981fed7e8d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136804
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27940}
2019-05-14 18:36:47 +00:00
Harald Alvestrand
5fc28b11a0 Reland "Reland "Version 2 "Refactoring DataContentDescription class"""
This reverts commit 46afbf9481.

Reason for revert: Tightened protocol name handling.

Original change's description:
> Revert "Reland "Version 2 "Refactoring DataContentDescription class"""
>
> This reverts commit 37f2b43274.
>
> Reason for revert: fuzzer failures
>
> Original change's description:
> > Reland "Version 2 "Refactoring DataContentDescription class""
> >
> > This is a reland of 14b2758726
> >
> > Original change's description:
> > > Version 2 "Refactoring DataContentDescription class"
> > >
> > > (substantial changes since version 1)
> > >
> > > This CL splits the cricket::DataContentDescription class into
> > > two classes: cricket::RtpDataContentDescription (used for RTP data)
> > > and cricket::SctpDataContentDescription (used for SCTP only).
> > >
> > > SctpDataContentDescription no longer inherits from
> > > MediaContentDescriptionImpl, and no longer contains "codecs".
> > >
> > > Due to usage of internal interfaces by consumers, shimming the old
> > > DataContentDescription API is needed.
> > >
> > > A new cricket::DataContentDescription class is defined, which is
> > > a shim over RtpDataContentDescription and SctpDataContentDescription.
> > > It exposes as little functionality as possible, but supports the
> > > concerned consumer's usage
> > >
> > > Design document:
> > > https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#
> > >
> > > Version 1 reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700
> > >

Bug: webrtc:10358
Change-Id: Ia9fb8f4679e082e3d18fbbb6b03fc13a08e06110
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136581
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27933}
2019-05-13 18:37:47 +00:00
Steve Anton
46afbf9481 Revert "Reland "Version 2 "Refactoring DataContentDescription class"""
This reverts commit 37f2b43274.

Reason for revert: fuzzer failures

Original change's description:
> Reland "Version 2 "Refactoring DataContentDescription class""
>
> This is a reland of 14b2758726
>
> Original change's description:
> > Version 2 "Refactoring DataContentDescription class"
> >
> > (substantial changes since version 1)
> >
> > This CL splits the cricket::DataContentDescription class into
> > two classes: cricket::RtpDataContentDescription (used for RTP data)
> > and cricket::SctpDataContentDescription (used for SCTP only).
> >
> > SctpDataContentDescription no longer inherits from
> > MediaContentDescriptionImpl, and no longer contains "codecs".
> >
> > Due to usage of internal interfaces by consumers, shimming the old
> > DataContentDescription API is needed.
> >
> > A new cricket::DataContentDescription class is defined, which is
> > a shim over RtpDataContentDescription and SctpDataContentDescription.
> > It exposes as little functionality as possible, but supports the
> > concerned consumer's usage
> >
> > Design document:
> > https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#
> >
> > Version 1 reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700
> >
> > Bug: webrtc:10358
> > Change-Id: Icf95fb7308244d6f2ebfdb403aaffc544e358580
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133900
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27853}
>
> Bug: webrtc:10358
> Change-Id: Iff45c4694167f0b31b34ff2167c1f4ffa650bcc4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135281
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27896}

TBR=steveanton@webrtc.org,kwiberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org,shampson@webrtc.org

Change-Id: Ied6d9fb96aafe9c957f2658b34b5331b1f359b26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10358
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135986
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27917}
2019-05-10 18:16:09 +00:00
Harald Alvestrand
8da35a60ab Deprecate owned naked pointers to cricket::SessionDescription
Recommended usage is to create copies with Clone() and to
call JsepSessionDescription::Initialize using std::move.

Bug: webrtc:10612
Change-Id: I626a08a35ba8e112471cec0374c944e96f8effbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135941
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27911}
2019-05-10 11:43:08 +00:00
Harald Alvestrand
37f2b43274 Reland "Version 2 "Refactoring DataContentDescription class""
This is a reland of 14b2758726

Original change's description:
> Version 2 "Refactoring DataContentDescription class"
> 
> (substantial changes since version 1)
> 
> This CL splits the cricket::DataContentDescription class into
> two classes: cricket::RtpDataContentDescription (used for RTP data)
> and cricket::SctpDataContentDescription (used for SCTP only).
> 
> SctpDataContentDescription no longer inherits from
> MediaContentDescriptionImpl, and no longer contains "codecs".
> 
> Due to usage of internal interfaces by consumers, shimming the old
> DataContentDescription API is needed.
> 
> A new cricket::DataContentDescription class is defined, which is
> a shim over RtpDataContentDescription and SctpDataContentDescription.
> It exposes as little functionality as possible, but supports the
> concerned consumer's usage
> 
> Design document:
> https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#
> 
> Version 1 reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700
> 
> Bug: webrtc:10358
> Change-Id: Icf95fb7308244d6f2ebfdb403aaffc544e358580
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133900
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27853}

Bug: webrtc:10358
Change-Id: Iff45c4694167f0b31b34ff2167c1f4ffa650bcc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135281
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27896}
2019-05-09 18:15:48 +00:00
Harald Alvestrand
141c0ad8ab Revert "Version 2 "Refactoring DataContentDescription class""
This reverts commit 14b2758726.

Reason for revert: Internal import failed.

Original change's description:
> Version 2 "Refactoring DataContentDescription class"
> 
> (substantial changes since version 1)
> 
> This CL splits the cricket::DataContentDescription class into
> two classes: cricket::RtpDataContentDescription (used for RTP data)
> and cricket::SctpDataContentDescription (used for SCTP only).
> 
> SctpDataContentDescription no longer inherits from
> MediaContentDescriptionImpl, and no longer contains "codecs".
> 
> Due to usage of internal interfaces by consumers, shimming the old
> DataContentDescription API is needed.
> 
> A new cricket::DataContentDescription class is defined, which is
> a shim over RtpDataContentDescription and SctpDataContentDescription.
> It exposes as little functionality as possible, but supports the
> concerned consumer's usage
> 
> Design document:
> https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#
> 
> Version 1 reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700
> 
> Bug: webrtc:10358
> Change-Id: Icf95fb7308244d6f2ebfdb403aaffc544e358580
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133900
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27853}

TBR=danilchap@webrtc.org,steveanton@webrtc.org,kwiberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org,shampson@webrtc.org

Change-Id: Ibc16ba14c1cbf50345a9b79151b79df140482539
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10358
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135280
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27855}
2019-05-05 19:00:13 +00:00
Harald Alvestrand
14b2758726 Version 2 "Refactoring DataContentDescription class"
(substantial changes since version 1)

This CL splits the cricket::DataContentDescription class into
two classes: cricket::RtpDataContentDescription (used for RTP data)
and cricket::SctpDataContentDescription (used for SCTP only).

SctpDataContentDescription no longer inherits from
MediaContentDescriptionImpl, and no longer contains "codecs".

Due to usage of internal interfaces by consumers, shimming the old
DataContentDescription API is needed.

A new cricket::DataContentDescription class is defined, which is
a shim over RtpDataContentDescription and SctpDataContentDescription.
It exposes as little functionality as possible, but supports the
concerned consumer's usage

Design document:
https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#

Version 1 reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700

Bug: webrtc:10358
Change-Id: Icf95fb7308244d6f2ebfdb403aaffc544e358580
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133900
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27853}
2019-05-05 13:22:21 +00:00
Danil Chapovalov
c6d1d24de8 Revert "Reland "Refactoring DataContentDescription class""
This reverts commit 26bf7c4682.

Reason for revert: breaks downstream test

Original change's description:
> Reland "Refactoring DataContentDescription class"
> 
> This reverts commit 1859dc04fd.
> 
> Reason for revert: Issue likely unrelated to this CL.
> 
> Original change's description:
> > Revert "Refactoring DataContentDescription class"
> >
> > This reverts commit 8a9193c217.
> >
> > Reason for revert: Breaks downstreams
> >
> > Original change's description:
> > > Refactoring DataContentDescription class
> > >
> > > This CL splits the cricket::DataContentDescription class into
> > > two classes: cricket::DataContentDescription (used for RTP data) and
> > > cricket::SctpDataContentDescription (used for SCTP only).
> > >
> > > SctpDataContentDescription no longer inherits from
> > > MediaContentDescriptionImpl, and no longer contains "codecs".
> > >
> > > Design document:
> > > https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#
> > >
> > > Bug: webrtc:10358
> > > Change-Id: Ie7160610506aeef56d1f821b5fdb5d9492201f43
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700
> > > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#27651}
> >
> > TBR=steveanton@webrtc.org,kwiberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org
> >
> > Change-Id: I3b8a68cd481c41ce30eeb5ffbc5da735a9659019
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:10358
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133360
> > Reviewed-by: Seth Hampson <shampson@webrtc.org>
> > Commit-Queue: Seth Hampson <shampson@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27652}
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: webrtc:10358
> Change-Id: Ie58f862f8c55d2a994eaee1caa107ef701b0770f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133624
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27698}

TBR=danilchap@webrtc.org,steveanton@webrtc.org,kwiberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org,shampson@webrtc.org

Change-Id: Ib17939d5f1e8c57652dcb34d94866654192379bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10358
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133880
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27702}
2019-04-23 09:48:59 +00:00
Harald Alvestrand
26bf7c4682 Reland "Refactoring DataContentDescription class"
This reverts commit 1859dc04fd.

Reason for revert: Issue likely unrelated to this CL.

Original change's description:
> Revert "Refactoring DataContentDescription class"
>
> This reverts commit 8a9193c217.
>
> Reason for revert: Breaks downstreams
>
> Original change's description:
> > Refactoring DataContentDescription class
> >
> > This CL splits the cricket::DataContentDescription class into
> > two classes: cricket::DataContentDescription (used for RTP data) and
> > cricket::SctpDataContentDescription (used for SCTP only).
> >
> > SctpDataContentDescription no longer inherits from
> > MediaContentDescriptionImpl, and no longer contains "codecs".
> >
> > Design document:
> > https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#
> >
> > Bug: webrtc:10358
> > Change-Id: Ie7160610506aeef56d1f821b5fdb5d9492201f43
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700
> > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27651}
>
> TBR=steveanton@webrtc.org,kwiberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org
>
> Change-Id: I3b8a68cd481c41ce30eeb5ffbc5da735a9659019
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10358
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133360
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Seth Hampson <shampson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27652}

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

Bug: webrtc:10358
Change-Id: Ie58f862f8c55d2a994eaee1caa107ef701b0770f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133624
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27698}
2019-04-23 09:08:07 +00:00
Seth Hampson
1859dc04fd Revert "Refactoring DataContentDescription class"
This reverts commit 8a9193c217.

Reason for revert: Breaks downstreams

Original change's description:
> Refactoring DataContentDescription class
> 
> This CL splits the cricket::DataContentDescription class into
> two classes: cricket::DataContentDescription (used for RTP data) and
> cricket::SctpDataContentDescription (used for SCTP only).
> 
> SctpDataContentDescription no longer inherits from
> MediaContentDescriptionImpl, and no longer contains "codecs".
> 
> Design document:
> https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#
> 
> Bug: webrtc:10358
> Change-Id: Ie7160610506aeef56d1f821b5fdb5d9492201f43
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27651}

TBR=steveanton@webrtc.org,kwiberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org

Change-Id: I3b8a68cd481c41ce30eeb5ffbc5da735a9659019
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10358
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133360
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27652}
2019-04-16 20:56:06 +00:00
Harald Alvestrand
8a9193c217 Refactoring DataContentDescription class
This CL splits the cricket::DataContentDescription class into
two classes: cricket::DataContentDescription (used for RTP data) and
cricket::SctpDataContentDescription (used for SCTP only).

SctpDataContentDescription no longer inherits from
MediaContentDescriptionImpl, and no longer contains "codecs".

Design document:
https://docs.google.com/document/d/1H5LfQxJA2ikMWTQ8FZ3_GAmaXM7knfVQWiSz6ph8VQ0/edit#

Bug: webrtc:10358
Change-Id: Ie7160610506aeef56d1f821b5fdb5d9492201f43
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132700
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27651}
2019-04-16 20:34:34 +00:00
Harald Alvestrand
4d7160e41d Code cleanup: Make JsepSessionDescription::Initialize take std::unique_ptr
Bug: none
Change-Id: I5e03ff6a6f16bd2e67fa4830e218b510b702d1d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132321
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27577}
2019-04-12 05:42:46 +00:00
Harald Alvestrand
48cce4d9e8 Parse "max-message-size" parameter from SCTP SDP description
Bug: chromium:943975
Change-Id: I559093cfa3686f2a388b872774df8f0737963281
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132224
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27555}
2019-04-11 08:44:44 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Piotr (Peter) Slatala
b1ae10b172 Add x-mt line to the offer.
We already support decoding of the x-mt line. This change adds the
a=x-mt line to the SDP offer. This is not a backward compatible change
for media transport (because of the changes in pre-shared key handling)

1) if media transport is enabled, and SDES is enabled, generate the
media transport offer.
2) if media transport generated the offer, add that offer to the x-mt
line.
3) in order to create media transport, require an x-mt line (backward incompatible).

The way it works is that
1) PeerConnection, on the offerer, asks jsep transport for the
configuration of the media transport.
2) Tentative media transport is created in JsepTransportController when
that happens.
3) SessionDescription will include configuration from this tentative
media transport.
4) When the LocalDescription is set on the offerer, the tentative media
transport is promoted to the real media transport.

Caveats:
- now we really only support MaxBundle. In the previous implementations,
two media transports were briefly created in some tests, and the second
one was destroyed shortly after instantiation.
- we, for now, enforce SDES. In the future, whether SDES is used will be
refactored out of the peer connection.

In the future (on the callee) we should ignore 'is_media_transport' setting. If
Offer contains x-mt, media transport should be used (if the factory is
present). However, we need to decide how to negotiate media transport
for data channels vs data transport for media (x-mt line at this point
doesn't differentiate the two, so we still need to use app setting).

This change also removes the negotation of pre-shared key from the
a=crypto line. Instead, media transport will have its own, 256bit key.
Such key should be transported in the x-mt line. This makes the code
much simpler, and simplifies the dependency / a=crypto lines parsing.

Also, adds a proper test for the connection re-offer (on both sides: callee and caller).
Before, it was possible that media transport could get recreated, based on the offer.
The tests we had didn't test this scenario, and the loopback media factory didn't allow for such test.
This change adds counts to that loopback media factory, and asserts that only 1 media transport is created, even
when there is a re-offer.

Bug: webrtc:9719
Change-Id: Ibd8739af90e914da40ab412454bba8e1529f5a01
Reviewed-on: https://webrtc-review.googlesource.com/c/125040
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26933}
2019-03-01 20:32:16 +00:00
Piotr (Peter) Slatala
13e570fcb0 Add a parser for the x-mt line.
This change adds a parser for the x-mt line to the WebRTC SDP, and adds a collection in the SessionDescription for media transport.

x-mt line contains information about media transport settings.

This is an experimental line.

This change will be followed up by two other changes:
* Setting the offer with x-mt
* Using the x-mt line to pass it to the media transport

Bug: webrtc:9719
Change-Id: I46568610d4092a69ada7b7c1d3987d698ddba0be
Reviewed-on: https://webrtc-review.googlesource.com/c/124601
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26881}
2019-02-27 21:00:58 +00:00
Steve Anton
1c9c9fc9b6 Replace replace_substrs with Abseil
Bug: None
Change-Id: I155cc29db951ef1b812691c57aaafe037fbeb230
Reviewed-on: https://webrtc-review.googlesource.com/c/114241
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26699}
2019-02-15 01:22:54 +00:00
Qingsi Wang
5699142b9a Use c=IN IP4 <hostname> to support the presence of hostname candidates.
Bug: chromium:927309
Change-Id: I1b014ee3d194bf2b8fcc47b37e31c7af866a8322
Reviewed-on: https://webrtc-review.googlesource.com/c/121960
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#26619}
2019-02-08 22:51:37 +00:00
Mirko Bonadei
c84f661b10 Stop using Googletest legacy APIs.
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.

This CL moves WebRTC to the new set of APIs.

More info in [1].

This CL has been generated with this script:

declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
  git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format

[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature

Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
2019-01-31 13:23:33 +00:00
Steve Anton
64b626b03f Use Abseil container algorithms in pc/
Bug: None
Change-Id: If784461b54d95bdc6f8a7d4e5d1bbfa52d1a390e
Reviewed-on: https://webrtc-review.googlesource.com/c/119862
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26433}
2019-01-29 02:33:50 +00:00
Amit Hilbuch
b7446ed257 Removing receive RIDs and Simulcast Layers.
In the January 22nd 2019 WebRTC meeting it was agreed that an offer
for sending (or receiving) simulcast should only contain the RIDs
of the layers that are sent by the client.
This change removes the complexity that was added to support sending
and receiving the single layer (and RID) that are sent from the server.

Bug: webrtc:10076
Change-Id: I8bae1336d5cb8ba2f91c5b62332dc69e67ddfd47
Reviewed-on: https://webrtc-review.googlesource.com/c/120242
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26432}
2019-01-29 00:54:26 +00:00
Mirko Bonadei
37ec55e2bb [clang-tidy] Apply performance-faster-string-find fixes.
This CL applies clang-tidy's performance-faster-string-find [1] on the
WebRTC codebase.

All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html

Bug: webrtc:10252
Change-Id: I4b8c0396836f3c325488e37d97037fa04742a5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/120047
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26423}
2019-01-28 11:31:53 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Renamed from pc/webrtcsdp_unittest.cc (Browse further)