[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}
diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h
index d40d7a4..72a0765 100644
--- a/api/peer_connection_interface.h
+++ b/api/peer_connection_interface.h
@@ -173,12 +173,6 @@
   kPlanB_DEPRECATED,
   kPlanB [[deprecated]] = kPlanB_DEPRECATED,
   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 {
@@ -629,34 +623,26 @@
     // cost.
     absl::optional<rtc::AdapterType> network_preference;
 
-    // Configure the SDP semantics used by this PeerConnection. Note that the
-    // WebRTC 1.0 specification requires kUnifiedPlan semantics. The
-    // RtpTransceiver API is only available with kUnifiedPlan semantics.
+    // Configure the SDP semantics used by this PeerConnection. By default, this
+    // is Unified Plan which is compliant to the WebRTC 1.0 specification. It is
+    // 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
-    // multiple m= sections where each m= section maps to one RtpSender and one
-    // RtpReceiver (an RtpTransceiver), either both audio or both video. This
-    // will also cause PeerConnection to ignore all but the first a=ssrc lines
-    // that form a Plan B stream.
+    // kUnifiedPlan will cause the PeerConnection to create offers and answers
+    // with multiple m= sections where each m= section maps to one RtpSender and
+    // one RtpReceiver (an RtpTransceiver), either both audio or both video.
+    // This will also cause the PeerConnection to ignore all but the first
+    // 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
     // RtpReceivers specified as multiple a=ssrc lines within the section. This
     // will also cause PeerConnection to ignore all but the first m= section of
-    // the same media type.
-    //
-    // For users who have to interwork with legacy WebRTC implementations,
-    // 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;
+    // the same media type (if the PeerConnection is given Unified Plan SDP to
+    // process).
+    SdpSemantics sdp_semantics = SdpSemantics::kUnifiedPlan;
 
     // TODO(bugs.webrtc.org/9891) - Move to crypto_options or remove.
     // Actively reset the SRTP parameters whenever the DTLS transports
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index 99828f8..3c6402c 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -418,19 +418,11 @@
     std::unique_ptr<Call> call,
     const PeerConnectionInterface::RTCConfiguration& configuration,
     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.
-  RTC_CHECK(configuration.sdp_semantics != SdpSemantics::kNotSpecified)
-      << "Please specify sdp_semantics. The default is about to change to "
-      << "kUnifiedPlan.";
+  if (configuration.sdp_semantics == SdpSemantics::kPlanB_DEPRECATED) {
+    RTC_LOG(LS_WARNING)
+        << "PeerConnection constructed with legacy SDP semantics!";
+  }
 
   RTCError config_error = cricket::P2PTransportChannel::ValidateIceConfig(
       ParseIceConfig(configuration));
diff --git a/sdk/objc/api/peerconnection/RTCConfiguration.mm b/sdk/objc/api/peerconnection/RTCConfiguration.mm
index 9f92bcd..859aa8a 100644
--- a/sdk/objc/api/peerconnection/RTCConfiguration.mm
+++ b/sdk/objc/api/peerconnection/RTCConfiguration.mm
@@ -525,9 +525,6 @@
       return webrtc::SdpSemantics::kPlanB_DEPRECATED;
     case RTCSdpSemanticsUnifiedPlan:
       return webrtc::SdpSemantics::kUnifiedPlan;
-    default:
-      RTC_DCHECK_NOTREACHED();
-      return webrtc::SdpSemantics::kUnifiedPlan;
   }
 }
 
@@ -537,9 +534,6 @@
       return RTCSdpSemanticsPlanB;
     case webrtc::SdpSemantics::kUnifiedPlan:
       return RTCSdpSemanticsUnifiedPlan;
-    default:
-      RTC_DCHECK_NOTREACHED();
-      return RTCSdpSemanticsUnifiedPlan;
   }
 }