[webkit-changes] [WebKit/WebKit] 704f5d: Move out of OnTrack/OnRemoveTrack libwebrtc callbacks

youennf noreply at github.com
Sat Sep 3 02:12:40 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 704f5d6f10f8c0208e685fbd8203c0cd834f5e4f
      https://github.com/WebKit/WebKit/commit/704f5d6f10f8c0208e685fbd8203c0cd834f5e4f
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2022-09-03 (Sat, 03 Sep 2022)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpSender-setStreams.https-expected.txt
    M Source/WebCore/Modules/mediastream/MediaStream.h
    M Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
    M Source/WebCore/Modules/mediastream/MediaStreamTrack.h
    M Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
    M Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
    M Source/WebCore/Modules/mediastream/RTCRtpReceiver.h
    M Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h

  Log Message:
  -----------
  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




More information about the webkit-changes mailing list