Add support for sender/receiver getCapabilities
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2018 04:01:49 +0000 (04:01 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2018 04:01:49 +0000 (04:01 +0000)
commit34f75539d64b5e034802d0f8685971eb7e31482c
treea2e0affcbebe736f33ca596667ae7adb109272b5
parent5c7ff01c10ad822b5d85a5ed3453b4bcf01b7c61
Add support for sender/receiver getCapabilities
https://bugs.webkit.org/show_bug.cgi?id=191192

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCRtpCapabilities-helper.js:
(string_appeared_here.validateRtpCapabilities): Change already made upstream.
* web-platform-tests/webrtc/RTCRtpReceiver-getCapabilities-expected.txt:
* web-platform-tests/webrtc/RTCRtpSender-getCapabilities-expected.txt:
* web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt:

Source/WebCore:

Expose sender/receiver RTCRtpCapabilities to JS.
Add corresponding IDL and plumbing down to libwebrtc peer connection factory.
Covered by rebased tests.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::receiverCapabilities):
(WebCore::PeerConnectionBackend::senderCapabilities):
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCRtpCapabilities.idl: Added.
* Modules/mediastream/RTCRtpReceiver.cpp:
(WebCore::RTCRtpReceiver::getCapabilities):
* Modules/mediastream/RTCRtpReceiver.h:
* Modules/mediastream/RTCRtpReceiver.idl:
* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::getCapabilities):
* Modules/mediastream/RTCRtpSender.h:
* Modules/mediastream/RTCRtpSender.idl:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::receiverCapabilities):
(WebCore::PeerConnectionBackend::senderCapabilities):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/RTCPMuxPolicy.h:
* platform/mediastream/RTCRtpCapabilities.h: Added.
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::typeFromKind):
(WebCore::fromStdString):
(WebCore::toChannels):
(WebCore::toRTCRtpCapabilities):
(WebCore::LibWebRTCProvider::receiverCapabilities):
(WebCore::LibWebRTCProvider::senderCapabilities):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getCapabilities-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpSender-getCapabilities-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCRtpCapabilities.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/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/mediastream/RTCRtpCapabilities.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h