onnegotiationneeded should only be called once
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2017 16:38:58 +0000 (16:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2017 16:38:58 +0000 (16:38 +0000)
commit92a48664a7eb226ae58e00efe895b5a0884fa17d
treec68afd5697da0eeb75646f95fbdb42f520d2ad67
parent155f9bb800ff665ce1015262c40dc431f8b83b27
onnegotiationneeded should only be called once
https://bugs.webkit.org/show_bug.cgi?id=170785

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-13
Reviewed by Alex Christensen.

Source/WebCore:

Covered by updated test.

Disabling explicit call to markAsNeedingNegotiation in case libwebrtc is used as libwebrtc is calling it.
Making sure removeTrack gets notified up to libwebrtc.

* Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::notifyRemovedTrack):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::completeAddTransceiver):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::removeTrack):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::notifyRemovedTrack):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

LayoutTests:

* webrtc/negotiatedneeded-event-addStream.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webrtc/negotiatedneeded-event-addStream.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h