H.264: Default flags and pulling in openh264 and ffmpeg.
Defining use_third_party_h264 directly, and indirectly defining use_openh264 (from third_party/openh264) and ffmpeg_branding (from third_party/ffmpeg). These will be used in a follow-up CL that adds an encoder and decoder implementation. The flags are added in this CL so that they can be used by trybots/waterfall bots in GN without "Build argument had no effect" errors. Equivalent GYP changes are also added. BUG=468365 Review URL: https://codereview.webrtc.org/1575913003 Cr-Commit-Position: refs/heads/master@{#11204}
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -91,6 +91,7 @@
|
|||||||
/third_party/directxsdk
|
/third_party/directxsdk
|
||||||
/third_party/drmemory
|
/third_party/drmemory
|
||||||
/third_party/expat
|
/third_party/expat
|
||||||
|
/third_party/ffmpeg
|
||||||
/third_party/gaeunit
|
/third_party/gaeunit
|
||||||
/third_party/gflags/src
|
/third_party/gflags/src
|
||||||
/third_party/google-visualization-python
|
/third_party/google-visualization-python
|
||||||
@ -121,6 +122,7 @@
|
|||||||
/third_party/nss
|
/third_party/nss
|
||||||
/third_party/oauth2
|
/third_party/oauth2
|
||||||
/third_party/ocmock
|
/third_party/ocmock
|
||||||
|
/third_party/openh264
|
||||||
/third_party/openmax_dl
|
/third_party/openmax_dl
|
||||||
/third_party/opus
|
/third_party/opus
|
||||||
/third_party/proguard
|
/third_party/proguard
|
||||||
|
1
.gn
1
.gn
@ -43,6 +43,7 @@ exec_script_whitelist = [
|
|||||||
"//build/toolchain/mac/BUILD.gn",
|
"//build/toolchain/mac/BUILD.gn",
|
||||||
"//build/toolchain/win/BUILD.gn",
|
"//build/toolchain/win/BUILD.gn",
|
||||||
"//third_party/boringssl/BUILD.gn",
|
"//third_party/boringssl/BUILD.gn",
|
||||||
|
"//third_party/openh264/BUILD.gn",
|
||||||
"//third_party/opus/BUILD.gn",
|
"//third_party/opus/BUILD.gn",
|
||||||
"//webrtc/modules/video_render/BUILD.gn",
|
"//webrtc/modules/video_render/BUILD.gn",
|
||||||
]
|
]
|
||||||
|
@ -40,6 +40,7 @@ DIRECTORIES = [
|
|||||||
'third_party/colorama',
|
'third_party/colorama',
|
||||||
'third_party/drmemory',
|
'third_party/drmemory',
|
||||||
'third_party/expat',
|
'third_party/expat',
|
||||||
|
'third_party/ffmpeg',
|
||||||
'third_party/instrumented_libraries',
|
'third_party/instrumented_libraries',
|
||||||
'third_party/jsoncpp',
|
'third_party/jsoncpp',
|
||||||
'third_party/libc++-static',
|
'third_party/libc++-static',
|
||||||
@ -53,6 +54,7 @@ DIRECTORIES = [
|
|||||||
'third_party/lss',
|
'third_party/lss',
|
||||||
'third_party/nss',
|
'third_party/nss',
|
||||||
'third_party/ocmock',
|
'third_party/ocmock',
|
||||||
|
'third_party/openh264',
|
||||||
'third_party/openmax_dl',
|
'third_party/openmax_dl',
|
||||||
'third_party/opus',
|
'third_party/opus',
|
||||||
'third_party/proguard',
|
'third_party/proguard',
|
||||||
|
@ -31,7 +31,7 @@ import textwrap
|
|||||||
|
|
||||||
# Bump this whenever the algorithm changes and you need bots/devs to re-sync,
|
# Bump this whenever the algorithm changes and you need bots/devs to re-sync,
|
||||||
# ignoring the .last_sync_chromium file
|
# ignoring the .last_sync_chromium file
|
||||||
SCRIPT_VERSION = 5
|
SCRIPT_VERSION = 6
|
||||||
|
|
||||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
CHROMIUM_NO_HISTORY = 'CHROMIUM_NO_HISTORY'
|
CHROMIUM_NO_HISTORY = 'CHROMIUM_NO_HISTORY'
|
||||||
|
@ -123,6 +123,17 @@
|
|||||||
# Enabling this may break interop with Android clients that support H264.
|
# Enabling this may break interop with Android clients that support H264.
|
||||||
'use_objc_h264%': 0,
|
'use_objc_h264%': 0,
|
||||||
|
|
||||||
|
# Enable this to build H.264 encoder/decoder using third party libraries.
|
||||||
|
# Encoding uses OpenH264 and decoding uses FFmpeg. Because of this, OpenH264
|
||||||
|
# and FFmpeg have to be correctly enabled separately.
|
||||||
|
# - use_openh264=1 is required for OpenH264 targets to be defined.
|
||||||
|
# - ffmpeg_branding=Chrome is one way to support H.264 decoding in FFmpeg.
|
||||||
|
# FFmpeg can be built with/without H.264 support, see 'ffmpeg_branding'.
|
||||||
|
# Without it, it compiles but H264DecoderImpl fails to initialize.
|
||||||
|
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
|
||||||
|
# http://www.openh264.org, https://www.ffmpeg.org/
|
||||||
|
'use_third_party_h264%': 0, # TODO(hbos): To be used in follow-up CL(s).
|
||||||
|
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['build_with_chromium==1', {
|
['build_with_chromium==1', {
|
||||||
# Exclude pulse audio on Chromium since its prerequisites don't require
|
# Exclude pulse audio on Chromium since its prerequisites don't require
|
||||||
|
@ -90,6 +90,17 @@ declare_args() {
|
|||||||
# Enable this to use HW H.264 encoder/decoder on iOS PeerConnections.
|
# Enable this to use HW H.264 encoder/decoder on iOS PeerConnections.
|
||||||
# Enabling this may break interop with Android clients that support H264.
|
# Enabling this may break interop with Android clients that support H264.
|
||||||
rtc_use_objc_h264 = false
|
rtc_use_objc_h264 = false
|
||||||
|
|
||||||
|
# Enable this to build H.264 encoder/decoder using third party libraries.
|
||||||
|
# Encoding uses OpenH264 and decoding uses FFmpeg. Because of this, OpenH264
|
||||||
|
# and FFmpeg have to be correctly enabled separately.
|
||||||
|
# - use_openh264=true is required for OpenH264 targets to be defined.
|
||||||
|
# - ffmpeg_branding="Chrome" is one way to support H.264 decoding in FFmpeg.
|
||||||
|
# FFmpeg can be built with/without H.264 support, see 'ffmpeg_branding'.
|
||||||
|
# Without it, it compiles but H264DecoderImpl fails to initialize.
|
||||||
|
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
|
||||||
|
# http://www.openh264.org, https://www.ffmpeg.org/
|
||||||
|
use_third_party_h264 = false # TODO(hbos): To be used in follow-up CL(s).
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make it possible to provide custom locations for some libraries (move these
|
# Make it possible to provide custom locations for some libraries (move these
|
||||||
|
@ -136,6 +136,18 @@ source_set("webrtc_h264") {
|
|||||||
deps = [
|
deps = [
|
||||||
"../../system_wrappers",
|
"../../system_wrappers",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (use_third_party_h264) {
|
||||||
|
# Dependency added so that variables use_openh264 and ffmpeg_branding are
|
||||||
|
# recognized build arguments (avoid "Build argument has no effect" error).
|
||||||
|
# The variables and dependencies will be used for real as soon as
|
||||||
|
# https://codereview.webrtc.org/1306813009/ lands. In the meantime, the
|
||||||
|
# build arguments are to be used by waterfall/trybots.
|
||||||
|
deps += [
|
||||||
|
"//third_party/ffmpeg:ffmpeg",
|
||||||
|
"//third_party/openh264:encoder",
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(tkchin): Source set for webrtc_h264_video_toolbox. Currently not
|
# TODO(tkchin): Source set for webrtc_h264_video_toolbox. Currently not
|
||||||
|
Reference in New Issue
Block a user