OpenH264 library enabled in Android Chromium build

H264 codec components are included in Chromium build on Android when
OpenH264 library is enabled in Chromium media using media_use_openh264
build flag.

Bug: chromium:40519162
Change-Id: I4fcc341a7d208b399a294b1f86774860f70f83b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372680
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43940}
This commit is contained in:
Mosa Morosev 2025-02-19 12:36:21 +01:00 committed by WebRTC LUCI CQ
parent 3a3ebb512e
commit b300a9cc05

View File

@ -170,18 +170,24 @@ declare_args() {
rtc_build_with_neon =
(current_cpu == "arm" && arm_use_neon) || current_cpu == "arm64"
# Enable this to build OpenH264 encoder/FFmpeg decoder. This is supported on
# all platforms except Android and iOS. Because FFmpeg can be built
# with/without H.264 support, `ffmpeg_branding` has to separately be set to a
# value that includes H.264, for example "Chrome". If FFmpeg is built without
# H.264, compilation succeeds but `H264DecoderImpl` fails to initialize.
# Enable this to build OpenH264 encoder/FFmpeg decoder. When building WebRTC
# as part of Chromium, this is delegated to `media_use_openh264`. When
# building WebRTC as a standalone library, this is supported on all platforms
# except Android and iOS. Because FFmpeg can be built with/without H.264
# support, `ffmpeg_branding` has to separately be set to a value that
# includes H.264, for example "Chrome". If FFmpeg is built without H.264,
# compilation succeeds but `H264DecoderImpl` fails to initialize.
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
# http://www.openh264.org, https://www.ffmpeg.org/
#
# Enabling H264 when building with MSVC is currently not supported, see
# bugs.webrtc.org/9213#c13 for more info.
rtc_use_h264 =
proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
if (build_with_chromium) {
rtc_use_h264 = media_use_openh264
} else {
rtc_use_h264 =
proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
}
# Use system OpenH264
rtc_system_openh264 = false