Default build flag |rtc_use_h264| to |proprietary_codecs|

if not on Android/iOS.

This means proprietary_codecs=1 && ffmpeg_branding=Chrome
can be used to enable this H.264 enc/dec implementation
instead of rtc_use_h264=1 && ffmpeg_branding=Chrome.
This is used by both Chromium trybots (but not default
Chromium build) and offical Chrome build, meaning we will
be able to test and enable H.264 in chromium.

This change would otherwise be enough to launch this
feature in Chrome, but because we do not want to do that
before we have chromium browser tests and are ready to flip
the switch, this CL prevents chromium from using H.264 just
yet: https://codereview.chromium.org/1641163002/ (landing
this after that CL).

Note: This is a re-land of
https://codereview.webrtc.org/1660403004/. Reverting it
was not necessary.

TBR=kjellander@webrtc.org
BUG=chromium:500605, chromium:468365

Review URL: https://codereview.webrtc.org/1674103002

Cr-Commit-Position: refs/heads/master@{#11517}
This commit is contained in:
hbos
2016-02-07 14:40:40 -08:00
committed by Commit bot
parent c37b59f938
commit 10b9dd7ab1
2 changed files with 21 additions and 16 deletions

View File

@ -138,17 +138,21 @@
# Enabling this may break interop with Android clients that support H264.
'use_objc_h264%': 0,
# Enable this to build OpenH264 encoder/FFmpeg decoder. This is supported on
# all platforms except 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.
# See also: |rtc_initialize_ffmpeg|.
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
# http://www.openh264.org, https://www.ffmpeg.org/
'rtc_use_h264%': 0,
'conditions': [
# 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. See also: |rtc_initialize_ffmpeg|.
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
# http://www.openh264.org, https://www.ffmpeg.org/
['proprietary_codecs==1 and OS!="android" and OS!="ios"', {
'rtc_use_h264%': 1,
}, {
'rtc_use_h264%': 0,
}],
# FFmpeg must be initialized for |H264DecoderImpl| to work. This can be
# done by WebRTC during |H264DecoderImpl::InitDecode| or externally.
# FFmpeg must only be initialized once. Projects that initialize FFmpeg

View File

@ -7,6 +7,7 @@
# be found in the AUTHORS file in the root of the source tree.
import("//build/config/arm.gni")
import("//build/config/features.gni")
import("//build/config/mips.gni")
import("//build_overrides/webrtc.gni")
@ -92,14 +93,14 @@ declare_args() {
rtc_use_objc_h264 = false
# Enable this to build OpenH264 encoder/FFmpeg decoder. This is supported on
# all platforms except 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.
# See also: |rtc_initialize_ffmpeg|.
# 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. See
# also: |rtc_initialize_ffmpeg|.
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
# http://www.openh264.org, https://www.ffmpeg.org/
rtc_use_h264 = false
rtc_use_h264 = proprietary_codecs && !is_android && !is_ios
# FFmpeg must be initialized for |H264DecoderImpl| to work. This can be done
# by WebRTC during |H264DecoderImpl::InitDecode| or externally. FFmpeg must