https://bugs.webkit.org/show_bug.cgi?id=224244
Unreviewed, manual revert of r275275 and r275409.
Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-06
.:
* Source/CMakeLists.txt:
* Source/cmake/GStreamerChecks.cmake:
Source/ThirdParty/libwebrtc:
* CMakeLists.txt:
* LibWebRTCWebKitMacros.h.in: Removed.
* 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: Removed.
Source/WebCore:
* platform/mediastream/libwebrtc/GStreamerVideoCommon.cpp:
(WebCore::gstreamerSupportedH264Codecs):
(WebCore::supportedH264Formats): Deleted.
* 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@275551
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2021-04-06 Philippe Normand <pnormand@igalia.com>
+
+ REGRESSION(r275275): Broke some build configs lacking openh264
+ https://bugs.webkit.org/show_bug.cgi?id=224244
+
+ Unreviewed, manual revert of r275275 and r275409.
+
+ * Source/CMakeLists.txt:
+ * Source/cmake/GStreamerChecks.cmake:
+
2021-04-06 Mark Lam <mark.lam@apple.com>
Speculative build fix for Windows port.
if (USE_LIBWEBRTC)
add_subdirectory(ThirdParty/libwebrtc)
- include_directories(${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/libwebrtc)
endif ()
if (ENABLE_WEBINSPECTORUI)
)
endif()
-
-configure_file(LibWebRTCWebKitMacros.h.in LibWebRTCWebKitMacros.h @ONLY)
-
if (APPLE)
list(APPEND webrtc_SOURCES
Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm
Source/third_party/opus/src/include/opus_types.h
DESTINATION ${libwebrtc_PRIVATE_HEADERS_DIR})
else ()
- find_package(Openh264)
- if (NOT Openh264_FOUND)
- message(WARNING "openh264 is not found, not building support.")
- set(WEBKIT_LIBWEBRTC_OPENH264_ENCODER 0)
- else()
- list(APPEND webrtc_SOURCES
- Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
- )
- set(WEBKIT_LIBWEBRTC_OPENH264_ENCODER 1)
- endif ()
list(APPEND webrtc_SOURCES
Source/third_party/boringssl/src/crypto/cpu-aarch64-linux.c
WEBRTC_OPUS_SUPPORT_120MS_PTIME=0
WEBRTC_OPUS_VARIABLE_COMPLEXITY=0
WEBRTC_USE_BUILTIN_OPUS=1
- WEBRTC_USE_H264=1
WEBRTC_POSIX
WEBRTC_USE_BUILTIN_ISAC_FIX=1
WEBRTC_USE_BUILTIN_ISAC_FLOAT=0
target_link_libraries(webrtc ${LIBVPX_LIBRARY})
target_link_libraries(webrtc ${LIBEVENT_LIBRARY})
target_link_libraries(webrtc ${LIBOPUS_LIBRARY})
- if (Openh264_FOUND)
- target_link_libraries(webrtc ${Openh264_LIBRARY})
- endif ()
endif ()
target_include_directories(webrtc ${webrtc_INCLUDE_DIRECTORIES})
+2021-04-06 Philippe Normand <pnormand@igalia.com>
+
+ REGRESSION(r275275): Broke some build configs lacking openh264
+ https://bugs.webkit.org/show_bug.cgi?id=224244
+
+ Unreviewed, manual revert of r275275 and r275409.
+
+ * CMakeLists.txt:
+ * LibWebRTCWebKitMacros.h.in: Removed.
+ * 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: Removed.
+
2021-04-05 Alex Christensen <achristensen@webkit.org>
Resurrect Mac CMake build
+++ /dev/null
-#cmakedefine01 WEBKIT_LIBWEBRTC_OPENH264_ENCODER
#include "media/base/media_constants.h"
#if defined(WEBRTC_USE_H264)
-#if !defined(WEBRTC_WEBKIT_BUILD)
#include "modules/video_coding/codecs/h264/h264_decoder_impl.h"
-#endif
#include "modules/video_coding/codecs/h264/h264_encoder_impl.h"
#endif
std::unique_ptr<H264Decoder> H264Decoder::Create() {
RTC_DCHECK(H264Decoder::IsSupported());
-#if defined(WEBRTC_USE_H264) && !defined(WEBRTC_WEBKIT_BUILD)
+#if defined(WEBRTC_USE_H264)
RTC_CHECK(g_rtc_use_h264);
RTC_LOG(LS_INFO) << "Creating H264DecoderImpl.";
return std::make_unique<H264DecoderImpl>();
#include "system_wrappers/include/metrics.h"
#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/libyuv/include/libyuv/scale.h"
-
-#ifdef WEBRTC_WEBKIT_BUILD
-#include "wels/codec_api.h"
-#include "wels/codec_app_def.h"
-#include "wels/codec_def.h"
-#include "wels/codec_ver.h"
-#else
#include "third_party/openh264/src/codec/api/svc/codec_api.h"
#include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
#include "third_party/openh264/src/codec/api/svc/codec_def.h"
#include "third_party/openh264/src/codec/api/svc/codec_ver.h"
-#endif
namespace webrtc {
#include "common_video/h264/h264_bitstream_parser.h"
#include "modules/video_coding/codecs/h264/include/h264.h"
#include "modules/video_coding/utility/quality_scaler.h"
-
-#ifdef WEBRTC_WEBKIT_BUILD
-#include "wels/codec_app_def.h"
-#else
#include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
-#endif
class ISVCEncoder;
+++ /dev/null
-# Copyright (C) 2020 Sony Interactive Entertainment Inc.
-# Copyright (C) 2021 Igalia S.L.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-# THE POSSIBILITY OF SUCH DAMAGE.
-
-#[=======================================================================[.rst:
-FindOpenh264
---------------
-
-Find Openh264 headers and libraries.
-
-Imported Targets
-^^^^^^^^^^^^^^^^
-
-``Openh264::libopenh264``
- The libopenh264 library, if found.
-
-Result Variables
-^^^^^^^^^^^^^^^^
-
-This will define the following variables in your project:
-
-``Openh264_FOUND``
- true if (the requested version of) Openh264 is available.
-``Openh264_VERSION``
- the version of Openh264.
-``Openh264_LIBRARIES``
- the libraries to link against to use Openh264.
-``Openh264_INCLUDE_DIRS``
- where to find the Openh264 headers.
-
-#]=======================================================================]
-
-find_package(PkgConfig QUIET)
-pkg_check_modules(PC_Openh264 QUIET openh264)
-set(Openh264_VERSION ${PC_Openh264_VERSION})
-
-find_path(Openh264_INCLUDE_DIR
- NAMES wels/codec_api.h
- HINTS ${PC_Openh264_INCLUDEDIR} ${PC_Openh264_INCLUDE_DIRS}
-)
-
-find_library(Openh264_LIBRARY
- NAMES ${Openh264_NAMES} openh264
- HINTS ${PC_Openh264_LIBDIR} ${PC_Openh264_LIBRARY_DIRS}
-)
-
-if (Openh264_INCLUDE_DIR AND NOT Openh264_VERSION)
- if (EXISTS "${Openh264_INCLUDE_DIR}/wels/codec_ver.h")
- file(READ "${Openh264_INCLUDE_DIR}/wels/codec_ver.h" Openh264_VERSION_CONTENT)
-
- string(REGEX MATCH "#[ \t]*define[ \t]+OPENH264_MAJOR[ \t]+\\(([0-9]+)\\)" _dummy "${Openh264_VERSION_CONTENT}")
- set(Openh264_VERSION_MAJOR "${CMAKE_MATCH_1}")
-
- string(REGEX MATCH "#[ \t]*define[ \t]+OPENH264_MINOR[ \t]+\\(([0-9]+)\\)" _dummy "${Openh264_VERSION_CONTENT}")
- set(Openh264_VERSION_MINOR "${CMAKE_MATCH_1}")
-
- string(REGEX MATCH "#[ \t]*define[ \t]+OPENH264_REVISION[ \t]+\\(([0-9]+)\\)" _dummy "${Openh264_VERSION_CONTENT}")
- set(Openh264_VERSION_REVISION "${CMAKE_MATCH_1}")
-
- set(Openh264_VERSION "${Openh264_VERSION_MAJOR}.${Openh264_VERSION_MINOR}.${Openh264_VERSION_REVISION}")
- endif ()
-endif ()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Openh264
- FOUND_VAR Openh264_FOUND
- REQUIRED_VARS Openh264_LIBRARY Openh264_INCLUDE_DIR
- VERSION_VAR Openh264_VERSION
-)
-
-if (Openh264_LIBRARY AND NOT TARGET Openh264::libopenh264)
- add_library(Openh264::libopenh264 UNKNOWN IMPORTED GLOBAL)
- set_target_properties(Openh264::libopenh264 PROPERTIES
- IMPORTED_LOCATION "${Openh264_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${Openh264_COMPILE_OPTIONS}"
- INTERFACE_INCLUDE_DIRECTORIES "${Openh264_INCLUDE_DIR}"
- )
-endif ()
-
-mark_as_advanced(Openh264_INCLUDE_DIR Openh264_LIBRARY)
-
-if (Openh264_FOUND)
- set(Openh264_LIBRARIES ${Openh264_LIBRARY})
- set(Openh264_INCLUDE_DIRS ${Openh264_INCLUDE_DIR})
-endif ()
+2021-04-06 Philippe Normand <pnormand@igalia.com>
+
+ REGRESSION(r275275): Broke some build configs lacking openh264
+ https://bugs.webkit.org/show_bug.cgi?id=224244
+
+ Unreviewed, manual revert of r275275 and r275409.
+
+ * platform/mediastream/libwebrtc/GStreamerVideoCommon.cpp:
+ (WebCore::gstreamerSupportedH264Codecs):
+ (WebCore::supportedH264Formats): Deleted.
+ * platform/mediastream/libwebrtc/GStreamerVideoCommon.h:
+ * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
+ * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
+ (WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder):
+ (WebCore::GStreamerVideoEncoderFactory::GetSupportedFormats const):
+
2021-04-06 Simon Fraser <simon.fraser@apple.com>
Shrink some IndexedDB-related classes
{ cricket::kH264FmtpPacketizationMode, packetizationMode } });
}
-std::vector<webrtc::SdpVideoFormat> supportedH264Formats()
+std::vector<webrtc::SdpVideoFormat> gstreamerSupportedH264Codecs()
{
// @TODO Create from encoder src pad caps template
//
namespace WebCore {
-std::vector<webrtc::SdpVideoFormat> supportedH264Formats();
+std::vector<webrtc::SdpVideoFormat> gstreamerSupportedH264Codecs();
} // namespace WebCore
std::vector<webrtc::SdpVideoFormat> ConfigureSupportedDecoder() final
{
- return supportedH264Formats();
+ return gstreamerSupportedH264Codecs();
}
};
#include "GStreamerVideoCommon.h"
#include "GStreamerVideoEncoder.h"
#include "GStreamerVideoFrameLibWebRTC.h"
-#include "LibWebRTCWebKitMacros.h"
#include "webrtc/common_video/h264/h264_common.h"
#include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
std::vector<webrtc::SdpVideoFormat> ConfigureSupportedCodec() final
{
- return supportedH264Formats();
+ return gstreamerSupportedH264Codecs();
}
const gchar* Caps() final { return "video/x-h264"; }
return makeUniqueWithoutFastMallocCheck<webrtc::LibvpxVp8Encoder>(webrtc::LibvpxInterface::CreateEncoder(), webrtc::VP8Encoder::Settings());
}
- if (format.name == cricket::kH264CodecName) {
-#if WEBKIT_LIBWEBRTC_OPENH264_ENCODER
- GST_INFO("Using OpenH264 libwebrtc encoder.");
- return webrtc::H264Encoder::Create(cricket::VideoCodec(format));
-#else
- GST_INFO("Using H264 GStreamer encoder.");
+ if (format.name == cricket::kH264CodecName)
return makeUnique<GStreamerH264Encoder>(format);
-#endif
- }
return nullptr;
}
std::vector<webrtc::SdpVideoFormat> supportedCodecs;
supportedCodecs.push_back(webrtc::SdpVideoFormat(cricket::kVp8CodecName));
-
- // If OpenH264 is present, prefer it over the GStreamer encoders (x264enc, usually).
-#if WEBKIT_LIBWEBRTC_OPENH264_ENCODER
- auto formats = supportedH264Formats();
- supportedCodecs.insert(supportedCodecs.end(), formats.begin(), formats.end());
-#else
GStreamerH264Encoder().AddCodecIfSupported(supportedCodecs);
-#endif
return supportedCodecs;
}
if (ENABLE_MEDIA_STREAM AND ENABLE_WEB_RTC)
SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE)
+ SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD TRUE)
else ()
SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC FALSE)
+ SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD FALSE)
endif ()