Add support for RTCRtpReceiver/RTCRtpSender getParameters
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Mar 2017 18:10:45 +0000 (18:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Mar 2017 18:10:45 +0000 (18:10 +0000)
commit2fb9affc7de02d3d2ae1702fced90f00e0dd4bce
tree123173341530d74fc8f745c20ccf881cb3a54cec
parentf2637ece0a9c1f317dc349deb38eff15da087016
Add support for RTCRtpReceiver/RTCRtpSender getParameters
https://bugs.webkit.org/show_bug.cgi?id=170057

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

Source/ThirdParty/libwebrtc:

* Source/webrtc/api/mediatypes.h:

Source/WebCore:

Test: webrtc/video-getParameters.html

getParameters returns a dictionary of values taken from libwebrtc RtpReceiverInterface/RtpSenderInrterface objects.
Added a direct link between WebCore RTCRtpReceiver and libwebrtc RtpReceiverInterface object.
Making the link between WebCore RTCRtpSender and libwebrtc RtpSenderInrterface object through
PeerConnectionBackend to keep the current architecture shared with OpenWebRTC.
In the future, we should try to make the link more direct.

Added routines to support the conversion from libwebrtc to WebCore.
Ensured that RTCRtpReceiver is cleaning its backend when being stopped.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
* Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::getParameters):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::doClose):
(WebCore::RTCPeerConnection::getParameters):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCRtpParameters.h: Added.
* Modules/mediastream/RTCRtpParameters.idl: Added.
* Modules/mediastream/RTCRtpReceiver.cpp:
(WebCore::RTCRtpReceiver::RTCRtpReceiver):
* Modules/mediastream/RTCRtpReceiver.h:
(WebCore::RTCRtpReceiver::Backend::~Backend):
(WebCore::RTCRtpReceiver::Backend::getParameters):
(WebCore::RTCRtpReceiver::create):
(WebCore::RTCRtpReceiver::stop):
(WebCore::RTCRtpReceiver::setBackend):
(WebCore::RTCRtpReceiver::getParameters):
* Modules/mediastream/RTCRtpReceiver.idl:
* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::create):
(WebCore::RTCRtpSender::RTCRtpSender):
(WebCore::RTCRtpSender::replaceTrack):
(WebCore::RTCRtpSender::getParameters):
* Modules/mediastream/RTCRtpSender.h:
(WebCore::RTCRtpSender::Backend::~Backend):
(WebCore::RTCRtpSender::isStopped):
(WebCore::RTCRtpSender::stop):
* Modules/mediastream/RTCRtpSender.idl:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::addTrack):
(WebCore::LibWebRTCMediaEndpoint::addRemoteTrack):
(WebCore::LibWebRTCMediaEndpoint::OnAddTrack):
(WebCore::LibWebRTCMediaEndpoint::stop):
(WebCore::fillEncodingParameters):
(WebCore::fillHeaderExtensionParameters):
(WebCore::fillCodecParameters):
(WebCore::fillRtpParameters):
(WebCore::RTCRtpReceiverBackend::getParameters):
(WebCore::LibWebRTCMediaEndpoint::getRTCRtpSenderParameters):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::notifyAddedTrack):
(WebCore::LibWebRTCPeerConnectionBackend::getParameters):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

LayoutTests:

* webrtc/video-getParameters-expected.txt: Added.
* webrtc/video-getParameters.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/webrtc/video-getParameters-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/video-getParameters.html [new file with mode: 0644]
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Source/webrtc/api/mediatypes.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/RTCRtpParameters.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCRtpParameters.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp
Source/WebCore/Modules/mediastream/RTCRtpReceiver.h
Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl
Source/WebCore/Modules/mediastream/RTCRtpSender.cpp
Source/WebCore/Modules/mediastream/RTCRtpSender.h
Source/WebCore/Modules/mediastream/RTCRtpSender.idl
Source/WebCore/Modules/mediastream/RTCStatsReport.h
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
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.h