[C++] Change default sdp_semantics to kUnifiedPlan.
This CL also removed the temporary enum value kNotSpecified. See PSA https://groups.google.com/u/1/g/discuss-webrtc/c/SdoVP02eUIk for more information. With this CL we can close https://crbug.com/webrtc/11121 as fixed. Bug: webrtc:11121 Change-Id: I1340b9be8e1d7a45e6327a5f550402bc542325ae Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246209 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35760}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
2832bbfeeb
commit
6d2fe89b7e
@ -173,12 +173,6 @@ enum class SdpSemantics {
|
|||||||
kPlanB_DEPRECATED,
|
kPlanB_DEPRECATED,
|
||||||
kPlanB [[deprecated]] = kPlanB_DEPRECATED,
|
kPlanB [[deprecated]] = kPlanB_DEPRECATED,
|
||||||
kUnifiedPlan,
|
kUnifiedPlan,
|
||||||
// The default SdpSemantics value is about to change to kUnifiedPlan. During a
|
|
||||||
// short transition period, kNotSpecified is used to ensure clients that don't
|
|
||||||
// set SdpSemantics are aware of the change by CHECK-crashing.
|
|
||||||
// TODO(https://crbug.com/webrtc/11121): When the default has changed to
|
|
||||||
// kUnifiedPlan, delete kNotSpecified.
|
|
||||||
kNotSpecified
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
|
class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
|
||||||
@ -629,34 +623,26 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
|
|||||||
// cost.
|
// cost.
|
||||||
absl::optional<rtc::AdapterType> network_preference;
|
absl::optional<rtc::AdapterType> network_preference;
|
||||||
|
|
||||||
// Configure the SDP semantics used by this PeerConnection. Note that the
|
// Configure the SDP semantics used by this PeerConnection. By default, this
|
||||||
// WebRTC 1.0 specification requires kUnifiedPlan semantics. The
|
// is Unified Plan which is compliant to the WebRTC 1.0 specification. It is
|
||||||
// RtpTransceiver API is only available with kUnifiedPlan semantics.
|
// possible to overrwite this to the deprecated Plan B SDP format, but note
|
||||||
|
// that kPlanB will be deleted at some future date, see
|
||||||
|
// https://crbug.com/webrtc/13528.
|
||||||
//
|
//
|
||||||
// kUnifiedPlan will cause PeerConnection to create offers and answers with
|
// kUnifiedPlan will cause the PeerConnection to create offers and answers
|
||||||
// multiple m= sections where each m= section maps to one RtpSender and one
|
// with multiple m= sections where each m= section maps to one RtpSender and
|
||||||
// RtpReceiver (an RtpTransceiver), either both audio or both video. This
|
// one RtpReceiver (an RtpTransceiver), either both audio or both video.
|
||||||
// will also cause PeerConnection to ignore all but the first a=ssrc lines
|
// This will also cause the PeerConnection to ignore all but the first
|
||||||
// that form a Plan B stream.
|
// a=ssrc lines that form a Plan B streams (if the PeerConnection is given
|
||||||
|
// Plan B SDP to process).
|
||||||
//
|
//
|
||||||
// kPlanB will cause PeerConnection to create offers and answers with at
|
// kPlanB will cause the PeerConnection to create offers and answers with at
|
||||||
// most one audio and one video m= section with multiple RtpSenders and
|
// most one audio and one video m= section with multiple RtpSenders and
|
||||||
// RtpReceivers specified as multiple a=ssrc lines within the section. This
|
// RtpReceivers specified as multiple a=ssrc lines within the section. This
|
||||||
// will also cause PeerConnection to ignore all but the first m= section of
|
// will also cause PeerConnection to ignore all but the first m= section of
|
||||||
// the same media type.
|
// the same media type (if the PeerConnection is given Unified Plan SDP to
|
||||||
//
|
// process).
|
||||||
// For users who have to interwork with legacy WebRTC implementations,
|
SdpSemantics sdp_semantics = SdpSemantics::kUnifiedPlan;
|
||||||
// it is possible to specify kPlanB until the code is finally removed
|
|
||||||
// (https://crbug.com/webrtc/13528).
|
|
||||||
//
|
|
||||||
// For all other users, specify kUnifiedPlan.
|
|
||||||
//
|
|
||||||
// The default SdpSemantics value is about to change to kUnifiedPlan. During
|
|
||||||
// a short transition period, kNotSpecified is used to ensure clients that
|
|
||||||
// don't set SdpSemantics are aware of the change by CHECK-crashing.
|
|
||||||
// TODO(https://crbug.com/webrtc/11121): When the default has changed to
|
|
||||||
// kUnifiedPlan, delete kNotSpecified.
|
|
||||||
SdpSemantics sdp_semantics = SdpSemantics::kNotSpecified;
|
|
||||||
|
|
||||||
// TODO(bugs.webrtc.org/9891) - Move to crypto_options or remove.
|
// TODO(bugs.webrtc.org/9891) - Move to crypto_options or remove.
|
||||||
// Actively reset the SRTP parameters whenever the DTLS transports
|
// Actively reset the SRTP parameters whenever the DTLS transports
|
||||||
|
@ -418,19 +418,11 @@ RTCErrorOr<rtc::scoped_refptr<PeerConnection>> PeerConnection::Create(
|
|||||||
std::unique_ptr<Call> call,
|
std::unique_ptr<Call> call,
|
||||||
const PeerConnectionInterface::RTCConfiguration& configuration,
|
const PeerConnectionInterface::RTCConfiguration& configuration,
|
||||||
PeerConnectionDependencies dependencies) {
|
PeerConnectionDependencies dependencies) {
|
||||||
// Prior to adding this CHECK, the default value was kPlanB. Because kPlanB is
|
|
||||||
// about to be deprecated in favor of the spec-compliant kUnifiedPlan, the
|
|
||||||
// default will soon change to kUnifiedPlan. This CHECK ensures that anybody
|
|
||||||
// implicitly relying on the default being kPlanB is made aware of the change.
|
|
||||||
// To avoid crashing, you can overwrite sdp_semantics to kPlanB for the old
|
|
||||||
// behavior, but you will need to migrate to kUnifiedPlan before kPlanB is
|
|
||||||
// removed.
|
|
||||||
// TODO(https://crbug.com/webrtc/11121): When the default is kUnifiedPlan,
|
|
||||||
// delete kNotSpecified.
|
|
||||||
// TODO(https://crbug.com/webrtc/13528): Remove support for kPlanB.
|
// TODO(https://crbug.com/webrtc/13528): Remove support for kPlanB.
|
||||||
RTC_CHECK(configuration.sdp_semantics != SdpSemantics::kNotSpecified)
|
if (configuration.sdp_semantics == SdpSemantics::kPlanB_DEPRECATED) {
|
||||||
<< "Please specify sdp_semantics. The default is about to change to "
|
RTC_LOG(LS_WARNING)
|
||||||
<< "kUnifiedPlan.";
|
<< "PeerConnection constructed with legacy SDP semantics!";
|
||||||
|
}
|
||||||
|
|
||||||
RTCError config_error = cricket::P2PTransportChannel::ValidateIceConfig(
|
RTCError config_error = cricket::P2PTransportChannel::ValidateIceConfig(
|
||||||
ParseIceConfig(configuration));
|
ParseIceConfig(configuration));
|
||||||
|
@ -525,9 +525,6 @@
|
|||||||
return webrtc::SdpSemantics::kPlanB_DEPRECATED;
|
return webrtc::SdpSemantics::kPlanB_DEPRECATED;
|
||||||
case RTCSdpSemanticsUnifiedPlan:
|
case RTCSdpSemanticsUnifiedPlan:
|
||||||
return webrtc::SdpSemantics::kUnifiedPlan;
|
return webrtc::SdpSemantics::kUnifiedPlan;
|
||||||
default:
|
|
||||||
RTC_DCHECK_NOTREACHED();
|
|
||||||
return webrtc::SdpSemantics::kUnifiedPlan;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,9 +534,6 @@
|
|||||||
return RTCSdpSemanticsPlanB;
|
return RTCSdpSemanticsPlanB;
|
||||||
case webrtc::SdpSemantics::kUnifiedPlan:
|
case webrtc::SdpSemantics::kUnifiedPlan:
|
||||||
return RTCSdpSemanticsUnifiedPlan;
|
return RTCSdpSemanticsUnifiedPlan;
|
||||||
default:
|
|
||||||
RTC_DCHECK_NOTREACHED();
|
|
||||||
return RTCSdpSemanticsUnifiedPlan;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user