Add VP8 support to WebRTC
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2018 01:53:27 +0000 (01:53 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2018 01:53:27 +0000 (01:53 +0000)
commit81ec30c40f5ae8b666c8ab065b4b1729a95ac0dd
tree3312c0400c52f7327c40f83e8a6bbd55a37644ea
parent67c0552f96e1f762e33c93d8502ce23ca39f7190
Add VP8 support to WebRTC
https://bugs.webkit.org/show_bug.cgi?id=189976

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-expected.txt:

Source/ThirdParty/libwebrtc:

Add support for conditional VP8 support for both encoding and decoding.
This boolean is used by WebCore based on the new VP8 runtime flag.

Enable yasm compilation as a dependency of libvpx.

Compilation is done without using SSE4/AVX2 optimizations.

* Configurations/libvpx.xcconfig: Added.
* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Configurations/libwebrtc.xcconfig:
* Configurations/libwebrtcpcrtc.xcconfig:
* Source/third_party/libvpx/run_yasm_webkit.py: Added.
* Source/third_party/libvpx/source/config/mac/x64/vpx_config.asm:
* Source/third_party/libvpx/source/config/mac/x64/vpx_config.h:
* Source/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h:
* Source/webrtc/sdk/WebKit/WebKitUtilities.h:
* Source/webrtc/sdk/WebKit/WebKitUtilities.mm:
(webrtc::createWebKitEncoderFactory):
(webrtc::createWebKitDecoderFactory):
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h:
* libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Add a runtime flag to control activation of VP8 codec.
Bind this runtime flag to the video codec factories.
Test: webrtc/video-mute-vp8.html

* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::createLibWebRTCPeerConnectionBackend):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webRTCVP8CodecEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebRTCVP8CodecEnabled):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
(WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
(WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
Enable VP8 codec for tests.

Source/WebKit:

* Shared/WebPreferences.yaml:

LayoutTests:

* webrtc/audio-peer-connection-g722.html:
* webrtc/routines.js:
* webrtc/video-mute-vp8-expected.txt: Added.
* webrtc/video-mute-vp8.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-expected.txt
LayoutTests/webrtc/audio-peer-connection-g722.html
LayoutTests/webrtc/routines.js
LayoutTests/webrtc/video-mute-vp8-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/video-mute-vp8.html [new file with mode: 0644]
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/libvpx.xcconfig [new file with mode: 0644]
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
Source/ThirdParty/libwebrtc/Configurations/libwebrtcpcrtc.xcconfig
Source/ThirdParty/libwebrtc/Source/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h
Source/ThirdParty/libwebrtc/Source/third_party/libvpx/source/config/mac/x64/vpx_config.asm
Source/ThirdParty/libwebrtc/Source/third_party/libvpx/source/config/mac/x64/vpx_config.h
Source/ThirdParty/libwebrtc/Source/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h
Source/ThirdParty/libwebrtc/Source/third_party/libvpx/source/libvpx/.gitignore [deleted file]
Source/ThirdParty/libwebrtc/Source/third_party/yasm-1.3.0/GNU_LGPL-2.0 [deleted file]
Source/ThirdParty/libwebrtc/Source/third_party/yasm-1.3.0/libyasm/bitvect.c [new file with mode: 0644]
Source/ThirdParty/libwebrtc/Source/third_party/yasm-1.3.0/libyasm/bitvect.h [new file with mode: 0644]
Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/codecs/vp8/vp8_noop.cc [deleted file]
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoDecoderFactory.mm
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.mm
Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml