Receiving tracks should be ended when peer connection is being closed
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2017 15:53:17 +0000 (15:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2017 15:53:17 +0000 (15:53 +0000)
commit64c106c3429837e6b62189736b9e7107b52c37a9
tree1188b198e3b52bc0af1ece83d423f6bd34c64435
parent349544a89af0caffec84de1f84207224bbd1ea5e
Receiving tracks should be ended when peer connection is being closed
https://bugs.webkit.org/show_bug.cgi?id=174109

Patch by Youenn Fablet <youenn@apple.com> on 2017-07-05
Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/peer-connection-track-end.html

As per https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close, tracks should be ended when peer connection is closed.
Also updating transceiver stopped state.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::doClose):
* Modules/mediastream/RTCRtpReceiver.cpp:
(WebCore::RTCRtpReceiver::stop):
* Modules/mediastream/RTCRtpReceiver.h:

LayoutTests:

* webrtc/peer-connection-track-end-expected.txt: Added.
* webrtc/peer-connection-track-end.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webrtc/peer-connection-track-end-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/peer-connection-track-end.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp
Source/WebCore/Modules/mediastream/RTCRtpReceiver.h