From ee0a85cee25174a60e39e8a37e063d4c9a76c348 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Tue, 15 Jan 2019 10:47:18 +0100 Subject: [PATCH] Roll //third_party/ffmpeg and disable H264 when MSVC is used. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FFmpeg hasn't been rolled since [1] in order to avoid to break MSVC trybots (//third_party/ffmpeg dropped MSVC support, in theory it is possible to bring the support back but some work is needed every time //third_party/ffmpeg gets updated). Not rolling //third_party/ffmpeg is not enough to keep the Chromium Roll working because -Wstring-plus-int becomes more chatty with clang 350768 and it has been suppressed in //third_party/ffmpeg/BUILD.gn [2]. Since WebRTC needs to update clang, //third_party/ffmpeg needs to be updated. The only way to do it without fixing MSVC errors in //third_party/ffmpeg is to enforce rtc_use_h264=False when MSVC is used. PSA: https://groups.google.com/forum/#!topic/discuss-webrtc/cfkPPq5nvNE. [1] - https://webrtc-review.googlesource.com/78402 [2] - https://chromium-review.googlesource.com/c/chromium/third_party/ffmpeg/+/1376376 Bug: webrtc:9213 Change-Id: I36bd7fb2db21012760e4ff7a791d81350e402ec0 Reviewed-on: https://webrtc-review.googlesource.com/c/116982 Commit-Queue: Mirko Bonadei Reviewed-by: Karl Wiberg Reviewed-by: Erik Språng Reviewed-by: Harald Alvestrand Reviewed-by: Rasmus Brandt Reviewed-by: Oleh Prypin Cr-Commit-Position: refs/heads/master@{#26257} --- DEPS | 2 +- modules/video_coding/BUILD.gn | 1 + tools_webrtc/autoroller/roll_deps.py | 1 - tools_webrtc/mb/mb_config.pyl | 8 ++++---- webrtc.gni | 6 +++++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/DEPS b/DEPS index 06ac4a6c0f..db68b2c97b 100644 --- a/DEPS +++ b/DEPS @@ -117,7 +117,7 @@ deps = { 'condition': 'checkout_android', }, 'src/third_party/ffmpeg': - Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + '90210b5e10d3917567a3025e4853704bfefd8384', + Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + '42bb040dde0a5e1bdb4b6d91f54297e0cc7f0977', 'src/third_party/findbugs': { 'url': Var('chromium_git') + '/chromium/deps/findbugs.git' + '@' + '4275d9ac8610db6b1bc9a5e887f97e41b33fac67', 'condition': 'checkout_android', diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index 470f5b0ee0..f3eff5fd99 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -333,6 +333,7 @@ rtc_static_library("webrtc_h264") { ] if (rtc_use_h264) { + assert(!(is_win && !is_clang), "See: bugs.webrtc.org/9213#c13.") defines += [ "WEBRTC_USE_H264" ] sources += [ "codecs/h264/h264_color_space.cc", diff --git a/tools_webrtc/autoroller/roll_deps.py b/tools_webrtc/autoroller/roll_deps.py index d3a8bdbca8..6a8e082900 100755 --- a/tools_webrtc/autoroller/roll_deps.py +++ b/tools_webrtc/autoroller/roll_deps.py @@ -29,7 +29,6 @@ def FindSrcDirPath(): # Skip these dependencies (list without solution name prefix). DONT_AUTOROLL_THESE = [ 'src/examples/androidtests/third_party/gradle', - 'src/third_party/ffmpeg', ] # These dependencies are missing in chromium/src/DEPS, either unused or already diff --git a/tools_webrtc/mb/mb_config.pyl b/tools_webrtc/mb/mb_config.pyl index ae837ae6d2..245b0eed3e 100644 --- a/tools_webrtc/mb/mb_config.pyl +++ b/tools_webrtc/mb/mb_config.pyl @@ -335,16 +335,16 @@ 'gn', 'clang', 'openh264', 'release_bot', 'x64', ], 'win_msvc_debug_bot_x86': [ - 'gn', 'no_clang', 'openh264', 'debug_bot', 'x86', 'no_lld', + 'gn', 'no_clang', 'debug_bot', 'x86', 'no_lld', ], 'win_msvc_release_bot_x86': [ - 'gn', 'no_clang', 'openh264', 'release_bot', 'x86', 'no_lld', + 'gn', 'no_clang', 'release_bot', 'x86', 'no_lld', ], 'win_msvc_debug_bot_x64': [ - 'gn', 'no_clang', 'openh264', 'debug_bot', 'x64', 'no_lld' + 'gn', 'no_clang', 'debug_bot', 'x64', 'no_lld' ], 'win_msvc_release_bot_x64': [ - 'gn', 'no_clang', 'openh264', 'release_bot', 'x64', 'no_lld', + 'gn', 'no_clang', 'release_bot', 'x64', 'no_lld', ], 'win_asan_clang_release_bot_x86': [ 'gn', 'asan', 'clang', 'full_symbols', 'openh264', 'release_bot', 'x86', diff --git a/webrtc.gni b/webrtc.gni index b561374cbe..65975210b0 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -156,7 +156,11 @@ declare_args() { # 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/ - rtc_use_h264 = proprietary_codecs && !is_android && !is_ios + # + # 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) # By default, use normal platform audio support or dummy audio, but don't # use file-based audio playout and record.