[Java] Make default sdpSemantics NOT_SPECIFIED.
The default value of sdpSemantics is about to change from PLAN_B to UNIFIED_PLAN. In order not to cause subtle bugs by applications that depend on the default value being PLAN_B, we are temporarily making the default NOT_SPECIFIED. Constructing with NOT_SPECIFIED causes the C++ layer to crash (https://webrtc-review.googlesource.com/c/src/+/242968). This is in accordance to the publically announced plans: https://groups.google.com/u/1/g/discuss-webrtc/c/SdoVP02eUIk While we're at it, we're upgrading almost all unit tests to use Unified Plan. However there are still two tests using Plan B for which I added TODO comments to be dealt with later; not having an Android setup makes it impossible to debug these efficiently. Bug: webrtc:11121 Change-Id: Ib086186bee947d18d31b413e3aeba0cb247b377d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246000 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Xavier Lepaul <xalep@webrtc.org> Commit-Queue: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35700}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
17d6f9c393
commit
277a3b4f85
@ -432,9 +432,10 @@ public class PeerConnection {
|
||||
/**
|
||||
* Java version of webrtc::SdpSemantics.
|
||||
*
|
||||
* Configure the SDP semantics used by this PeerConnection. Note that the
|
||||
* WebRTC 1.0 specification requires UNIFIED_PLAN semantics. The
|
||||
* RtpTransceiver API is only available with UNIFIED_PLAN semantics.
|
||||
* Configure the SDP semantics used by this PeerConnection. That the WebRTC
|
||||
* 1.0 specification requires UNIFIED_PLAN semantics and the RtpTransceiver
|
||||
* API is only available with UNIFIED_PLAN semantics. PLAN_B is being
|
||||
* deprecated and will be removed at a future date.
|
||||
*
|
||||
* <p>PLAN_B will cause PeerConnection to create offers and answers with at
|
||||
* most one audio and one video m= section with multiple RtpSenders and
|
||||
@ -448,13 +449,27 @@ public class PeerConnection {
|
||||
* will also cause PeerConnection to ignore all but the first a=ssrc lines
|
||||
* that form a Plan B stream.
|
||||
*
|
||||
* <p>For users who wish to send multiple audio/video streams and need to stay
|
||||
* interoperable with legacy WebRTC implementations, specify PLAN_B.
|
||||
* <p>For users who have to interwork with legacy WebRTC implementations, it
|
||||
* is possible to specify PLAN_B until the code is finally removed
|
||||
* (https://crbug.com/webrtc/13528).
|
||||
*
|
||||
* <p>For users who wish to send multiple audio/video streams and/or wish to
|
||||
* use the new RtpTransceiver API, specify UNIFIED_PLAN.
|
||||
* <p>The default SdpSemantics value is about to change to UNIFIED_PLAN.
|
||||
* During a short transition period, NOT_SPECIFIED 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
|
||||
* UNIFIED_PLAN, delete NOT_SPECIFIED.
|
||||
*/
|
||||
public enum SdpSemantics { PLAN_B, UNIFIED_PLAN }
|
||||
public enum SdpSemantics {
|
||||
// TODO(https://crbug.com/webrtc/13528): Remove support for PLAN_B.
|
||||
@Deprecated PLAN_B,
|
||||
UNIFIED_PLAN,
|
||||
// The default SdpSemantics value is about to change to UNIFIED_PLAN. During
|
||||
// a short transition period, NOT_SPECIFIED 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.
|
||||
NOT_SPECIFIED
|
||||
}
|
||||
|
||||
/** Java version of PeerConnectionInterface.RTCConfiguration */
|
||||
// TODO(qingsi): Resolve the naming inconsistency of fields with/without units.
|
||||
@ -611,7 +626,7 @@ public class PeerConnection {
|
||||
screencastMinBitrate = null;
|
||||
combinedAudioVideoBwe = null;
|
||||
networkPreference = AdapterType.UNKNOWN;
|
||||
sdpSemantics = SdpSemantics.PLAN_B;
|
||||
sdpSemantics = SdpSemantics.NOT_SPECIFIED;
|
||||
activeResetSrtpParams = false;
|
||||
cryptoOptions = null;
|
||||
turnLoggingId = null;
|
||||
|
||||
Reference in New Issue
Block a user