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}
This commit is contained in:
Harald Alvestrand
2019-05-04 11:37:04 +02:00
committed by Commit Bot
parent 2390a139de
commit 14b2758726
21 changed files with 1350 additions and 492 deletions

View File

@ -175,8 +175,9 @@ class JsepTransportControllerTest : public JsepTransportController::Observer,
cricket::IceMode ice_mode,
cricket::ConnectionRole conn_role,
rtc::scoped_refptr<rtc::RTCCertificate> cert) {
std::unique_ptr<cricket::DataContentDescription> data(
new cricket::DataContentDescription());
RTC_CHECK(protocol_type == cricket::MediaProtocolType::kSctp);
std::unique_ptr<cricket::SctpDataContentDescription> data(
new cricket::SctpDataContentDescription());
data->set_rtcp_mux(true);
description->AddContent(mid, protocol_type,
/*rejected=*/false, data.release());