You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move out of OnTrack/OnRemoveTrack libwebrtc callbacks
https://bugs.webkit.org/show_bug.cgi?id=244709
rdar://problem/99481570
Reviewed by Eric Carlson.
OnTrack/OnRemoveTrack are not standard compliant.
We miss some cases where these should be called (say rollback).
The timing of these callbacks is also not well aligned with the specification.
Instead, everytime a description is applied successfully, we store the current transceiver states from the backend.
We then compute the corresponding events from the transceiver states.
Covered by existing and rebased tests.
* LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpSender-setStreams.https-expected.txt:
* Source/WebCore/Modules/mediastream/MediaStream.h:
* Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::trackMutedChanged):
* Source/WebCore/Modules/mediastream/MediaStreamTrack.h:
(WebCore::MediaStreamTrack::setShouldFireMuteEventImmediately):
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::setLocalDescription):
(WebCore::setAssociatedRemoteStreams):
(WebCore::isDirectionReceiving):
(WebCore::processRemoteTracks):
(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::DescriptionStates::isolatedCopy):
* Source/WebCore/Modules/mediastream/RTCRtpReceiver.h:
* Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h:
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp:
(WebCore::GStreamerMediaEndpoint::doSetRemoteDescription):
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::mediaStreamFromRTCStreamId):
(WebCore::LibWebRTCMediaEndpoint::addPendingTrackEvent):
(WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
(WebCore::LibWebRTCMediaEndpoint::addIceCandidate):
(WebCore::LibWebRTCMediaEndpoint::OnIceCandidate):
(WebCore::LibWebRTCMediaEndpointTransceiverState::isolatedCopy):
(WebCore::toLibWebRTCMediaEndpointTransceiverState):
(WebCore::transceiverStatesFromPeerConnection):
(WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionSucceeded):
(WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
(WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionSucceeded):
(WebCore::LibWebRTCMediaEndpoint::mediaStreamFromRTCStream): Deleted.
(WebCore::LibWebRTCMediaEndpoint::newTransceiver): Deleted.
(WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack): Deleted.
(WebCore::LibWebRTCMediaEndpoint::OnTrack): Deleted.
(WebCore::LibWebRTCMediaEndpoint::OnRemoveTrack): Deleted.
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
Canonical link: https://commits.webkit.org/254128@main
Copy file name to clipboardExpand all lines: LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ PASS rollback of a local offer to negotiated stable state should enable applying
17
17
PASS rollback a local offer with audio direction change to negotiated stable state and then add video receiver
18
18
PASS two transceivers with same mids
19
19
PASS onremovetrack fires during remote rollback
20
-
FAIL rollback of a remote offer with stream changes assert_equals: expected 2 but got 1
20
+
PASS rollback of a remote offer with stream changes
21
21
PASS removeTrack() with a sender being rolled back does not crash or throw
22
22
PASS Implicit rollback with only a datachannel works
0 commit comments