forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GStreamer][WebRTC] Emit 'track' event before resolving setRemoteDesc…
…ription's promise https://bugs.webkit.org/show_bug.cgi?id=275685 Reviewed by Philippe Normand. The track event should be emitted after sucessfully applying a remote description and before the promise from setRemoteDescription is resolved. However, up until now the GstWebRTC backend emitted the event based on the 'pad-added' signal. The timing of the signal doesn't match what the spec expects. Fix the issue by querying the transceiver states after applying a remote description sucessfully. By providing the transceiver states to PeerConnectionBackend::setRemoteDescriptionSucceeded(), it's able to emit the track events correctly acccording to the spec. A test is added to check that the track event is emitted before setRemoteDescription resolves, which would fail before this patch in the GstWebRTC backend. * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/glib/fast/mediastream/RTCPeerConnection-inspect-answer-expected.txt: * LayoutTests/platform/glib/fast/mediastream/RTCPeerConnection-media-setup-single-dialog-expected.txt: * LayoutTests/platform/glib/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-parameterless.https-expected.txt: Removed. * LayoutTests/platform/glib/imported/w3c/web-platform-tests/webrtc/protocol/split.https-expected.txt: Added. * LayoutTests/webrtc/setRemoteDescription-track-expected.txt: Added. * LayoutTests/webrtc/setRemoteDescription-track.html: Added. * Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded): (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed): (WebCore::PeerConnectionBackend::stop): (WebCore::PeerConnectionBackend::dispatchTrackEvent): Deleted. (WebCore::PeerConnectionBackend::addPendingTrackEvent): Deleted. * Source/WebCore/Modules/mediastream/PeerConnectionBackend.h: * Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp: (WebCore::GStreamerMediaEndpoint::initializePipeline): (WebCore::GStreamerMediaEndpointTransceiverState::isolatedCopy): (WebCore::getMediaStreamIdsFromSDPMedia): (WebCore::isRecvDirection): (WebCore::toGStreamerMediaEndpointTransceiverState): (WebCore::transceiverStatesFromWebRTCBin): (WebCore::GStreamerMediaEndpoint::doSetLocalDescription): (WebCore::GStreamerMediaEndpoint::setTransceiverCodecPreferences): (WebCore::GStreamerMediaEndpoint::doSetRemoteDescription): (WebCore::GStreamerMediaEndpoint::setDescription): (WebCore::GStreamerMediaEndpoint::connectIncomingTrack): * Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.h: * Source/WebCore/Modules/mediastream/gstreamer/GStreamerPeerConnectionBackend.cpp: (WebCore::GStreamerPeerConnectionBackend::addPendingTrackEvent): Deleted. (WebCore::GStreamerPeerConnectionBackend::dispatchPendingTrackEvents): Deleted. * Source/WebCore/Modules/mediastream/gstreamer/GStreamerPeerConnectionBackend.h: * Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::dataFlowStarted): * Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h: (WebCore::MediaStreamTrackPrivateObserver::dataFlowStarted): * Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: (webkitMediaStreamSrcCharacteristicsChanged): Canonical link: https://commits.webkit.org/281892@main
- Loading branch information
1 parent
4bfbd25
commit 1fc1e0b
Showing
9 changed files
with
208 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.