[WebRTC][GStreamer] Build and use the openh264 based encoder if present on the system
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Apr 2021 13:02:06 +0000 (13:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Apr 2021 13:02:06 +0000 (13:02 +0000)
commit8a7b56bf22de65c311e913fd58e4da48a360cddd
tree93bdcf62bfdbc107fd58f5ab0186e6a8d24883a3
parent3a005c313a9193415ae0a380f7e906cd18494705
[WebRTC][GStreamer] Build and use the openh264 based encoder if present on the system
https://bugs.webkit.org/show_bug.cgi?id=202538
<rdar://problem/76047172>

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-15
Reviewed by Xabier Rodriguez-Calvar.

.:

* Source/CMakeLists.txt:
* Source/cmake/GStreamerChecks.cmake:

Source/ThirdParty/libwebrtc:

In WPE/GTK we would like to have the libwebrtc openh264 encoder enabled if libopenh264 is
present on the host (eg not vendored).

* CMakeLists.txt:
* LibWebRTCWebKitMacros.h.in: Added.
* Source/webrtc/modules/video_coding/codecs/h264/h264.cc:
* Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc:
* Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h:
* cmake/FindOpenh264.cmake: Added.

Source/WebCore:

Enable the openh264 encoder if it is available, it would be preferred over existing
GStreamer H.264 encoders in such case.

* platform/mediastream/libwebrtc/GStreamerVideoCommon.cpp:
(WebCore::supportedH264Formats):
* platform/mediastream/libwebrtc/GStreamerVideoCommon.h:
* platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
(WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder):
(WebCore::GStreamerVideoEncoderFactory::GetSupportedFormats const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
ChangeLog
Source/CMakeLists.txt
Source/ThirdParty/libwebrtc/CMakeLists.txt
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/LibWebRTCWebKitMacros.h.in [new file with mode: 0644]
Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/codecs/h264/h264.cc
Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h
Source/ThirdParty/libwebrtc/cmake/FindOpenh264.cmake [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoCommon.cpp
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoCommon.h
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp
Source/cmake/GStreamerChecks.cmake